views:

59

answers:

2

I have an application that needs branding when downloaded in certain continents. When installed in North America, for instance, the application, when run, displays a different logo and company name than in Europe.

The setup file is provided through a PHP script. Presently there is a Inno Setup executable for Windows and a DMG for Mac OS X.

I have seen that when downloading Google Chrome, you can specify whether or not it should send usage statistics. A brief look at the JavaScript that controls it reveals that this is simply sent back to the server with &usagestats=0 or &usagestats=1.

How would I go about influencing the installation based upon settings specified via the PHP download page?

+2  A: 

If you can package different versions of your app depending on the region then you can use some form of IP address to country database that will determine which file the user is allowed to download.

You can use an online service to find out where the user is ( http://www.ip2location.com/ ) or get hold of a database and do your own queries ( several free sources which I can't remember right now ).

zaf
I was going to head down that road, but thought I'd poll the experts first. Mostly, I was hoping there might be some clever way to modify the setup file opposed to having a different package for each continent. Thanks for the link; I'll compare it with GeoIP (http://www.maxmind.com/app/geoip_country).
Paul Lammertsma
Inno Setup is quite advanced (it has scripting capabilities) so packaging your app could be trivial. If you're loading the image/text from a config file then you just need to make sure the appropriate config file gets packaged.
zaf
I'm familiar with the script and actually have a framework to automate building (also for making DMGs on Mac). I guess this is the only viable solution.
Paul Lammertsma
+1  A: 

For the Chrome example, you can see how they're modifying the installer using the (now open-sourced) Omaha project aka. Google Update.

The documentation shows that they're modifying a portion of the Authenticode digital signature on the downloadable EXE, the downloaded EXE will extract the files, reads the modified Authenticode signature and then launches setup with the desired parameters.

In our company we build multiple (200+) installer "variations" with different parameters embedded or options switched on/off by default. Different installers are tagged with different 'tracking' codes to see how effective the promotion of an individual campaign is. Additionally the same campaign may have multiple installers which are selected depending on what options the user ticked before download (e.g. 32-bit, 64-bit, module A/B/C included)

sascha