Ever wanted to create a professional looking installer? Ever tried some install-engines, just to find them cluttered with nasty advertisements? (Yeah, I'm looking at you clickteam.) Well today, I'm gonna step you through making your own professional looking setup, with no obtrusive, ugly name dropping!
Figure 1: A professional looking install wizardFirst thing's first, we're not going to be handcrafting each windows form on our own, so we are going to use a setup creating engine. The one I'm going to step you through using has a hard to notice (and hard to find for that matter) copyright notice, that you can only see by right clicking the title bar, and choosing 'About Setup' (If I hadn't told you where it was, would you have found it?)
Also, while I'm at it: There are many ways to create installers, and this is just a particularly effective path I've found to do such. You by no means have to follow my directions step by step, but they're there for those who want to.
Inno Setup is a fully scriptable installation package creator, with way more features than I'm going to cover today. I'm just going to get you set up with a simple installer, and let you explore on your own.
So go ahead and grab Inno Setup from:
jrsoftware.org [exe, 1,385KB].
Next, we need a working environment. I reccomend something with a simple path. I'll be using a folder on my desktop:
C:\Users\Administrator\Desktop\installer
I've gone ahead and created a folder in my 'installer' directory called 'app_dir'.
Figure 2: A clean working environment.Next, go ahead and copy everything that you're going to want to install into that directory.
I've got my executable, my help file, and my readme.
Figure 3: Files ready to go!Okay then, lets fire up the IDE (Inno Setup Compiler 5.2.3 at time of writing.) that came with Inno Setup, and see what we're looking at.
Ah, a welcome screen. Conveniently enough, what we want to do is right there, in the second radio option. Go ahead and choose Create a new script file using the Script Wizard, and hit OK.
Figure 4: Welcome to Inno Setup!Click next at the 'Welcome to the wizard screen'. No need to create an empty script, we want to use the wizard!
Allrighty then, the meat and potatoes! The Application Information page is the first real info that we can set about our setup. The required fields are in bold, everything else is up to you!
Figure 5: I'm going to call my application Test AppOn the next page, you're going to be asked to set where you'd like to install to. The Program Files folder is a pretty safe (and default) bet. Again, you can name your application folder whatever you please, but it's common practice to have the folder match the name of the app, or to use a combonation of publisher\app. The check box for 'allow user to change the application folder' is just a nice thing to do, especially if the user doesn't install everything to program files. Leave the second box unchecked, we're not doing that sort of an install.
Figure 6: Install here please.The Application files page has some fancy-doings to have us all set up with some instant-created shortcuts, and other nice things. Though if you're not careful, you might get your directory structure out of wack. So for now, leave the first three options the way they are (the executable file, and two check boxes.) Don't worry, we're going to change the script manually later.
Go ahead and click on the 'Add folder' button. Browse to the folder you created. I named mine 'app_dir'. Click Okay, then yes when it asks you about subdirectories. (Especially if you have them!)
Figure 7: Add Files.The next page is all about creating shortcut icons. I reccomend at least toggling on the 'uninstall' icon, as well as allowing the user to disable folder creation.
Figure 8: Shortcuts for quickness!Next, is the license, and info text pages. They all do basically the same thing, with the license being the only difference. The license requires the user to choose 'I Agree' before they're able to continue. I'm going to just use my readme in place of the usual license file, but any text or rtf document will do fine for any of these. (Note, none are required.)
Figure 9: Documentation!The next page: Languages. Really up to you, I for one, speak English... sorta.
Onward!
The next (and final setting) page, is the compiler setting page. This page is used to specify a custom output directory, a custom icon for the installer, a name, and even a password. (Note: People can unpack these things pretty easy, don't think a password is protecting sensitive data!)
For now, I'm going to leave everything the default on that page. (setup.exe will be created in wherever I've saved my script, plus the folder 'Output' by default.)
So next on through it, and hit finish!
Hot damn, a script! And would I like to compile now? Nope, not yet! There are some changes we need to make first.
Scroll down to the section for [Files]. See the first entry there, the one for the 'MyProg.exe' in the Inno Setup folder? Get rid of that line, we don't need it.
Looking at the [Icons] section, we need to change three lines, assuming you checked the options for all the shortcuts. On my First, Fourth, and Fifth line, I have shortcuts to the "MyProg.exe", which is what we told the wizard would be the main application. Simply change them from MyProg.exe to whatever your executable name is.
Further, check down in the [Run] section. The sole entry needs to be changed to the correct executable name as well.
Go ahead and save the script, in the folder you created (not the app_dir folder, the one above it.(I named mine installer.iss)
All right, lets take her for a spin, click the fourth button on the toolbar, and away we go!
If everything went fine, you should see a finished message at the bottom of the output window!
Figure 10: Finished Building!Go take a peek in the 'Output' folder created, and you should have a setup.exe! Run it, and what do you get? Your very own setup!
Figure 11: Setup!I'll leave the rest of the exploring of the setup to you. Keep playing around with Inno Setup (The Help File is extremely good.) and see if you can't make it do some fancy stuff. It's incredibly powerful, even has its own scripting engine. If you have a question on a more advanced topic than was covered here, feel free to ask.
I hope there was something useful contained in here for someone. See you guys around!
The script file I created in this walkthough is attached, if anyone was interested. Note that it has absolute paths, and must be modified to work on your machine.