When I was just still in my early years of game development, Unity would put out two things for a Windows build: the .exe and the data folder. They’ve added a few things since then…
Luckily, the method to create the installation file is still the same.
Install Inno Setup with the Preprocessor. (While it’s possible to create the install script without the preprossesor, I just find it faster to use it. Therefore, this entire thing will assume you’re using it.)
Start the Inno Setup Compiler and you’ll be greated with a welcom screen. For a fresh file, select “Crate a new script file using the Script Wizard.”
Once the Inno Setup Wizard starts, click next. Do NOT select “Create a new empty script file” or you’ll be taken to a blank script.
Name your game and enter the the app version. The publisher and website are optional. Click next.
Enter the setting for the destination folder and hit next.
Find the main executable of your build.
On the right side of the window, there is a “Add folder…” button. Navigate to the parent folder of the build. For example, since my executable was under “D:\Test Project\Build\Test Project.exe”, I select the folder at “D:\Test Project\Build*”. Then hit next.Application shortcuts are set on the following screen. Here you can change if/where shortcuts are created.
Browse for documentation that would appear prior to the installation, such as EULAs. If you don’t have any, skip this step.
Select all languages that apply.
The “Custom compiler output folder” is where the resulting .EXE will be generated. The file name is exactly what it says on the tin. There are also options for a .ico file and a file password, both of which are not mandatory.
Just hit next on the next screen; that’s a setting for the preprocessor.
Click “Finish”. Once that’s done, you’ll get an option to compile and save the script immediately. Click yes and yes. You will be able to chose where the .iss file saves.
If you have issues with the resulting file, you can edit the autogenerated script within the compiler window. (If you try to run the installer and it’s missing the data folder, make sure you selected the parent folder in step 6.)
To run the script, click the green play button in the toolbar.