Installer Development

EmperorFool

Deity
Joined
Mar 2, 2007
Messages
9,637
Location
Mountain View, California
I am building a new installer script using NSIS and wanted to get some input. This post is detailed and contains some technical information, so I greatly appreciate your attention.

The goal is to make an installer that is as easy to use as possible yet powerful enough to satisfy all of our users.

The current installer asks you first what type of installation you want. This will continue.

  • Standard (CustomAssets)
  • Mod (Mods folder)
The new installer will also allow you to change the default install location, but I wanted to make sure this was necessary (see AltRoot below).

CustomAssets

This install method is required for anyone wanting to play in an SG where some players might not use BUG. It also allows you to use BUG when opening saved games from other people.

It's called "Standard" because it works for most players and doesn't require any extra steps to use BUG.

Mod

This is only required to play multiplayer games . . .

Multiplayer

To use BUG for multiplayer games, you must install BUG as a Mod and to the BTS install folder (where the EXE is)--not the My Games folder.

Question: Is there ever any reason to install to the My Games Mods folder? The only reason I can think of is if you cannot install to the BTS install folder. Why would this be? You don't have write permission to that folder?

AltRoot

When you launch Civ4, you can add

/AltRoot=<path-to-folder-containing-CivilizationIV.ini>

to the shortcut to use a different settings folder. This allows you to set up multiple settings folders, each containing their own CustomAssets, Saves, Mods, PublicMaps, et al folders.

The new installer will support this and hopefully create the correct CvAltRoot.py file for you.

Civ Gold and Complete, Steam, Direct2Drive

I want to have the installer support these alternate installations, but I need your help. I need to know the registry keys that these installations create. The ones from Firaxis I know from scouring the boards. They are stored in

HKEY_CURRENT_USER\SOFTWARE\Firaxis Games​

under these keys:

  • Standard: Sid Meier's Civilization 4 - Beyond the Sword
  • Gold: Sid Meier's Civilization 4 Gold
  • Complete: Sid Meier's Civilization 4 Complete
The installer also falls back on

Sid Meier's Civilization 4​

under the same root.

However, I have no idea what registry keys Steam, D2D, and other digital providers create. Please post here (screenshots, subkey registry exports, text, whatever) if you have any of these installations. It would be great even to get verification from Gold and Complete users.

Options

During installation, the community maps will be optional just because I can. ;) Are there any other options I should add?

Uninstallation

During uninstallation, there will be two types: Upgrade and Complete.

  • Use Upgrade when you're upgrading to a new BUG version and want to keep your settings and registry entries.
  • Use Complete to remove everything, though you'll get a warning if you will be removing the CustomAssets folder as it might contain BlueMarble or other changes.
The only elegant way of safely removing the CustomAssets folder that I can think of (suggestions?) is to rename it. This would keep Civ4 from seeing it but leave it on your hard drive so you don't lose anything important (e.g. your own custom changes).

Is this necessary? I think most users won't have anything else installed there, and if they do, they'll just reinstall it (BlueMarble). Anyone doing modding should know better, right? :mischief:

Installing Multiple Times

Some players might need both installation methods, and the installer will allow this. I won't be making it track the different types of installs. If you do this, uninstalling will require manual intervention to remove all but the last installation.

I appreciate any feedback and suggestions you have. Thanks!
 
I can confirm the registry key for Complete. The "INSTALLDIR" string points to the vanilla directory. That's about all. I created a simple reg file to add the missing entries for BtS and Warlords: click
But that's only necessary for certain mods.

The rest of the above sounds good to me. :D
 
  • Standard (CustomAssets)
  • Mod (Mods folder)
Nice. You could go with 'Advanced' instead of 'Mod'.

Mod

This is only required to play multiplayer games . . .
Not true. You might want to play a single player game (or an SG) that uses the mod - basically forcing yourself (and others :D) to play with a consistent code base for the whole game.

Question: Is there ever any reason to install to the My Games Mods folder?
Not that I can think of. I think this is Firaxis just being a little too clever.

Options

During installation, the community maps will be optional just because I can. ;) Are there any other options I should add?
F1 layouts? Make your home page the BUG page? $3 donation to BUG (just like your tax return and the pollies).

The only elegant way of safely removing the CustomAssets folder that I can think of (suggestions?) is to rename it. This would keep Civ4 from seeing it but leave it on your hard drive so you don't lose anything important (e.g. your own custom changes).

Is this necessary?
Totally. Just rename the existing to be safe. You might also plug a certain customasset switcher utility that someone has written. :D
 
Nice. You could go with 'Advanced' instead of 'Mod'.

Hmm, I was originally just gonna call it Multiplayer, but Advanced certainly goes well with Standard. But how is it advanced? It doesn't ask you anything else or have more options; won't that just be confusing?

You might want to play a single player game (or an SG) that uses the mod.

You might, but that doesn't require you to install BUG as a mod. You could just agree to play that way. Even if you want to force other players to use BUG, they can subvert your will by creating an empty BUG Mod folder in their Mods folder. :trouble:

F1 layouts?

Yes! I was going to do this so I could avoid building that functionality into F1 itself, but I forgot. Thanks for the reminder. :D

You might also plug a certain customasset switcher utility that someone has written. :D

Link?
 
Back
Top Bottom