I am using that bit mode setting, but I only put that in my 64 bit build and I also used ArchitecturesAlowed just in the 64 bit build.
But I see now from the notes that I don’t need to set the allowed flag. So the docs are a bit misleading.
So with the install 64 bit enabled the installer will install to 64 on a 64 pc. And it will install to 32 on a 32 pc. Right.
And, instead of using a IsWin64 check clause I use a Is64bitInstallmode check. And group 64 files first. Then 32 and then common. And use that solid break.
I can make all those changes. But:
1. If 64 bit install then I want the app name as xxx (x64). Otherwise xxx (x86). So I do need two instances of my script where the 64 bit has a constant defined. Pity Inno does have a flag to add (x64) etc so something to avoid this.
2. The 64 bit release build files are in a different folder to the 32. And we have to set the source to something. The example assumes all files are in the same release folder.
The moment the sourcedir is set then one or other will need a new relative path. I guess a constant can be defined for that. Eg
Set source dir to 64
Set 32 constant relative to 64
So point 2 above will let me have all files in one script. But point 1 still implies two scripts. You see I need to let user to install both bit editions and they show as two distinct apps in add / remove. There are reasons for this
Maybe I could pass the build mode as a constant on the command line. /DPLATFORM_TARGET=x64 for my 64 bit build. Then the ifdef can be used. When it is not passed the 32 bit name be used.
I will try later today.