Archive: $EXEPATH or $EXEFILE


$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?


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. :)


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?


I vote for $EXEFULLPATH. Having constants named $EXEDIR and $EXEFULLPATH seems clear to me.


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.


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


$EXEDIR\$EXEFILE

$EXENAME might confusing with NAME ( ${NAME} )

a name is for me a title (window/message)


I ended up adding $EXEFILE on top of $EXEPATH because I need $EXEPATH internally.


because I need $EXEPATH internally
whatfor? :)

!{if} ($EXEPATH reserved for internally)
all_with_name:
$EXEPATHNAME = $EXEDIRNAME + $EXEFILENAME
!{else}
all_without_name:
$EXEPATH = $EXEDIR + $EXEFILE
!{endif}


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.


Junior Member, Sir.