I try to portabilize an app developement in 32 & 64bit architecture.
The versions of program are stored in:
%PAL:AppDir%\program32
%PAL:AppDir%\program64
In %PAL:DataDir% there's a folder:
SETUP
and a file
program.ini.
Execute the right version of the program is simply:
[Launch]
ProgramExecutable64=program64\program.exe
ProgramExecutable=program\program.exe
My goal is move the folder SETUP and the program.ini file in the folder content the right 32/64 version of program.
I've created a custom.nsh file put in %PAL:AppDir%\AppInfo\Launcher folder:
${SegmentFile}
${SegmentInit}
${If} $Bits = 64
${SetEnvironmentVariablesPath} FullAppDir $EXEDIR\App\program64
${Else}
${SetEnvironmentVariablesPath} FullAppDir $EXEDIR\App\program
${EndIf}
!macroend
It's not flour on my sack.
I found it somewhere and tried to adapt it to my needs.
If I did not understand, create the FullAppDir variable containing the path I need
Then
[FilesMove]
program.ini=%FullAppDir%
[DirectoriesMove]
SETUP=%FullAppDir%
But not working...
A little bit of help will be appreciated