English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 05 February 2013, 21:32   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Dragging shortcut onto emulation window

I just — accidentally as it happens — dragged a shortcut icon from the Windows desktop and dropped it on the emulation window. WinUAE automatically mounted the file. Unfortunately shortcut .lnk files aren't much use on the Amiga side. Would it be possible to mount the file which the shortcut points to instead in that case?
mark_k is offline  
Old 12 February 2013, 16:47   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
Done.
Toni Wilen is offline  
Old 16 February 2013, 04:47   #3
Mixter
Registered User
 
Join Date: Dec 2009
Location: Stockholm
Posts: 42
Does this cover shortcuts (.lnk) to real folders and real folders too? Thanks
Mixter is offline  
Old 16 February 2013, 17:59   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
I just checked and dropping a shortcut to a folder or the folder itself both work fine, the folder is mounted on the Amiga side.
mark_k is offline  
Old 24 February 2013, 09:42   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
I am also trying to support shortcuts in directory filesystems as AmigaOS soft links but it may not be that easy because AOS softlink support is a bit weird.
Toni Wilen is offline  
Old 24 February 2013, 12:38   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
Shortcuts as softlinks done now, at least they appear to work, even shortcuts across volumes if target volume is also mounted as a directory drive.

Question: should softlinks appear on Amiga side with or without .lnk extension?

EDIT: real soft links will be also supported.

Last edited by Toni Wilen; 24 February 2013 at 13:43.
Toni Wilen is offline  
Old 26 February 2013, 20:30   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
I did some brief testing in Windows Vista with a couple of shared folders on the NTFS boot partition. I put a shortcut to the first shared folder in the second shared folder.

Booting Workbench 3.1, CDing to the second shared folder and doing Dir ALL gives an error message: Error, circular directory found
CDing to the shortcut leaves the current dir at the second shared folder.

Booting Workbench 1.3 (still with Kickstart 3.1) and doing the same, this time running Dir from the Workbench 1.3 C directory, prints several nested directories before exiting.

Booting Workbench 1.3 with Kickstart 1.3, doing Dir ALL reports: Could not get information for "WinUAE shared - Shortcut.lnk" - Error 233

So for some reason the emulated machine thinks the soft link to the first shared folder is actually a (recursive) link to the second shared folder.

And Kickstart 1.3 can't handle soft links. Maybe best to disable them under 1.3? Or you could implement them transparently, so for a shortcut to a directory, present that as a normal subdirectory. Probably no point in trying to do that though.

As for shortcut names. It might be best to remove the .lnk since it would shorten file/dir names on the Amiga side. On the other hand, having the .lnk extension would tell the user that the file is a shortcut/softlink.
mark_k is offline  
Old 26 February 2013, 20:38   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
I think you should do some testing with more basic commands than dir all. (like if dir <shortcut.lnk/some/path> or type <shortcut.lnk>/somefile.txt> work and so on). Dir all won't really explain what goes wrong.

I already decided to not to remove .lnk, it separates between shortcuts and real host-side soft links.

Does 1.3 really need special handling? IMHO they were useless previously and still are useless under 1.3.
Toni Wilen is offline  
Old 26 February 2013, 20:56   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Quote:
Originally Posted by Toni Wilen View Post
Does 1.3 really need special handling?
Only if you want to spend lots of time implementing a feature which probably no-one is going to use.
mark_k is offline  
Old 27 February 2013, 13:01   #10
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
Quote:
Originally Posted by mark_k View Post
Only if you want to spend lots of time implementing a feature which probably no-one is going to use.
Useful or not, feature will be implemented if I want to implement it and I wanted to implement this one
Toni Wilen is offline  
Old 27 February 2013, 13:23   #11
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
The problem seems to be that each shortcut in shared folder #1, whether it's to shared folder #2, or to a folder inside shared folder #2, is being treated as a link to shared folder #1. Hence the circular directory found message.

I ran WinUAE with -log but there didn't seem to be any diagnostic/log output related to shortcuts/links. The config I used and some log output are attached.

Maybe worth noting: I had a third shared folder defined in the config, to D:\. But the D: drive was not present when I did the tests.
Attached Files
File Type: 7z Shared_folder_issue.7z (5.8 KB, 136 views)
mark_k is offline  
Old 27 February 2013, 13:27   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
Quote:
Originally Posted by mark_k View Post
The problem seems to be that each shortcut in shared folder #1, whether it's to shared folder #2, or to a folder inside shared folder #2, is being treated as a link to shared folder #1. Hence the circular directory found message.
Oops, when both source and target are in same host drive, it selects first virtual drive that points to this host drive..

I only tested if source and target are in different host drives
Toni Wilen is offline  
Old 27 February 2013, 15:53   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
What kind of directory configuration do you have? Do you have same directory tree partially mounted twice? (for example "d:\blah\blah2" and "d:\blah\blah2\blah3" -> blah3 contents are visible in both "drives")
Toni Wilen is offline  
Old 27 February 2013, 16:15   #14
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
I made two folders on the Windows desktop, "WinUAE shared" and "WinUAE shared 2". Those were defined as shared on the Amiga side as SHARE: (volume name Shared) and SHARE2: (volume name Shared 2).

I created a shortcut to the "WinUAE shared" folder and put it in the "WinUAE shared 2" folder. I also created a shortcut to a folder inside "WinUAE shared", and put that in the "WinUAE shared 2" folder too.

Last edited by mark_k; 27 February 2013 at 18:21.
mark_k is offline  
Old 27 February 2013, 16:44   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
I am not sure if I understood what you meant but winuae.zip updated, some updates + logging added
Toni Wilen is offline  
Old 27 February 2013, 18:45   #16
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Here's the log output for trying to CD to a .lnk then do a Dir ALL on it. It seems Windows is returning the short name version of shortcut destinations? (What would happen if the user has disabled short name creation on their NTFS partition?)
Code:
2013-02-27 17:41:19
19-961 [2221 226=311]: Resolving softlink 'C:\Users\Mark\Desktop\WinUAE shared 2\test2 - Shortcut.lnk'
19-978 [2221 226=311]: -> 'C:\Users\Mark\Desktop\WINUAE~2\TESTFO~1\test2'
19-980 [2221 226=311]: Path not found in any mounted drive
36-369 [3038 226-247]: Resolving softlink 'C:\Users\Mark\Desktop\WinUAE shared 2\test2 - Shortcut.lnk'
36-375 [3038 226-247]: -> 'C:\Users\Mark\Desktop\WINUAE~2\TESTFO~1\test2'
36-383 [3038 226-247]: Path not found in any mounted drive
36-387 [3038 226-297]: Resolving softlink 'C:\Users\Mark\Desktop\WinUAE shared 2\test2 - Shortcut.lnk'
36-395 [3038 226-297]: -> 'C:\Users\Mark\Desktop\WINUAE~2\TESTFO~1\test2'
36-402 [3038 226-297]: Path not found in any mounted drive
36-410 [3039 226=047]: Resolving softlink 'C:\Users\Mark\Desktop\WinUAE shared 2\WinUAE shared - Shortcut.lnk'
36-422 [3039 226=047]: -> 'C:\Users\Mark\Desktop\WINUAE~1'
36-424 [3039 226=047]: Path not found in any mounted drive
58-898 [4166 226-157]: Resolving softlink 'C:\Users\Mark\Desktop\WinUAE shared 2\WinUAE shared - Shortcut.lnk'
58-909 [4166 226-157]: -> 'C:\Users\Mark\Desktop\WINUAE~1'
58-912 [4166 226-157]: Path not found in any mounted drive
58-916 [4166 226-207]: Resolving softlink 'C:\Users\Mark\Desktop\WinUAE shared 2\WinUAE shared - Shortcut.lnk'
58-928 [4166 226-207]: -> 'C:\Users\Mark\Desktop\WINUAE~1'
58-931 [4166 226-207]: Path not found in any mounted drive
mark_k is offline  
Old 27 February 2013, 19:45   #17
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
Apparently path can contain long or short names or both.. Updated, should work now.
Toni Wilen is offline  
Old 27 February 2013, 22:14   #18
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
Yes, it seems to work okay now.

