Is it possible to Include Files based on Compiler Variable ?

For all your non-technical questions.
BenCour
Posts: 4
Joined: Fri Jan 12, 2007 10:09 am

Is it possible to Include Files based on Compiler Variable ?

Postby BenCour » Fri Jan 12, 2007 10:38 am

Here is my problem

With the same Installation project I want to generate 2 different output based on compiler variable.

Let say that for my project1 I want to instal the following files

File1,
File2, (Readme located at c:\\Readme1\\Readme.txt)
File3,

For My project 2 I want to install the following files
File 1,
File2, (Readme located at c:\\Readme2\\Readme.txt)


I found out how not to install File3 in my second output based on a compiler variable but the problem is that the file is still being included in the resulting installation executable. Basically what I want is to prevent the file # 3 from being included in the resulting setup based on a Compiler variable. I absolutly need to do this in order to reduce the size of my second output. Is it possible to do this ? if yes how ? where should I put the code.

Also how can I change the source path of a file based on a compiler variable. As stated for file # 2 in my sample. I want to change the path of my readme file based on a compiler variable.

Is there anyway to achieve this ?

I hope Im clear enough

Thanks in advance for your help,

Ben

Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Postby Gizm0 » Fri Jan 12, 2007 11:00 am

You should use the Install Files with proper exclusions.

Check the variable you want and include the proper install files command something like

if VAR is TRUE
Install Files 1 (with readme 1, 2)
else
Install Files 2 (without readme 2)
end
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation

BenCour
Posts: 4
Joined: Fri Jan 12, 2007 10:09 am

Postby BenCour » Fri Jan 12, 2007 11:13 am

Thanks Gizmo,

Thats what I did but the problem is that the file is still being included in the resulting setup.exe. Its not being installed but its present.

I would like for my second setup to exclude the file3 from the package in order to reduce the size.


Thanks,

Ben

CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Postby CandiceJones » Fri Jan 12, 2007 2:22 pm

If you want to exclude using a compiler variable, the syntax is very similar to the If syntax that Gizm0 has shown, except you will need to use Compiler Variable If, Compiler Variable Else, and Compiler Variable End commands, in place of If/Else/End commands.

You can also use the Web Media Block command to download-on-demand the effected files. This way you do not need to build multiple setups (but of course, compiler variables are still handy).

So just go to the Project Options window, define your custom compiler variable there, edit your MSIcode to use the Compiler Variable commands, and you're set!
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

BenCour
Posts: 4
Joined: Fri Jan 12, 2007 10:09 am

Postby BenCour » Mon Jan 15, 2007 11:02 am

It works, thanks for your help.


Return to “Non-Technical”

Who is online

Users browsing this forum: No registered users and 32 guests