Hello,
I want to be able to build installers for multiple rebrands of one of our products (ie. same product, different name basically) and would like to be able to use the same installaware project for this. This in theory should be possible to do using compiler variables for all the things in the "Project options" tab and normal variables for most everything else however I have lots of these that need to be set as compiler variables, almost everything in the project options needs to be customized. Setting them all on the command line doesn't seem like a very nice solution, if in fact even possible (isn't there some limit to how long a command line can be?).
What is the preferred way of handling this? I want to be able to build from the command line and would like to be able to pass as few compiler variables on the command line as possible, ideally I'd like to be able to only pass one variable on the command line specifying which rebrand I'm building.
I'm using IA version 8 if that matters.
Thanks,
Erik
Many compiler variables (rebrand of a product)
Erik,
I wonder if you have not answered your question indirectly?
Could you not set one compiler variable and use its value to control what you build?
For example: BRAND=CompanyX or BRAND=CompanyY and then set buildtime variables in response to the value that's defined?
I wonder if you have not answered your question indirectly?
Could you not set one compiler variable and use its value to control what you build?
For example: BRAND=CompanyX or BRAND=CompanyY and then set buildtime variables in response to the value that's defined?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP
Thanks for your reply.bokkie wrote:Erik,
I wonder if you have not answered your question indirectly?
Could you not set one compiler variable and use its value to control what you build?
For example: BRAND=CompanyX or BRAND=CompanyY and then set buildtime variables in response to the value that's defined?
What you are suggesting is exactly what I'd like to do, the problem is that I haven't been able to do it. I guess I haven't figured out how to set compile time variables from a script. How would one do that? I've found the "compiler if variable" statement but no "compiler set variable" and the normal "set variable" doesn't seem to be doing the trick for me.
Thanks,
Erik
Hi Erik,
I don't think compiler variables can be set from the script.
Are you sure the commandline is too short to set all your options?
If it works over the commandline, you can use batch files to build certain configurations, or even better a build tool like FinalBuilder.
If the commandline is indeed too short, you could start playing around with the project file. Either have multiple copies of it, or write directly into it to set the default values for the compiler variables. But that's where it starts to get messy.
Rgds
Richard
I don't think compiler variables can be set from the script.
Are you sure the commandline is too short to set all your options?
If it works over the commandline, you can use batch files to build certain configurations, or even better a build tool like FinalBuilder.
If the commandline is indeed too short, you could start playing around with the project file. Either have multiple copies of it, or write directly into it to set the default values for the compiler variables. But that's where it starts to get messy.
Rgds
Richard
http://www.pointline.com
http://www.paraeasy.ch
http://ulrichard.ch
http://www.paraeasy.ch
http://ulrichard.ch
In the IDE you can only set the compiler variables using the project settings dialog. You can assign a different value to it in the MSIcode if you want and while you think it has changed the value it does not! Likewise, you cannot use user variables in the compiler if statements. The syntax allows you to enter a non-compiler variable name but again, its value does not participate. In general, use variable names that are available in the respective dropdown lists. That way, you'll know you are using legitimate variables names in the correct context.Erik wrote:...Thanks for your reply.
What you are suggesting is exactly what I'd like to do, the problem is that I haven't been able to do it. I guess I haven't figured out how to set compile time variables from a script. How would one do that? I've found the "compiler if variable" statement but no "compiler set variable" and the normal "set variable" doesn't seem to be doing the trick for me.
Thanks,
Erik
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP
I was afraid of that. I guess I'll see if I can get it to fit on the command line. I would've much rather had it in some include file but if it can't be done then it can't be done. Modifying the files directly was my last resort solution but as I'm sure you understand I really want to avoid that.ulrichard wrote: I don't think compiler variables can be set from the script.
Are you sure the commandline is too short to set all your options?
If it works over the commandline, you can use batch files to build certain configurations, or even better a build tool like FinalBuilder.
If the commandline is indeed too short, you could start playing around with the project file. Either have multiple copies of it, or write directly into it to set the default values for the compiler variables. But that's where it starts to get messy.
Rgds
Richard
Thanks!
Yes, that's pretty much what I thought, I was just hoping that there was some way I could set compiler variables other than the command line.bokkie wrote:In the IDE you can only set the compiler variables using the project settings dialog. You can assign a different value to it in the MSIcode if you want and while you think it has changed the value it does not! Likewise, you cannot use user variables in the compiler if statements. The syntax allows you to enter a non-compiler variable name but again, its value does not participate. In general, use variable names that are available in the respective dropdown lists. That way, you'll know you are using legitimate variables names in the correct context.
Thank you.
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Another idea is keeping identical MPR (project) files for each of your configurations, wherein they differ only in compiler variable declarations and default values.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Erik,MichaelNesmith wrote:Another idea is keeping identical MPR (project) files for each of your configurations, wherein they differ only in compiler variable declarations and default values.
What Michael writes is good. It's much easier to do what he suggests with IA than with a another well known installer product.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP
Thanks for your suggestion. I'll look into this, it might be a feasible suggestion.bokkie wrote:Erik,MichaelNesmith wrote:Another idea is keeping identical MPR (project) files for each of your configurations, wherein they differ only in compiler variable declarations and default values.
What Michael writes is good. It's much easier to do what he suggests with IA than with a another well known installer product.
Erik

