uweb
23rd November 2011 18:16 UTC
one installer for 2 os
Hi all
I plan to have one installer for 32 & 64 bit. So some files are redundant as in the following snippet:
SetOutPath c:/foo
File "c:/bar/32bit/aha.exe
File "c:/bar/64bit/aha.exe
Depending to the value of ${RunningX64} the installer should installer only one of the files. Can't get that working - not possible or a thinking mistake ?
Point is that a construct like
${If} ${RunningX64}
File "c:/bar/64bit/aha.exe
${Else}
in my installer includes only one file
Cheers
Uwe
LoRd_MuldeR
24th November 2011 00:24 UTC
You are missing then ${EndIf}:
${If} ${RunningX64}
File "c:/bar/64bit/aha.exe
${Else}
File "c:/bar/32bit/aha.exe
${EndIf}
uweb
24th November 2011 09:58 UTC
Hi @LoRd_MuldeR
Sorry for my cryptic example, I have used a correct If-Else-endIf Block. But I decided to double check and it seems to work as expected. What have puzzled me, was that the final installer always had the same size.
Thanks for your food for thought
Uwe
MSG
24th November 2011 11:07 UTC
Originally posted by uweb
What have puzzled me, was that the final installer always had the same size.
This is as it should be. Your installer needs to install properly on both x64 and x86 platforms, so it needs to carry both versions of your exe.
The reason that this works is that file compression by the File command is executed at compile-time, while the x64 evaluation is runtime. So the compiler evaulates both File commands and compresses both exes into installer.exe.