ME3Explorer Wiki
Advertisement
Donotenter Do not enter! This article is currently under construction and should not be used for reference. If you need help, visit the forums.

This tutorial was ported from the me3explorer freeforum thread here

NSIS Installer Guide

First, let me say that we are absolutely not experts on this. Chances are that will be obvious from an examination from the ThaneMOD installer script. We had zero scripting experience beforehand, so there was a lot of research, troubleshooting, and trial and error involved. The installer was written by Skipjack and myself with the aid of wavion's MEHEM v0.3 NSIS script. 

Second, I have no idea how many people out there are interested in this, therefore, it won't be a full, step-by-step tutorial, but more of a guide, with some comments, and of course the full script from one of our installers (we made 6). Generally speaking, it's the larger content mods that are going to lean towards creating a Windows installer. Small mods involving only a few files can be handled manually or via .mod files created by ME3Exp.

At any rate, we thought our work (angst) should save people some trouble. So, here we go.

Resources We chose to use the Nullsoft Install System (NSIS) for a few reasons: it's feature-rich, has a ton of documentation (albeit spread out and challenging to understand for a someone with zero programming knowledge), and was used by wavion for MEHEM...who was kind enough to share his v0.3 script with us, lol. Inno Setup is another option, though it's not as configurable as NSIS from what I can see.

1. NSIS This is the core program, but isn't used on its own. You'll need to use a separate editor. 

2. HM NIS Edit You can use any text editor (like Notepad ++) for NSIS scripting, but this one also includes a GUI builder, so for those using InstallOptions and MUI it's a good choice. Eclipse and Venis are also options, but are more advanced. HM NIS Edit also has a very handy "Wizard" feature that walks you through the creation of a basic installer. This is a godsend for folks like us who had no experience, and you can basically take the created script and then build off of it.

3. NSIS Plug Ins  There are tons of separate plugins and we only used a few. Take care with the version of NSIS the plugin is made for, as some are very outdated. NSIS is actively maintained, but the GUI editors and plugins often aren't (we're talking last updated in 2005).

  • Aero -- Allows for the GUI windows to have the Windows "Aero" effect
  • InstallOptions 2 -- Bundled with NSIS and allows for configuration and creation of custom pages. An alternative to InstallOptions is to use nsDialogs (bundled with NSIS 2.29 and later). FYI, the original InstallOptions is deprecated, so be careful with information you find in old forum posts, scripts, etc.
  • Modern UI -- Bundled with NSIS and allows for the use of a more comprehensive GUI (the "standard" Windows GUI we are familiar with). Be aware there is a MUI1 and MUI2. MHI1 uses InstallOptions, MUI2 uses nsDialogs. The scripting for each is quite different. We used what seemed to be easier, when it came to hunting down examples, documentation, etc. See here for more info.

4. Documentation You will need to get very familiar with all this. Don't even think about asking a question on the NSIS forums without reading it first, or you will be either ignored or snarked at. It's a good idea to be profusely humble and gracious when posting on the forum...at least if you want help.

  • NSIS Manual
  • NSIS Wiki
  • NSIS FAQ
  • NSIS Developer Center (HQ for all sorts of important stuff you'll need)
  • HM NIS Edit Documentation
  • MUI 1 Readme
  • MUI 2 Readme
  • InstallOptions 2 Readme
  • Logic Library Documentation
  • nsDialogs Readme

ThaneMOD v1.0E NSIS Script Viewable on pastebin, since I can't embed it on these forums. I've included various comments throughout the script to help explain certain details. I may add more as I think of them. Basically, between the script, the screenshots below, and downloading one of the ThaneMOD Install Packages, you should be able to figure out what everything is for and how it works.

Important note: The script will not work if you simply copy and paste, as it's functionality depends on having other files present in specific locations. You will need to modify it for your own use.

Screenshots Installer

Installer For Your Mod 01
Installer For Your Mod 02
Installer For Your Mod 03
Installer For Your Mod 04
Installer For Your Mod 05
Installer For Your Mod 06
Installer For Your Mod 07
Installer For Your Mod 08

Screenshots Uninstaller

Installer For Your Mod 09
Installer For Your Mod 10

*note, an image of the MUI_UNPAGE_INSTFILES is missing here (it pops almost too quickly enough to screencap)

Installer For Your Mod 11

Other Useful Links There are a lot of things we wanted the installer to do that we couldn't/didn't have time to figure out, and some things that are useful in the case of ME3, but that we decided not to use. Below are a few other links that may be useful, and of course, do your own web searching. There is a ton of info out there, but it can be hard to find what you are looking for (that and the scripting can change depending on NSIS version, MUI1/2, InstallOptions1/2, nsDialogs, etc).

That about wraps it up.

Advertisement