Skip to content
⌘ NSIS Forum Archive

Trying to use makensis on linux

4 posts

remleduff#

Trying to use makensis on linux

I followed these "instructions" to get nsis working under linux (I know it's probably not supported, but it seems to be mostly working).

xDev Software adalah blog yang menyajikan informasi seputar teknologi, internet, dan berbagai aplikasi untuk beragam kebutuhan.


I am getting a weird warning that I don't see when runing makensis under Windows though. Here's a snippet of my nsi file.


# Installer functions
Function .onInit
InitPluginsDir
!insertmacro IsUserAdmin $0
StrCpy $Administrator $0
${Select} $0
${Case} "1"
StrCpy $INSTDIR "$%PROGRAMFILES%\$(^Name)"
SetShellVarContext all
${Case} "0"
StrCpy $INSTDIR "$%USERPROFILE%\$(^Name)"
${EndSelect}
FunctionEnd
The warnings are:
unknown variable/constant "%PROGRAMFILES%\$(^Name)" detected, ignoring (/Project/installer.nsi:182)
unknown variable/constant "%USERPROFILE%\$(^Name)" detected, ignoring (/Project/installer.nsi:185)
kichik#
Windows environment variables aren't available on Linux. You've used $%PROGRAMFILES% which is the path to Program Files on your computer instead of $PROGRAMFILES which is the path on the user's computer.