The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
RWops and MS windows .lnk files
cal at splitreflection...
Guest

On *nix symbolic links are transparent unless the app happens to deliberately look. The MS windows equivilent, .lnk files, need deliberate processing by the app. Since SDL is a compatability layer, intended to hide system dependent nastyness, would it be appropriate for SDL_RWFromFile() to handle .lnk indirection? If not, is there an easy way to handle it in my programs?
RWops and MS windows .lnk files
Bill Kendrick
Guest

On Tue, Jan 03, 2006 at 04:00:51PM +0000, cal at splitreflection.com wrote:
Quote:
On *nix symbolic links are transparent unless the app happens to
deliberately look. The MS windows equivilent, .lnk files, need
deliberate processing by the app. Since SDL is a compatability
layer, intended to hide system dependent nastyness, would it be
appropriate for SDL_RWFromFile() to handle .lnk indirection? If
not, is there an easy way to handle it in my programs?

Coming from a person who thinks Windows shortcuts are utterly retarded,
yes, I think this would be nice. One less retarded thing to worry about
when porting.

-bill!
(who discovered how crappy shortcuts were back in Win95, when a stupid
app decided to rename "some-important-file.ext" into "bill's-folder.lnk",
thus trashing the link and losing the important file's contents forever.)
RWops and MS windows .lnk files
Simon Roby
Guest

On Tue, 3 Jan 2006 16:0:51, cal at splitreflection.com
<cal at splitreflection.com> wrote:
Quote:
On *nix symbolic links are transparent unless the app happens to deliberately look. The MS windows equivilent, .lnk files, need deliberate processing by the app. Since SDL is a compatability layer, intended to hide system dependent nastyness, would it be appropriate for SDL_RWFromFile() to handle .lnk indirection? If not, is there an easy way to handle it in my programs?

I'll say this first because it annoys me whenever I hear someone say
that: Windows .lnk shotcuts are equivalent to KDE/Gnome .desktop
files, NOT symbolic links. There is NO symlink equivalent in Windows.

With that said, AFAIK Windows shortcuts are always handled through the
Windows file management facilities (ie. the explorer, or file open
dialogs) and never by applications, so I don't think SDL should handle
them.
RWops and MS windows .lnk files
Ricardo Cruz
Guest

Em Quarta, 4 de Janeiro de 2006 01:17, o Simon Roby escreveu:
Quote:
On Tue, 3 Jan 2006 16:0:51, cal at splitreflection.com

<cal at splitreflection.com> wrote:
Quote:
On *nix symbolic links are transparent unless the app happens to
deliberately look. The MS windows equivilent, .lnk files, need
deliberate processing by the app. Since SDL is a compatability layer,
intended to hide system dependent nastyness, would it be appropriate for
SDL_RWFromFile() to handle .lnk indirection? If not, is there an easy
way to handle it in my programs?

I'll say this first because it annoys me whenever I hear someone say
that: Windows .lnk shotcuts are equivalent to KDE/Gnome .desktop
files, NOT symbolic links. There is NO symlink equivalent in Windows.

With that said, AFAIK Windows shortcuts are always handled through the
Windows file management facilities (ie. the explorer, or file open
dialogs) and never by applications, so I don't think SDL should handle
them.

No, that is not completely correct. KDE/Gnome desktop shortcuts only provide
a small subset of features that could not be provided through symbolic links;
that is to start applications with arguments, link to a file through a
network protocol, and I think that's all.

Windows shortcuts are also used to do shortcuts to directories, since no
facility exists at the filesystem-level. The problem is that the user land
applications have to worry about this stupid links. And worse, if you choose
a shortcut file in the Windows file chooser, it will return the shortcut
file, not the location it points to, since you might very well want to choose
the shortcut file. So no, you can't even rely on the open dialog.
Even Microsoft realizes that this is problem, and are going to ship Vista
with support for symbolic links.

Small rant: KDE has been abstracting the Linux ugly directory tree through
media:/, home:/, trash:/. This breaks applications that are launched through
KDE filemanager or applications that don't use KDE libs, but do use the file
chooser (like Suse's OpenOffice). Rule of thumb is to implement file system
features at a low level, not at the application. Supporting such behavior
will just make matters worse. As a matter of fact, there are efforts to
support KDE-like network protocols in the kernel (through FUSE), so that
everybody benefits from it.

Cheers,
Ricardo
--
Don't be humble ... you're not that great.
-- Golda Meir
RWops and MS windows .lnk files
Paulo Pinto
Guest

There are ways to handle shell shortcuts with
Win32 code. Just take a look to

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_programming/shortcuts/shortcut.asp

Look for the ResolveIt() sample code.

But I must admit that this code is a pain
compared to the simplicity of Unix symbolic links.


Cheers,
Paulo

Quoting Ricardo Cruz <rpmcruz at clix.pt>:

Quote:
Em Quarta, 4 de Janeiro de 2006 01:17, o Simon Roby escreveu:
Quote:
On Tue, 3 Jan 2006 16:0:51, cal at splitreflection.com

<cal at splitreflection.com> wrote:
Quote:
On *nix symbolic links are transparent unless the app happens to
deliberately look. The MS windows equivilent, .lnk files, need
deliberate processing by the app. Since SDL is a compatability layer,
intended to hide system dependent nastyness, would it be appropriate for
SDL_RWFromFile() to handle .lnk indirection? If not, is there an easy
way to handle it in my programs?

I'll say this first because it annoys me whenever I hear someone say
that: Windows .lnk shotcuts are equivalent to KDE/Gnome .desktop
files, NOT symbolic links. There is NO symlink equivalent in Windows.

With that said, AFAIK Windows shortcuts are always handled through the
Windows file management facilities (ie. the explorer, or file open
dialogs) and never by applications, so I don't think SDL should handle
them.

No, that is not completely correct. KDE/Gnome desktop shortcuts only provide

a small subset of features that could not be provided through symbolic links;

that is to start applications with arguments, link to a file through a
network protocol, and I think that's all.

Windows shortcuts are also used to do shortcuts to directories, since no
facility exists at the filesystem-level. The problem is that the user land
applications have to worry about this stupid links. And worse, if you choose

a shortcut file in the Windows file chooser, it will return the shortcut
file, not the location it points to, since you might very well want to choose

the shortcut file. So no, you can't even rely on the open dialog.
Even Microsoft realizes that this is problem, and are going to ship Vista
with support for symbolic links.

Small rant: KDE has been abstracting the Linux ugly directory tree through
media:/, home:/, trash:/. This breaks applications that are launched through

KDE filemanager or applications that don't use KDE libs, but do use the file

chooser (like Suse's OpenOffice). Rule of thumb is to implement file system
features at a low level, not at the application. Supporting such behavior
will just make matters worse. As a matter of fact, there are efforts to
support KDE-like network protocols in the kernel (through FUSE), so that
everybody benefits from it.

Cheers,
Ricardo
--
Don't be humble ... you're not that great.
-- Golda Meir

_______________________________________________
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.