Building an installer for Windows

Just as I mentioned previously, having a separate Data folder with our .exe file is somewhat of a pain. Rather than give people a .zip file and hope that they extract it all and then keep everything in the same folder, I will make the process automatic and give the person an opportunity to have it installed just like a professional game. With that in mind, I'm going to go over a free way to create a Windows installer, as follows:

  1. The first thing we need to do is get our setup program. For our demonstration, I will be using Jordan Russell's Inno Setup software. Go to http://jrsoftware.org/isinfo.php and click on the Download Inno Setup link. Take a look at the following screenshot:
    Building an installer for Windows
  2. From there, click on the Stable Release button and select the isetup-5.5.8.exe file. Once it's finished, double-click on the executable to open it, clicking on the Run button. If it shows a security warning message, click on Yes to allow the changes to take place. Take a look at the following screenshot:
    Building an installer for Windows
  3. From there, run through the installation, making sure to uncheck the Install Inno Setup Preprocessor option since we won't be using it. Upon finishing this task, make sure that Launch Inno Setup is checked and then click on the Finish button.
  4. When you open the program, it will look somewhat like the following screenshot:
  5. From there, choose Create a new script file using the Script Wizard and then click on OK.
  6. From there, click on the Next button, and you'll come to the Application Information section. Fill in your information and then click on Next. Take a look at the following screenshot:
    Building an installer for Windows
  7. Next, you'll come to some information about the application folder. In general, you will not want to change this information, so I will click on Next.
  8. From here, we'll be brought to the Application Files section where we need to specify the files we want to install. Under the Application main executable file: section, click on Browse to go to the location of your Export folder where the .exe file is present, select it, and click on Open. Take a look at the following screenshot:
    Building an installer for Windows
  9. Now, we need to add in the data folder. Click on the Add Folder… button, select the data folder, and click on OK. Take a look at the following screenshot:
    Building an installer for Windows
  10. It will then ask if files in subfolders should be included as well. Select Yes. Then, select the folder in the Other Applications file section and click on the Edit button. From there, set the Destination subfolder property to the same name as your data folder and click on OK. Take a look at the following screenshot:
    Building an installer for Windows
  11. Finally, click on the Add Files option, select the two player_win_x86 files, and select Open for them as well, then click on Next.
  12. In the next menu, check whichever options you want and then click on Next.
  13. Now, you'll have an option to include a license file, such as EULA or whatever your publisher may require, and any personal stuff you want to tell your users before or after installation. The program accepts .txt and .rtf files. Once you're ready, click on the Next button.
  14. Next, they'll allow you to specify what languages you want the installation to work for. I'll just go for English, but you can add more. Afterward, click on Next.
  15. Finally, we need to set where we want the setup to be placed as well as the icon for it or a password. I created a new folder on my desktop named TwinstickSetup and used it. Then, click on Next, as shown in the following screenshot:
    Building an installer for Windows

    Note

    If you want to include a custom icon but don't have a .ico file, you can use the http://www.icoconverter.com/ link.

  16. Next, you'll be brought to the successfully completed script wizard screen. After this, click on Finish. Take a look at the following screenshot:
  17. Now, it will ask you if you want to compile the script. Select Yes. It'll also ask you if you want to save your script. You'll also want to say Yes, and I saved it to the same folder as my exporting folder. It'll take a minute or two, but as soon as you see Finished in the console window, it should be ready. Take a look at the following screenshot:
    Building an installer for Windows
  18. If you go to the same place as your Export folder, you should see your installer, as shown in the following screenshot:
    Building an installer for Windows
  19. If you run it, it'll look somewhat like the following screenshot:
    Building an installer for Windows

And with that, we now have a working installer for our game!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset