Page 1 of 1
Creating a single package for x64 & x86
Posted: Mon Jun 06, 2011 4:04 am
by shanep
Hi there,
One of the selling points I liked with InstallAware was the ability to create a single package for both x64 & x86. Yet I dont have a clue how to do it.
I have a .net 4 wpf application that requires sql ce4.
How do I create an install package that automatically checks what type of OS the user has and installs the correct version of the requirements?
If I click on the x86 & 64 .net requirements and SQL CE 4 and build the package. Deploying fails due to trying to install the other version.
Does this have to be scripted?
Re: Creating a single package for x64 & x86
Posted: Mon Jun 06, 2011 7:00 am
by giaviv
Hi shanep,
This is actually extremely simple. You can get whether the user is running a 64Bit machine using the Get System Settings command on the Is Windows in 64 Bit Mode capability. Insert the result into the variable ISWINDOWS64BIT.
Then, add both the x86 and x64 versions of your runtimes. Scroll down your MSIcode and find where InstallAware emitted the Include Script command for the runtime scripts. There will be 4 such scripts - 2 check scripts, x86 and x64, and 2 setup scripts, x86 and x64.
Wrap each set of scripts with an if / else block like so:
If Variable ISWINDOWS64BIT Equals TRUE
Include Script check.....x64
Else
Include Script check.....x86
End
.....and then later
If Variable ISWINDOWS64BIT Equals TRUE
Include Script setup.....x64
Else
Include Script setup.....x86
End
Re: Creating a single package for x64 & x86
Posted: Mon Jun 06, 2011 5:37 pm
by shanep
Thanks Giaviv,
That points me in the right direction. But i am having problems trying to add the if else statements
I have found the area in the script that has
[DEFINE WEB MEDIA Microsoft SQL Server Compact Edition 4.0 (x64)]
Include Script: setupsqlcompact4_x64
I have created the variable for the 64bit enviroment ok
How am I meant to add the
If Variable ISWINDOWS64BIT Equals TRUE
Include Script check.....x64
Else
Include Script check.....x86
End
I try to type the if statement however if I click to a new line or press enter the statement is been lost.
No matter what I try to do I cant seem to get it to work.
Re: Creating a single package for x64 & x86
Posted: Mon Jun 06, 2011 6:17 pm
by giaviv
To insert a new command, select the desired line (even if it is not empty - the old line will be moved down) and start typing the name of the command (El...).
When InstallAware autocompletes your input, press enter and that should do it. Your code should look like this:
If Variable ISWINDOWS64BIT Equals TRUE
Include Script: setupsqlcompact4_x64
Else
Include Script: setupsqlcompact4_x86
End
........
If Variable ISWINDOWS64BIT Equals TRUE
[DEFINE WEB MEDIA Microsoft SQL Server Compact Edition 4.0 (x64)]
Include Script: setupsqlcompact4_x64
Else
[DEFINE WEB MEDIA Microsoft SQL Server Compact Edition 4.0 (x86)]
Include Script: setupsqlcompact4_x86
End
Re: Creating a single package for x64 & x86
Posted: Mon Jun 06, 2011 6:21 pm
by shanep
Ignore that.
I was trying to write the script by hand. turns out you have to use the drag and drop feature on the right.
Re: Creating a single package for x64 & x86
Posted: Tue Jun 07, 2011 9:04 am
by giaviv
You can actually do both
