Windows Installer for Unity Game
Maret 15, 2013 § Tinggalkan komentar
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!
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 😉
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
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)
- 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_Datafolder. 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).
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.
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!
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!
Source: Martin Klappacher