I tried using the MakeLink command in the hope that would create a shortcut in the shared folder, but instead got this log output:
FILESYS: UNSUPPORTED PACKET 3fd

I also tried making a shortcut to a file. The Dir command shows that as a directory in the listing. And (the shortcut was to a .lzh archive) doing lha vv [shortcutname], LhA reported
LhA: Unable to open archive file 'imploder-4.0.lzh'

I don't know whether LhA does that with soft links on an FFS volume or not. The log output on doing that was
Code:
46-402 [31361 223=133]: Resolving softlink 'C:\Users\Mark\Desktop\WinUAE shared 2\imploder-4.0.lzh - Shortcut.lnk'
46-415 [31361 223=133]: -> 'C:\Users\Mark\Desktop\WINUAE~1\IMPLOD~1.LZH'
46-418 [31361 223=133]: 'C:\Users\Mark\Desktop\WinUAE shared' (C:\Users\Mark\Desktop\WinUAE shared)
matched with 'C:\Users\Mark\Desktop\WINUAE~1\IMPLOD~1.LZH' (C:\Users\Mark\Desktop\WinUAE shared\imploder-4.0.lzh), extra = '/imploder-4.0.lzh'
46-430 [31361 223=133]: Match found from 'Shared'
46-434 [31361 223=133]: got target 'Shared:imploder-4.0.lzh'
mark_k is offline  
Old 27 February 2013, 23:57   #19
prowler
Global Moderator
 
prowler's Avatar
 
Join Date: Aug 2008
Location: Sidcup, England
Posts: 10,300
Quote:
Originally Posted by Toni Wilen View Post
I am also trying to support shortcuts in directory filesystems as AmigaOS soft links but it may not be that easy because AOS softlink support is a bit weird.
Toni, would you have an .ADF image you could upload featuring at least one AmigaDOS soft link and preferably at least one hard link too?

I'm sorry to post this request here. I have been reading The .ADF (Amiga Disk File) FAQ, but the way links are implemented in AmigaDOS is still an area of mystery to me and it would be useful to see one or two examples.


Thanks.
prowler is offline  
Old 28 February 2013, 13:04   #20
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,349
If you drag & drop a shortcut to an already-mounted shared folder on the emulation window, WinUAE mounts the folder again. Except this time there's an issue with short filenames; in my case it was mounted as WINUAE~1:
Code:
09-254 [4631 000=105]: filesys_insert(-1,'<?>','C:\Users\Mark\Desktop\WINUAE~1','0','0)
09-256 [4631 000=105]: filesys_insert 1 done!
09-291 [4631 007=108]: FILESYS: inserted volume NR=1 RO=0 'WINUAE~1' ('C:\Users\Mark\Desktop\WINUAE~1')
Also, it may be a good idea to not make the .lnk suffix visible on the Amiga side. If on the Amiga side you rename the soft link/shortcut so it doesn't end in .lnk, WinUAE renames the .lnk file on the Windows side, which turns it into a regular file that Windows no longer recognises as a shortcut.

Last edited by mark_k; 28 February 2013 at 13:14.
mark_k is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen dragging zevs support.FS-UAE 2 25 November 2012 19:33
D3D windowed / full window switch -> black emulation screen Maccara support.WinUAE 4 15 May 2010 15:17
Solid Window dragging WB Retro1234 request.Apps 11 24 January 2010 11:09
Screen dragging MickJT request.UAE Wishlist 2 02 January 2008 18:25
Transparent icon dragging oldpx support.Apps 2 05 September 2002 06:17

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:07.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10727 seconds with 14 queries