Inno Install Script - Make Install Path More Robust

deanej

Deity
Joined
Apr 8, 2006
Messages
4,859
Location
New York State
Is there a way I can make the installers created with an inno script more robust? Star Trek uses an Inno script to build the installer and I always run into issues; I can basically choose between troubleshooting user errors or teaching some people how to modify the registry. The installer currently looks at the registry with the standard civ4 key containing the installation path. Trouble is, some people have the path in different keys, and some don't even have a registry key at all. The installer doesn't currently let a user input a path manually because it says "select where you want Star Trek installed"; Star Trek doesn't install like a normal mod (I have to add some stuff outside of the mod folder due to the scenarios, which are actually separate mods; unlike civ5, civ4 has no "parent mod" functionality), so people get confused and put it in the wrong place. I know of no way to change it to "select the directory where BtS is installed". Is there a way to make it detect multiple registry keys and to change the dialog so that I can allow users to enter the path manually if need be?
 
don't use inno install script, use NSIS, problem solved. Not only you can script it to do whatever you want, there's also a ready-to-use script available - see attachment. You have to edit the variables, provide the icon, and possibly do some extra stuff with paths for your special case.

The installer detects multiple registry keys with 100% accuracy and lets the user optionally provide his own path (over 4k downloads and no problem reported with SoI). The same script or its variations is used by BUG, RevDCM, DuneWars and others.

This version includes my fix for buggy un/re-install implementation (the original wouldn't let you install over a previous mod installation, bugging out). The original file is by Jean Elcard, phungus420, NikNaks, and Emperor Fool.
 

Attachments

  • installer.zip
    3.4 KB · Views: 52
Is there a good tutorial for NSIS anywhere? The reason I used Inno is because I can't wrap my head around NSIS. The script you provided seems to assume a tranditional mod setup for compilation... Star Trek has 13 mod directories and numerous files placed in the BtS assets (four .fpk files and numerous sounds for the common art/sound pack common to 12 of the 13 mods).
 
Top Bottom