PDA

View Full Version : Compiler Variables



NewsArchive
05-18-2010, 02:11 AM
I have a product that is created by company 1 but sold by company 2 and
company 3.

I want to use 1 sb script to create the installs for company 2 and 3. I
am using Compiler Variables to change the company and product names.
Which is working fine except in one instance.

I have a compiler variable [INSTALLTYPE] using the SKU set to Company1
or Company2.

The #msg shows the correct values. On the general information tab I use
the [DESCRIPTION] compiler variable in 2 places. It is used for the
description in version resource and the descriptive name in digital
signature.

When I compile with [INSTALLTYPE] set to Company2 everything works.
However, when set to Company1 the code sign description shows as
Company2. All other variables are fine and the #msg always shows the
correct values for both setting of [INSTALLTYPE].

Also if I edit the value of Compiler Variables Visualizer it will
change my script.


#ifcompvar [INSTALLTYPE] Equals "Company1" Then
#set compiler variable [PRODUCTNAME] = "Company1"
#set compiler variable [INSTALLDIR] = "C:\Company1"
#set compiler variable [INIFILE] = "Company1.ini"
#set compiler variable [INSTALLNAME] = "Company1setup.exe"
#set compiler variable [PRODUCTGUID] = "{xxxxx}"
#set compiler variable [URL] = "www.Company1.com"
#set compiler variable [DESCRIPTION] = "Company1 Installation Program"
#set compiler variable [LICENSEFILE] = "Company1license.txt"
#else
#set compiler variable [PRODUCTNAME] = "Company2"
#set compiler variable [INSTALLDIR] = "C:\Company2"
#set compiler variable [INIFILE] = "Company2.ini"
#set compiler variable [INSTALLNAME] = "Company2setup.exe"
#set compiler variable [PRODUCTGUID] = "{yyyyy}"
#set compiler variable [URL] = "www.Company2.com"
#set compiler variable [DESCRIPTION] = "Company2 Installation Program"
#set compiler variable [LICENSEFILE] = "Company2license.txt"
#end
#msg "[PRODUCTNAME] - [CODESIGNNAME] - [URL]"



Eddie Sizemore

NewsArchive
05-18-2010, 02:12 AM
Eddie,

> When I compile with [INSTALLTYPE] set to Company2 everything works.
> However, when set to Company1 the code sign description shows as Company2.
> All other variables are fine and the #msg always shows the correct values
> for both setting of [INSTALLTYPE].

We can reproduce this here. Item in review.

Thanks,
Friedrich

NewsArchive
05-18-2010, 02:13 AM
Fixed. The compiler variables for installer and uninstaller code-signing
were resolved before the compiler processed the preprocessor items.

Thanks for bringing this to my attention.

Friedrich

NewsArchive
11-13-2010, 02:41 AM
I have a product that is created by company 1 but sold by company 2 and
company 3.

I want to use 1 sb script to create the installs for company 2 and 3. I
am using Compiler Variables to change the add remove program info.

I have a compiler variable [INSTALLTYPE] using the SKU set to Company1
or Company2.

On the general information add/remove tab I use [DDS_URL] and
[DDS_SUPPORTPHONE] compiler variables to store the company info.

When I compile with [INSTALLTYPE] set to Company2 everything works.
However, when set to Company1 the reg info for add/remove programs is
for company 2. The #msg shows the correct values.


#ifcompvar [INSTALLTYPE] Equals "Company1" Then
#set compiler variable [PRODUCTNAME] = "Company1"
#set compiler variable [INSTALLDIR] = "C:\Company1"
#set compiler variable [INIFILE] = "Company1.ini"
#set compiler variable [INSTALLNAME] = "Company1setup.exe"
#set compiler variable [PRODUCTGUID] = "{xxxxx}"
#set compiler variable [DDS_URL] = "www.Company1.com"
#set compiler variable [DDS_SUPPORTPHONE] = "800-111-1111"
#set compiler variable [DESCRIPTION] = "Company1 Installation Program"
#set compiler variable [LICENSEFILE] = "Company1license.txt"
#else
#set compiler variable [PRODUCTNAME] = "Company2"
#set compiler variable [INSTALLDIR] = "C:\Company2"
#set compiler variable [INIFILE] = "Company2.ini"
#set compiler variable [INSTALLNAME] = "Company2setup.exe"
#set compiler variable [PRODUCTGUID] = "{yyyyy}"
#set compiler variable [DDS_URL] = "www.Company2.com"
#set compiler variable [DDS_SUPPORTPHONE] = "800-222-2222"
#set compiler variable [DESCRIPTION] = "Company2 Installation Program"
#set compiler variable [LICENSEFILE] = "Company2license.txt"
#end
#msg "[PRODUCTNAME] - [CODESIGNNAME] - [DDS_URL] - [DDS_SUPPORTPHONE]"



Eddie Sizemore

NewsArchive
11-13-2010, 02:43 AM
Eddie,

Yes, I can reproduce this. Good finding. I think the problem is that the
Add/Remove Panel entry information is compiled before the compiler directive
is processed (except the Product Name and Product Version).

We'll see if it is possible to change this in the upcoming SetupBuilder 7.3.

Thank you for bringing this to my attention!

Friedrich

NewsArchive
11-15-2010, 01:49 AM
Eddie,

Fixed! This will work fine in the upcoming SetupBuilder 7.3.

Thanks,
Friedrich

NewsArchive
11-17-2010, 02:15 AM
Thanks

Eddie Sizemore