Archive: one installer for 2 os


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


You are missing then ${EndIf}:

${If} ${RunningX64}
File "c:/bar/64bit/aha.exe
${Else}
File "c:/bar/32bit/aha.exe
${EndIf}

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


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.