You are here

Question regarding the constant $EXEDIR and the variable $INSTDIR

7 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
Question regarding the constant $EXEDIR and the variable $INSTDIR

Assuming the installer AppnamePortable_x.xx.x.paf.exe will installed the appropriate app at X:\PortableApps\AppnamePortable. Are the following 2 statements correct?:

$INSTDIR=X:\PortableApps\AppnamePortable
$EXEDIR=X:\PortableApps\AppnamePortable
Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Yes

I think so.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
Defintion in the NSIS documentation

In the documantation of NSIS the constant $EXEDIR is defined as follows:

The directory containing the installer executable (technically you can modify this variable, but it is probably not a good idea).

However, if my above assumption would be correct, then must reside the file "AppnamePortable_x.xx.x.paf.exe" (this is the installer executable) in the folder AppnamePortable. Instead the folder AppnamePortable contains the launcher executable "AppnamePortable.exe".

Also I suspect, that $EXEDIR and $INSTDIR should differ.

depp.jones
Offline
Last seen: 22 hours 20 min ago
DeveloperTranslator
Joined: 2010-06-05 17:19
To begin with, NSIS is a

To begin with, NSIS is a language to build installers. That is "abused" to build a launcher instead and therefore the launcher in this case is the installer from a NSIS point of view.
Obviously I was wrong...

John T. Haller
John T. Haller's picture
Online
Last seen: 43 min 15 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Nope

EXEDIR is the directory containing the currently running installer. So, it's wherever you run AppnamePortable_x.xx.x.paf.exe from which could be the desktop if the user downloaded and ran it themselves or somewhere in TEMP if they are using the app store/updater.

For launchers EXEDIR is wherever AppNamePortable.exe is running from and INSTDIR is NOT USED.

Sometimes, the impossible can become possible, if you're awesome!

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
use of $EXEDIR in conjunction with the file "custom.nsh"

If I use the constant $EXEDIR in conjunction with the creation of the file "custom.nsh", refers then the constant $EXEDIR to the folder AppnamePortable where AppNamePortable.exe is running from?

John T. Haller
John T. Haller's picture
Online
Last seen: 43 min 15 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Installer vs Launcher

As already explained. If you are doing something in conjunction with the launcher (which uses custom.nsh) it would be where AppNamePortable.exe is running from.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments