[LUAU] Windows shortcut equivalent in Linux
Thomas Ryan Gordon Sr
memeyou at memeyou.net
Tue May 18 20:22:28 PDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vikram Khurana wrote:
| The reason I can't do cd ~ is because it may or may not be in the
| home directory. Here is why. The way I intend to distribute this
| program is by zipping up the directory tree which looks like
|
| /Parse/Linux/<Linux executable> /Parse/Windows/<Windows executable>
| /Parse/123.dat
|
| Now the user could save this anywhere they want. Now in Win I can
| tell people to create a shortcut to /<some
| directory>/Parse/Windows/<Windows executable> & place it in any
| folder they want. The 123.dat file is read relative to the
| executables.
|
| How do I do the same in Linux?
|
| Hope I explained it better this time...
|
technically doing the same would probably make this a gnome/kde issue
as their launchers are most like a windows shortcut. tell the linux
user to make a launcher for the file. at any rate, set the absolute
path of the file in your script, $0 will give you the relation between
the executable and the path it's being executed from. heres an
example, bear in mind that i don't know or like perl...
/home/memeyou/Parse/Linux/Parse.ui:
#!/usr/bin/perl
if ($0 =~ /^(.*[\/]).*$/) {
~ my($path) = $1."../";
~ print "my path is \"$path\"! xyz.dat must be in
\"$path"."xyz.dat\"!\n";
}
you can run this from any launcher/shortcut and it knows where xyz.dat
is. it should also work for windows and linux.
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAqtL0SM0VWiAMmtsRApCBAJ0Sh7vKmepz9Pn844RtkuseZtBRIwCfcHxP
pPMaR16cmCJa2+oD5sB+TOo=
=xKXO
-----END PGP SIGNATURE-----
More information about the LUAU
mailing list