M&B Mod Installer Script for Mod Authors (v1.9)

Users who are viewing this thread

Janus

*spicy* *camper*
Administrator
This version of the script is for the original M&B. For the Warband version, head over here.


Download v1.9 Here

Updated 11-17-2008: v1.9 is now available.

v1.9:
- Much more robust support for Steam installations of M&B, both full version and demo. Steam apparently stores pseudo-registry files which contain the M&B registry info (found in "<Steam_path>\appcache" as "app_22100.vdf" and "app_22110.vdf"), so these are found and read. The install folder is therefore determined rather than guessed, and the M&B version number (ex. "1010"/"1.010") installed through Steam is also determined.
- Steam M&B version and any existing standard (TW) installation of M&B are now both checked against the version the mod is made for, since the Steam M&B version can now be found. If both installations exist and their versions both match the one which the mod was made for, the standard installation will be defaulted to instead of the Steam installation.

v1.8:
- Updated version display to properly indicate newer versions, i.e. "1.011" instead of "0.1011".
- Added in detection method for Steam installations of M&B if it isn't found elsewhere; Steam annoyingly doesn't store the M&B path in the Registry, but it does store its own path, which is extrapolated from to get the Steam M&B installation folder.
- Version mismatch warning message is updated to indicate possible Steam installation if version match isn't found; sadly, Steam also doesn't store the M&B version number in the Registry either.
- Special case added in for 1.010 and 1.011 to have them detected as compatible.
- Installation notes (in "install.txt") again slightly revised.

-----------------------

You know the main Mount&Blade setup executable which installs the entire game? It steps you though the installation, asking for the install directory, installing, and creating an uninstaller.
Well, the installer they use was created with the Nullsoft Scriptable Install System (NSIS), which is a free open-source program that I myself have used in the past to create installers for a couple of programs.

Once you've created an installer executable for your mod (which is pretty easy), it will automatically detect where the person installing your mod has M&B itself installed (it gets this from their registry), and defaults to the proper directory.
For example, if your mod was titled "My Cool Mod" and the person had M&B installed to "D:\Games\Mount_Blade 704", it would default to "D:\Games\Mount_Blade 704\Modules\My Cool Mod" for the mod installation directory.
Also, when creating your new mod directory, it will actually first copy over all the files from the "Native" module folder before overwriting with your mod files. That way, you can choose to only include the files your mod changes if you want.
 
Yeah, the idea is to make it dead simple for the end mod user to install the mod. This way, all you have to do to install is click "Next" a few times and it's done. :wink:
Of course also it will make the mods look a lot more professional, being packaged in an installer rather than in a zip file with instructions.

And I promise, it'll be very simple for mod makers to set it up for their own mod; they'll generally just need to change 4 simple lines at the top of the script, entering the mod name a couple of places, their name, and the version. There are a few other simple things they can change, but don't need to.

It'll be a few days before I release it, though.
There are a few possibly problematic installation scenarios I need to make sure are covered, related the person choosing to install to a different folder than default (which will be a choice, but not recommended).


EDIT: Oh, btw, the installer only adds about 30kb over the size of a zip file containing all the standard mod files (TXT and SCO). For a smaller mod which only changes a few of the text files (my mod as an example), the installer gives about a 50kb overhead.
So, rather tiny overhead for having an installer system.
With really large mods, it will probably have a smaller file size since it uses a fair bit more advanced compression than standard ZIP.
 
Looking forward to this. Been wanting to play your arena mod but I just can't get it to work.

Thanks :smile:
 
Yeah, this would be nice. We had an installer made by one of the members before but it was wonky and often didnt work.
 
armagan said:
Sound like a great idea janus! Good luck!
Thanks. :smile:

It's basically done now. It's quite robust in what it checks for and does, but I'll leave off with the feature list until I post it. I've also heavily documented it and written a full guide on setting it up (which is pretty friggin simple).
I think it's something no mod author should be without.

I've heavily tested it and covered pretty much every angle and possibility too. It's robust, I tell ya.

I'm just waiting on releasing it until I release the next version of my Arena Expansion mod, so it can be an example.
My Arena Expansion mod is waiting on release for some people testing it to get back to me on whether they find problems with it. :roll:

So it'll probably be tomorrow (Friday) when I release this, along with v1.3 of my Arena Expansion mod. I'll of course post back here then with the Feature List and other info.
 
Ok guys, it's available now. Download it at my site.
http://www.fenrisoft.com/mb_repository/modules/PDdownloads/singlefile.php?cid=3&lid=46

This script will create a fairly robust standalone installer for your mod, which will automatically detect the Mount&Blade folder and be easy for the end user of your mod to install. For an example, the current latest version of my Arena Expansion Mod (v1.3) uses this script.
If you want a complete rundown of everything it does, view the readme file (readme_installer.rtf).

The one thing you absolutely need to use it is the NSIS compiler, which can be downloaded at: http://nsis.sourceforge.net/Download/

Let me know what you think, or if you find a problem with it. If your mod needs to install things differently (most mods should be fine), just PM me and I'll help you change the script to suit your mod's needs.
 
Glad to help out the mod community. If any other mod authors have "special needs" for the installer, Just PM me. I'll be glad to help.

"Special needs" = need to install textures or other files outside the modules directory, or stuff like that. Or if you just can't get it working for any reason. :razz:
 
With more mods coming out lately, I wanted to make sure mod authors know this is available. Simple to use, works like a charm, allows people to easily install your mod without asking "where do I put everything"? :smile:

In other words, *bump*, since this was on page 4.
 
Well, it's definitely aimed at the mod authors rather than users, though it is for the sake of the users. I just keep seeing in these new mod posts people asking "how do I install it?" and so forth. :razz:
 
I see those all the time also and this would seriously help a lot if mod authers knew about it and.or used it.

I'm unsure of what to do with this, though.

It is an important tool ... yet doesn't really fit in the mod compilation as that is a place for end-users to find mods for their game.

It doesn't really fit in the unofficial editors thread as it isn't an editor.

It doesn't need its own forum though ...

Maybe a sticky?

Narcissus
 
Not sure it needs a sticky... we don't want too many stickies cluttering up the forum, eh? <shrug>

By the way, I've got a v1.1 release candidate of the mod installer script, with support for the new "textures" and "resource" subfolders available for v0.710. -GandalfTheGrey should be testing it out for me with his Hundred Years War mod. If somebody else has textures and/or meshes in their mod using the new method available, e-mail me and I'll send you the updated version of the script to test.

v1.1 will also allow people to install the mod who don't have the M&B directory stored in registry, giving them a warning and letting them continue rather than forcing them to exit.

The v1.0 script still works for the new version .710 of Mount&Blade of course, it just doesn't support those 2 subfolders.
 
Back
Top Bottom