Page 1 of 1

Single File Deploy with downloadable .NET

Posted: Sat Aug 20, 2011 6:14 am
by rmarma
Hi

I would like to create a single file that contains my setup so I used the Single File option.

My application depends on .NET. If I select from the Application Runtimes ".NET Framework 2.0", it seems to embed the .NET Framework in the setup.
I would like the .NET framework to be downloaded if needed but not included in the setup binary itself.

I tried Web Deploy but it generates multiple files instead of one.

Can you help?

Re: Single File Deploy with downloadable .NET

Posted: Sat Aug 20, 2011 1:51 pm
by giaviv
Web Deploy is the way to go.

InstallAware has a feature called Web Media Blocks. Each such block is a defined region inside your MSIcode and is defined by the command Define Web Media Block. The block's region starts at its definition, and ends when another block is defined.

Whatever files are being referenced by block's region are all compiled into a 7zip file and can be uploaded to a server and downloaded from there (the url(s) from which the block will be downloaded is defined in the Define Web Media Block command).

Each runtime pre-requisite you use is automatically encapsulated inside a block so it can be later downloaded. So my guess is you are either including more than one runtime, each of which is being compiled into a block, or you have defined your own block.

The content of an offline block are compiled into the main application EXE, so you can find all the Define Web Media Block commands and change them (minus the .NET one ) to OFFLINE.

Re: Single File Deploy with downloadable .NET

Posted: Sun Aug 21, 2011 4:38 am
by rmarma
Much clearer and quite nice. Thank you.

When I include the .NET framework, the default URL specified in the WEB MEDIA block is of the form:

http://mydomain.comMicrosoft .NET Framework 2.0.7zip

which is obviously wrong.

Can you recommend a URL to use for the .NET Framework 2.0? Is there a different URL for 32 v/s 64 bit?

Do I need to handle in the MSI Code which .NET version to download depending on the target machine processor (32/64)?

My application is a .NET application that supports both platforms and I have included in the setup the code to Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode

Re: Single File Deploy with downloadable .NET

Posted: Sun Aug 21, 2011 2:38 pm
by giaviv
The URL that you need the input is a URL from which the 7zip block can be downloaded.

When you build your setup, upload the resulting 7zip blocks to a web hosting. Make sure you specify this URL in your block before building the setup.

As per your x86/x64 question, yes - you do need to account for these different platforms.

When you check a pre-requisite, to scripts are added to your installer - a check script, and a setup script. The check script checks for the presence of the runtime, and the setup script actually installs the runtime if it is missing.

This script are automatically included in your installer when you check a runtime using the Include Script command. Browse your MSIcode and look for these commands.

To support both x86 and x64:
1) check both runtime pre-requisite (x86 and x64) in the Design tab
2) acquire the 64 bitness of the target machine using the Get System Settings command
2) wrap the Include Script commands with an If.. Else.. block like so:

Code: Select all

If Variable ISWINDOWS64BIT Equals TRUE
    Include Script check_xxxxxx_x64
Else
    Include Script check_xxxxxx
End

...and then later...
If Variable ISWINDOWS64BIT Equals TRUE
    Include Script setup_xxxxxx_x64
Else
    Include Script setup_xxxxxx
End


Re: Single File Deploy with downloadable .NET

Posted: Sun Aug 21, 2011 8:54 pm
by rmarma
Got it. Thanks for the great support.

Re: Single File Deploy with downloadable .NET

Posted: Sun Aug 21, 2011 9:56 pm
by giaviv
No worries!

Re: Single File Deploy with downloadable .NET

Posted: Tue Aug 23, 2011 5:10 am
by rmarma
I have the .NET 2.0 32 and 64 configured as a Web Media Blocks.
I have uploaded the Web Media Blocks to my web site and properly configured the URL. All is working great.

Every time I build the setup, the setup repackages the .net 2.0 32 and 64 into .7z files which takes a long time.
Since these packages are not changing, it would be nice to have an option to skip the generation of these files when performing builds.

Thanks.

Re: Single File Deploy with downloadable .NET

Posted: Tue Aug 23, 2011 9:14 am
by giaviv
You do have an option to do that - see the Web Media Blocks section in the Design tab.

Re: Single File Deploy with downloadable .NET

Posted: Tue Aug 23, 2011 5:25 pm
by rmarma
Just what I wanted. Perfect.