Author Topic: M&B Mod Installer Script for Mod Authors (v1.9)  (Read 31215 times)

0 Members and 1 Guest are viewing this topic.

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • WBWF&SM&BVC
M&B Mod Installer Script for Mod Authors (v1.9)
« on: November 01, 2005, 09:41:26 PM »
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.
« Last Edit: May 11, 2011, 10:36:37 PM by Janus »
Severian: "A crowd is not the sum of the individuals who compose it. Rather it is a species of animal, without language or real consciousness, born when they gather, dying when they depart."
     - Gene Wolfe, The Shadow of the Torturer (1980)

Mod Installer Script for Mod Authors (v1.3)
« Reply #1 on: November 01, 2005, 10:23:27 PM »
Does this mean i might actually be able to get mods to work? Janus, you are the king of kings.
You pressed ctrl+x for 10 **** hours??

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • WBWF&SM&BVC
Mod Installer Script for Mod Authors (v1.3)
« Reply #2 on: November 01, 2005, 10:36:47 PM »
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.
Severian: "A crowd is not the sum of the individuals who compose it. Rather it is a species of animal, without language or real consciousness, born when they gather, dying when they depart."
     - Gene Wolfe, The Shadow of the Torturer (1980)

Keemo

  • Recruit
  • *
    • View Profile
Mod Installer Script for Mod Authors (v1.3)
« Reply #3 on: November 02, 2005, 12:11:14 PM »
Looking forward to this. Been wanting to play your arena mod but I just can't get it to work.

Thanks  :)

Ancientwanker

  • Ilúvatar
  • Master Knight
  • *
    • View Profile
    • TLD Forum
Mod Installer Script for Mod Authors (v1.3)
« Reply #4 on: November 02, 2005, 02:06:24 PM »
Yeah, this would be nice. We had an installer made by one of the members before but it was wonky and often didnt work.

Ilex

  • Creepy ass-spelunker
  • Count
  • *
    • View Profile
  • Faction: Neutral
Mod Installer Script for Mod Authors (v1.3)
« Reply #5 on: November 02, 2005, 02:57:57 PM »
Quote
the king of kings
Ha! Manowar reference!.. and Janus, that sounds great!
<Sherlokki`> aww :(
<Sherlokki`> I went to take a piss and batman came and killed my cats

Armagan

  • Primary Developer
  • Developer
  • *
    • View Profile
Mod Installer Script for Mod Authors (v1.3)
« Reply #6 on: November 02, 2005, 05:59:07 PM »
Sound like a great idea janus! Good luck!

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • WBWF&SM&BVC
Mod Installer Script for Mod Authors (v1.3)
« Reply #7 on: November 04, 2005, 05:31:10 AM »
Quote from: armagan
Sound like a great idea janus! Good luck!

Thanks. :)

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.
Severian: "A crowd is not the sum of the individuals who compose it. Rather it is a species of animal, without language or real consciousness, born when they gather, dying when they depart."
     - Gene Wolfe, The Shadow of the Torturer (1980)

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • WBWF&SM&BVC
Mod Installer Script for Mod Authors (v1.3)
« Reply #8 on: November 05, 2005, 01:04:14 AM »
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.
Severian: "A crowd is not the sum of the individuals who compose it. Rather it is a species of animal, without language or real consciousness, born when they gather, dying when they depart."
     - Gene Wolfe, The Shadow of the Torturer (1980)

n00854180t

  • Back when I was young, the only mod tool was notepad!
  • Recruit
  • *
    • View Profile
  • Faction: Neutral
Mod Installer Script for Mod Authors (v1.3)
« Reply #9 on: November 05, 2005, 06:21:18 AM »
Cool stuff.  I'm much too lazy to make one of these myself.

Lost-Lamb

  • Vengeance Incarnate
  • Forum Legend
  • *
    • View Profile
  • Faction: Neutral
Mod Installer Script for Mod Authors (v1.3)
« Reply #10 on: November 06, 2005, 11:18:30 AM »
I should just hug you <3
'We put all our politicians in prison as soon as they're elected. Don't you?'

'Why?'

'It saves time.'

Mod Installer Script for Mod Authors (v1.3)
« Reply #11 on: November 06, 2005, 08:06:38 PM »
Yes! I installed my first mod!
You pressed ctrl+x for 10 **** hours??

-GandalfTheGrey

  • Connétable
  • Squire
  • *
    • View Profile
  • Faction: Neutral
Mod Installer Script for Mod Authors (v1.3)
« Reply #12 on: November 06, 2005, 08:50:13 PM »
Thanks again Janus. Very useful stuff, my mod has an installer now.
Great job !

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • WBWF&SM&BVC
Mod Installer Script for Mod Authors (v1.3)
« Reply #13 on: November 06, 2005, 09:19:37 PM »
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. :P
Severian: "A crowd is not the sum of the individuals who compose it. Rather it is a species of animal, without language or real consciousness, born when they gather, dying when they depart."
     - Gene Wolfe, The Shadow of the Torturer (1980)

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
  • WBWF&SM&BVC
Mod Installer Script for Mod Authors (v1.3)
« Reply #14 on: December 05, 2005, 08:03:34 PM »
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"? :)

In other words, *bump*, since this was on page 4.
Severian: "A crowd is not the sum of the individuals who compose it. Rather it is a species of animal, without language or real consciousness, born when they gather, dying when they depart."
     - Gene Wolfe, The Shadow of the Torturer (1980)