BLACKISH DEV BLOG Support
 

 

Unity: Creating an Installer

I’m using Triton Ocean in a Unity project. The difficulty is that Triton requires a few other things to be installed or the ocean simply won’t show up.

If you just want it to work on your own machine, no problem – simply install their unity demo app and the installer will take care of everything! If, however, you’re working on an external project you don’t really want to tell the customer to install the demo app of the middleware you’re using before he can use the app they’re paying you to build.

So let’s build our own installer. How hard can it be?

And we’re in luck. It really isn’t all that hard once you get the hang of it.

So what do we need?

And how do we do it?

  • Make a build in Unity, put the correct things in the correct places for Triton to function.
  • Run the Inno Setup New Script Wizard (File > New > New Script (Wizard) in Inno Script Studio) and go through all the steps (This tutorial might help – take special note of this quick tip – quote from 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.” – If you just add the directories and don’t to this step, their contents will be taken out of the directory and placed at app level, which is not at all what we want. Compare the result to my inno setup file if you’re unsure you did it correctly. You should be able to fix it from there…)
  • Open the resulting script and add the redistributable files to the Files (unless you’ve added them in the wizard) and Run sections, so their installers are run during the installation.
  • Project > Compile
  • You should now find your setup file in the Output folder! Install and test!

If you want to go one step further and run the Visual C++ 2010 SP1 runtime installer only if it’s not installed already, check out my final inno setup script on Gist (and feel free to contribute!)

Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>