Page 1 of 1
Dynamic download paths
Posted: Wed Mar 16, 2005 4:54 pm
by matthewj
My installer is used to build three different versions of an install (Full, Demo, Viewer). I want to do a web download for each, but don't know how to get the download paths to be different with each build. Do I have to modify the raw file? Eeek! I just looked at the .mpr and .mia files. How on earth is it managed? I was expecting some sort of XML but it seems to be, err, random. Can I just patch the text there, or is it all specific offsets? I can't work out how InstallAware can tell which line is which. There must be something clever going on!
Anyway, if you have any suggestions, like variables or something I can pass in at the command line, then I'd love to know. (Or indeed my favourite would be the ability to set the path after the fact, so that I can adjust it any time later when I want to set the path to something new, or to allow users to do so for their intranet servers.)
Matthew
Posted: Wed Mar 16, 2005 5:31 pm
by sinan
Just use compiler variables. You can set a default value when building from the IDE through Project Options, and then whenever you do a new build from the command line or such, you can specify a new value. If there are even more differences between your editions, I recommend sharing the same script in different projects that are identical except for things like the project name and default compiler variable values.
Posted: Thu Mar 17, 2005 4:16 am
by matthewj
Excellent - I'll go play with that. Thanks.
Matthew
Posted: Thu Mar 17, 2005 9:25 am
by matthewj
There seems to be a problem with the command line and compiler variables. The command line from FinalBuilder is:
Executing InstallAware with commandline: "D:\\Build\\bxscripts\\DE IW\\Decision Explorer.mpr" /o="D:\\Build\\bxscripts\\DE IW\\Viewer" /b=2 BX_VERSION=Viewer WEB_LOCATION=http://www.banxia.com/files/de_viewer
The InstallAware output includes:
InstallAWARE
Command Line Build Utility
Building Project: Decision Explorer
Output Folder: D:\\Build\\bxscripts\\DE IW\\Viewer\\Release\\Web\Deployment Type: Compressed Web-Based EXE
Code Signing: Enabled
Compression: Default
Compiler Variables: "BX_VERSION=Viewer","WEB_LOCATION=http://www.banxia.com/files/de_viewer",WEB_LOCATION=http://www.banxia.com/files/de_demo
As you can see, the WEB_LOCATION is shown twice - one is coming from the defaults in the project, the other from the command line.
Of some interest also is that fact that the download isn't working anyway. I set the Media block download URL to "$WEB_LOCATION$/help.7zip" etc, but when the download is attempted, no internet connection is being made (as shown by Outpost firewall). When I had them as hard coded URLs, Outpost showed the connections and they turned up in the web log. Could you please confirm that I'm doing this the right way?
Many thanks,
Matthew
Posted: Thu Mar 17, 2005 5:47 pm
by sinan
The web location being shown twice is not an issue - that is by design. The command line value will override the default value.
Are you de-referencing your compiler variables using the form #VAR#? Do not de-reference them like other variables, i.e. do not use $VAR$.
Posted: Fri Mar 18, 2005 4:06 am
by matthewj
I am using $VAR$, not #VAR#. Will go modify.
Matthew
Posted: Fri Mar 18, 2005 7:54 am
by matthewj
That fixed it - thanks.
Matthew
Posted: Fri Mar 18, 2005 8:29 am
by sinan
Glad to hear it. Remember, you always dereference compiler variables using #COMPVAR#, and regular variables using $REGVAR$.