Tutorial: Windows Installer for Your Unity Game
In this tutorial I’ll show you a really simple way to get a Windows installer for your Unity game with totally free tools but without any scripting involved in less than ~10 minutes!
Intro
I was part of a team which created a game as their master project. It’s called Of Light & Shadow and we released it under CC BY-NC-ND 3.0. In the end, I did the research and the actual creation of the Windows installer of our game but since i can’t code, I needed something rather simple to work with and here is the way I did it. Hopefully this is helpful for other people as well!
I think there are a couple of reasons why you might want to create an installer for your Unity game:
- You get one small file thanks to excellent file compression!
- Your license and/or extra notes will be seen at least…
- The game gets installed in a safe place per default (C:\Program Files)
- No manual extraction of files and/or moving them to other locations/folders
- You can create shortcuts to the executable and to your website
- It’s very easy to uninstall/remove the game
- An installer might look professional to some people ;-)
The Tool
After some research I chose Inno Setup by Jordan Russell for several reasons:
- It’s free and licensed under some kind of open source license!
- It has a graphical wizard, you don’t have to script to create a basic installer!
- Inno Setup is in active development since more than 15 years, it’s proven software
- However it is very customizable and it has support for multilingual installs
Preparation
You need following files/resources to create the installer:
- An actual build of your game!
(MyGame.exe & MyGame_Data folder – they should be stored together in a separate build folder)
Optional
- Your license and/or other notes prepared as .txt or .rtf documents
- An icon for the setup executable
- Extra files (Documentation, License, Credits, …)
PS: You can convert a .png/.jpeg/.gif into an .ico file easily with one of the bazillion online converters out there, for example ConvertIcon! (clean & ad free).
Step by Step
The first time you start Inno Setup, this welcome-dialog greets you.
Choose Create a new script file using the Script Wizard and click OK.
Just click Next.
Fill in all necessary information and click Next.
Change everything as you like, I chose the default settings.
Point the wizard to the main executable of your game, in my case C:\Users\Martin\Documents\#Shadow_Build\OfLightAndShadow.exe. Now we have to add the MyGame_Data folder. Click the Add folder… button but, IMPORTANT, do not choose the MyGame_Data folder directly! Instead choose the parent build folder (which includes the MyGame.exe as well).
Update 2013-07-08: A tip from Graham, thanks!
A quick note about the MyGame_Data folder. You can select it directly, then click edit and set the destination subfolder to “MyGame_Data”. This will create the proper subdirectory once the installation is done and you will not be including any unnecessary files.
Click Yes – and Next.
Change everything as you like, I checked everything.
Optional: If you want your license and/or extra information to be shown during the installation process, add them here as .txt or .rtf documents.
Choose the languages (translations) of the installer, I selected all.
Change the folder where you want the setup file to be stored after compilation and give it a name.
Optional: You can add the icon for the setup file as well.
Just click Next.
Finish.
Yes!
Save the script file and click Yes, the compilation starts automatically afterwards.
The main window with the script after the compilation and after a successful test of the installer (click to enlarge). If you want to try the result of this process, please go ahead and download the setup of Of Light & Shadow!
Notes
If you absolutely want to change the visual appearance of your installer, you should check out ISSkin. Take a look at the Getting Started page for a decent tutorial and some example code (2013-02: Seems like ISSkin has been abandoned). For any other script modifications, take a look at the Documentation!
[…] was part of a team which created a game as their master project. It’s called Of Light & Shadow and we released it under CC BY-NC-ND 3.0. In the end, I did the research and the actual creation […]
Hi thanks for the tutorial. A quick note about the MyGame_Data folder. You can select it directly, then click edit and set the destination subfolder to “MyGame_Data”. This will create the proper subdirectory once the installation is done and you will not be including any unnecessary files.
Thanks for the tip! I edited it into the post.
Thanks, helped. Easiest way I’ve found.
[…] this is one of IGFs rules, automated installation and unistallation. Luckily I stumbled upon this blog post and this software, and it makes it all pretty […]
Do you know how to add DirectX and QuickTime to an InnoSetup project? :)
great!
when i test it it does not put example_data in the directory. it only puts the sub folders.
I face no problem in making the .exe installer but when someone downlaod the same they get “.exe is not commonly downloaded and could be dangerous” and to install it you gotta disable antivirus did anyone else face the same issue
[…] computers. After a bit of Googling, I found the awesome Inno Setup, courtesy of an article from Martin Klappacher. For anyone that isn’t aware, this tool makes creating an installer as simple as dragging and […]