- NSIS Discussion
- $EXEPATH or $EXEFILE
Archive: $EXEPATH or $EXEFILE
kichik
20th April 2007 12:02 UTC
$EXEPATH or $EXEFILE
I've just added a new constant for NSIS 2.26 called $EXEPATH which holds the complete path to the installer. But I'm having second thoughts regarding the name. It might be a bit confusing as there already is a variable called $EXEDIR. So, what do you think? $EXEPATH, $EXEFILE or something completely different?
{_trueparuex^}
20th April 2007 13:01 UTC
Well "path" can mean path to file or folder, but "file" can only mean path to file. So absolutely $EXEFILE. Also I personally consider "path" as path to folder more than path to file. :)
Comm@nder21
20th April 2007 13:14 UTC
well, $EXEPATH would then be $EXEDIR\setup.exe?
i'd rather choose $EXEFILE and just store "setup.exe" in it.
so you can use $EXEFILE, $EXEDIR or $EXEDIR\$EXEFILE however you need. it's the most flexible way.
what about $EXENAME instead of $EXEFILE?
dienjd
20th April 2007 15:52 UTC
I vote for $EXEFULLPATH. Having constants named $EXEDIR and $EXEFULLPATH seems clear to me.
Red Wine
20th April 2007 16:44 UTC
I'm on the side of your second thoughts, $EXEPATH might be somehow confusing with $EXEDIR, I think $EXEFILE is pretty clear thus I vote $EXEFILE.
Afrow UK
21st April 2007 23:46 UTC
I think having $EXENAME with just the executable name in it would be better, which we can use in conjunction with $EXEDIR as already mentioned.
Stu
Brummelchen
22nd April 2007 04:37 UTC
$EXEDIR\$EXEFILE
$EXENAME might confusing with NAME ( ${NAME} )
a name is for me a title (window/message)
kichik
24th April 2007 20:09 UTC
I ended up adding $EXEFILE on top of $EXEPATH because I need $EXEPATH internally.
Comm@nder21
25th April 2007 08:34 UTC
because I need $EXEPATH internally
whatfor? :)
pozbremser
25th April 2007 14:15 UTC
!{if} ($EXEPATH reserved for internally)
all_with_name:
$EXEPATHNAME = $EXEDIRNAME + $EXEFILENAME
!{else}
all_without_name:
$EXEPATH = $EXEDIR + $EXEFILE
!{endif}
kichik
25th April 2007 19:57 UTC
I need $EXEPATH internally for some optimization for which is was added in the first place ;)
pozbremser, I get two warnings with your script. all_with_name and all_without_name are unreferenced labels.
pozbremser
26th April 2007 09:45 UTC
Junior Member, Sir.