cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Christian1984
Level 4

Setup for x86/x64 Software

Hi,

I'm trying to create a setup for a software where there is an x86 and an x64 Version. I would like to have both components in one setup. I read that I can do this by creating two Basic MSI projects and then somehow combining them by using an installscript bootstrapper but I can't find any Information on how i can creat such a boostrapper. Can anyone help?

With kind regards
Labels (1)
0 Kudos
(8) Replies
Tobias79
Level 5

Hi,

I'd recommend trying to keep this in one solution and not creating 2 solutions for x86 and x64 as this causes more maintenance effort and errror risk due to forgotten configuration settings in one of these packages is higher.

A good way to do so was written by DanGalendar here:
http://community.flexerasoftware.com/showthread.php?t=189714

For a bootstrapper in general the approach is to create an "archive" containing both installers (x86 and x64). When starting this package then the corresponding installer is started.

Best regards
Tobias
0 Kudos
Christian1984
Level 4

Hi,

that sounds interesting. But if I'm understanding it correctly this means, that I would have one project which would then create two different setups. One for x86 and one for x64. Is that right?
My preferred option would be to have on setup for both "components".

With kind regards
0 Kudos
Tobias79
Level 5

Christian1984 wrote:
But if I'm understanding it correctly this means, that I would have one project which would then create two different setups. One for x86 and one for x64. Is that right?
With kind regards


Yes that's right.

It depends on the application structure if there is the need for an x64 installation or if it is possible to serve both processor architectures with an x86 app (running in wow64 mode on x64). So first of all you have to clarify this.

An installation package serving both architectures natively (e.g. as the .Net 4 Framework) includes x86 and x64 installation(s) in one bootstrapper. So if there is the need for deploying both architectures natively there must be such a bootstrapper construct.

Best regards
Tobias
0 Kudos
Christian1984
Level 4

Thanks. That works well so far.

But coming back to creating the bootstrapper: Do you have a tutorial or a description on how to create one? I'm not quite sure how to handle this. The basic idea is clear to me but i have problems on how to do it in istallshield.

With kind regards
0 Kudos
Tobias79
Level 5

Hi Christian,

Sorry no idea how to create such a package using installScript installer.


Maybe some other approach using winrar SFX archive and a batch for distinguishing between the two installers (Use it on your own risk, just did it quick and dirty):

Create a batch file starting the corresponding installer (here 32_64bitSelector.bat):
::comp. http://blogs.msdn.com/b/david.wang/archive/2006/03/26/howto-detect-process-bitness.aspx
IF /I "%PROCESSOR_ARCHITECTURE%"=="x86" (
IF /I "a%PROCESSOR_ARCHITEW6432%"=="a" (
start /wait /b files\32Bit_Setup.exe
goto end
)
)

start /wait /b files\64Bit_Setup.exe
:end


Then there is need for a winrar SFX file (Something like WinRar configuration - Check parameters in WinRar help - here C:\32_64bit\test.sfx):
Setup=files\32_64bitSelector.bat
Silent=2
TempMode


Then compress the files (here:
C:\32_64bit\files\32Bit_Setup.exe
C:\32_64bit\files\32_64bitSelector.bat
C:\32_64bit\files\64Bit_Setup.exe )

to an SFX archive using the following command:

C:\32_64bit>"c:\Program Files\WinRAR\WinRAR.exe" a -r -ep1 -sfx -zC:\32_64bit\test.sfx Installer.exe  C:\32_64bit\files


Best regards
Tobias
0 Kudos
Christian1984
Level 4

Sorry, but Winrar isn't an option here.
Doesn't anyone have an idea how to create such a bootstrapper? I have been searching the web for quite a while now and not found a single thing 😞

With kind regards
0 Kudos
Tobias79
Level 5

Ok just figured out using a InstallScript project isn't too complicated. Try something like following (Am not so common to this project type so be careful using the given instruction):

- Create InstallScript Project
- Installation Designer View:
- Support Files: Add the installers and needed files for x86 + x64 to Support Files Language Independent
- InstallScript: Select Initialization and modify OnSetTARGETDIR to something like following:

//---------------------------------------------------------------------------
// OnSetTARGETDIR
//
// OnSetTARGETDIR is called directly by the framework to initialize
// TARGETDIR to it's default value.
//
// Note: This event is called for all setups.
//---------------------------------------------------------------------------
function OnSetTARGETDIR()
string szInstall;
begin
if (SYSINFO.bIsWow64 !=0) then
szInstall = SUPPORTDIR ^ "setup_x64.exe";
MessageBox("x64",INFORMATION);
else
szInstall = SUPPORTDIR ^ "setup_x86.exe";
MessageBox("x86",INFORMATION);
endif;

LaunchAppAndWait (szInstall, "", WAIT);

abort;
return 0;
end;


Releases: Release Wizzard (context menu): Default settings except following settings:
Create a single file executable
Display small initialization dialog

Should do it 🙂
0 Kudos
Christian1984
Level 4

Thanks. That seems to work.

With kind regards
0 Kudos