Dynamic download paths

Got a problem you cannot solve? Try here.
matthewj
Posts: 66
Joined: Tue Dec 07, 2004 12:48 pm

Dynamic download paths

Postby matthewj » Wed Mar 16, 2005 4:54 pm

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

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Wed Mar 16, 2005 5:31 pm

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.

matthewj
Posts: 66
Joined: Tue Dec 07, 2004 12:48 pm

Postby matthewj » Thu Mar 17, 2005 4:16 am

Excellent - I'll go play with that. Thanks.

Matthew

matthewj
Posts: 66
Joined: Tue Dec 07, 2004 12:48 pm

Postby matthewj » Thu Mar 17, 2005 9:25 am

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

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Thu Mar 17, 2005 5:47 pm

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$.

matthewj
Posts: 66
Joined: Tue Dec 07, 2004 12:48 pm

Postby matthewj » Fri Mar 18, 2005 4:06 am

I am using $VAR$, not #VAR#. Will go modify.

Matthew

matthewj
Posts: 66
Joined: Tue Dec 07, 2004 12:48 pm

Postby matthewj » Fri Mar 18, 2005 7:54 am

That fixed it - thanks.

Matthew

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Fri Mar 18, 2005 8:29 am

Glad to hear it. Remember, you always dereference compiler variables using #COMPVAR#, and regular variables using $REGVAR$.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 46 guests