Blackangel's Custom .EXE Tutorial

Lithtech Jupiter engine

Post Reply
User avatar
Spawn
Admin
Admin
Posts: 1312
Joined: Sun Jul 25, 2004 12:50 am
Location: Norway
Contact:

Blackangel's Custom .EXE Tutorial

Post by Spawn » Mon Dec 17, 2018 10:21 pm

Creating a setup package for your NOLF 2 Mod

1. Introduction

When releasing your mod to the public it is always very convenient to do this in the form of a setup program. Usually a setup program packs & compresses several files into one easy to use 'setup.exe' file. It looks more professional, it will help the end-user put the files in the correct location, and enhance the overall experience they will have with your mod.

What this tutorial will teach you is how to create a setup program that will automaticly detect where NOLF2 is installed and place your mod in the correct folder. We want to make sure the user needs to undertake the least amount of actions possible to get your mod to work. This tutorial will assume you have some basic knowledge of windows, know how to download and install a program, know how to move/copy files and how to create folders.

2. Getting the Install Maker Program

To create a setup program you will need some sort of setup creation program. There are several of these programs in existance such as: Wise, Installshield, Ghost, Microsoft Installer Service. For this tutorial we will use ClickTeam's Install Maker, which is an excellent free program which you can download here http://www.clickteam.com/webftp/files/4/5/IMUS12rf.exe. They also have a pay-version called InstallMaker Pro, which offers a few more advanced features. For now we don't need those, so hop on over to their site, download Install Maker, and install it. There is no need to start up the program just yet though.

3. Preparing to create your installation

Before we actually start creating our setup.exe, we need to do some preparation work. I am using my personal preferences, so feel free to change folder names etc. if you know what you are doing.

3.1 Creating a Setup Folder

I like to have one folder in which I store all my setup projects. Go to your C:\ Drive in my computer and create a new folder called: Setup Projects This is going to be the folder where we will store setup projects for all your different mods.

3.2 Creating your Root Project Folder

Each Installation has a 'root' folder. This is the folder which holds all other folders and files for your mod. You can compare it to the NOLF2 folder - It holds all the files & folders for NOLF2. I usually name this folder after my mod or map, so let's create a folder called 'MyFirstMod' in the Setup Projects folder.

3.2.1 Creating the folder layout for a map

Maps for NOLF2 have to be installed in the [NOLF2 root folder]\Custom\Resources folder on your computer. As mentioned above, our Setup program will detect the NOLF2 folder and install files and folders inside it and it's sub-folders. Since our 'MyFirstMod' folder acts as Root folder when installing we have to create a Custom\Resource folder inside our 'MyFirstMod' folder. In the Resource folder we place our Rez file (for example: 'MyFirstMap.Rez'). This should give us the following path: C:\Setup Projects\MyFirstMod\Custom\Resources\MyFirstMap.Rez

3.2.2 Creating the folder layout for a source-code mod

Source Code mods for NOLF2 are installed in the [NOLF2 root folder]\Custom\Mods\[MyModName] folder. Since we want to mimic this behaviour we create a Custom\Mods\[MyModName] folder inside our 'MyFirstMod' Folder.In this new folder we place our Rez file (for example: 'MyFirstMod.Rez'). This should give us the following path:
C:\Setup Projects\MyFirstMod\Custom\Mods\MyFirstMod\MyFirstMod.Rez

If you have any other files you want to install with your mod, just add them in the appropriate folder.

4. Using the Install Maker Wizard

Image

Start up Install Maker and you should be greeted by the Install Maker wizard. Click [Next].

Image

Make sure that the 'Include Sub-Directories' checkbox is checked.
Click the [Browse] button and locate your C:\Setup Projects\myFirstMod folder, select it and click on the [OK] button. Now click [Next]

Image

Change the language as needed and type in your Mod name. When done, click on [Next].

Image

Unless you have an executable file with your mod (for instance: a different launcher program), you can skip this screen, so click on the [Next] button.

Image

If you want to provide the user with some extra information such as some last minute updates, version history , etc. you can enter that there. When done, click [Next].

Image

For my mods I like to use the 'small' window format, but feel free to pick either one. Type in your mod name or another title for your setup program when using the full screen window format. When done, click on the [Next] button.

Image

If you would like to use a logo/graphic in your setup program, you can specify the location of a BMP file here. Click on [Next] when done.

Image

Now we really want to install the mod to the right location automaticly. But not everyone installs their game in the default location. I personally for instance have NOLF2 installed in E:\NOLF2. Luckely we can use the registry to determine where NOLF2 was installed to.
Click on the 'Registry Base' Button.

Image

For the root key select: HKEY_LOCAL_MACHINE
Under Key enter:SOFTWARE\Monolith Productions\No One Lives Forever 2\1.0
Under SubKey enter: InstallDir
Hit ok and click the [Preview] button. If you did it correctly you should now see your own NOLF2 path in the text box. When done click [Next]

Image

If you have a document or application installed that you would like to start or display, you can fill that out on this screen. Click on [Next] when done.

Image

If you want to allow the user to uninstall your mod, leave the checkbox checked, and hit [Next]

Image

In the last screen, check: do not build the install program, and click on finish.

Image

I personally now like to go to the 'Wizard Texts' Tab-page, and select 'Directory' from the listbox. By default the dialogue where the installation path can be selected says something like:
"[#Title's] files will be installed in the following directory:".
I prefer to change this to a clearer statement:
"Please select your NOLF2 installation folder".
That way, if our setup program does not detect the correct NOLF2 path, the user will know what to do.

This may now be a good time to save your setup project for later use. I save mine as the C:\Setup Projects\[MyProjectName].iit

Once all this is done you may want to hit the [Test] button, to test your setup, and if you are satisfied with it, click on [Build] to build your setup. Make sure to give your setup a good name, such as "[mymod]-setup.exe" instead of a plain "setup.exe".

You now have completed your setup program!



(c) Copyright 2003 BlackAngel Software
Reposted from Spydave.com
Image

Post Reply
jedwabna poszewka 50x60