I currently have two WIX installers for a product that I maintain. One for 32-bit operating systems, and one for 64-bit operating systems. Instead of maintaining two separate installers, I want to combine them into one NSIS installer that can "determine" the "bitness" of the OS and then copy the appropriate binaries into the program directory. Has anyone had any experience with this and could provide a working sample script that NSIS can use to make the installer?
x64.nsh has some helper macros and you can install into $programfiles32
or $programfiles64
Edit:
Function .onInit
StrCpy $instdir $programfiles32\MyApp
${If} ${RunningX64}
StrCpy $instdir $programfiles64\MyApp
${EndIf}
FunctionEnd
...
Section
Setoutpath $instdir
${If} ${RunningX64}
File /r build\64\*
${Else}
File /r build\32\*
${EndIf}
SectionEnd
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With