How do you make an installer?

I was wondering how to make an install program similar to Flyakite's. Is there a program you can use to make one or do you have to program it from scratch?

#224185

Hey hey... I will soon be writing a tutorial for my site on how to create an installer, so stay tuned for that.

In the meantime, there are many different ways to go about creating an installer, it's all dependent on your needs. For the case of system files, like my installer, you really need an install system where you write the install script, instead of using a GUI or wizard to create the installer.

The reason for this, is programs like InstallShield and WISE aren't really designed to mass replace system files. I use NSIS (Nullsoft Install System - originally created by the creators of Winamp to install Winamp, and has since grown into it's own project).

NSIS is like hand coding a webpage. When designing, all you see is a bunch of tags, commands, and weird stuff like that. What the user sees however are images, links, text, movies, etc. With NSIS, you see all the commands in their raw form. You then use the NSIS compiler, which takes all those commands etc, and creates an Installer for you.

Having a good understanding of computers though helps if you are designing an installer, especially one for system files. You need to know the process required to replace a system file, what happens when you do, etc. Also, start small, start very, very small. Only include the basics. Try designing a installer that only replaces say, timedate.cpl. Even if it screws up installing it, it won't matter because CPL files are harmless, so there's nothing to worry about.

To get you started, I'll give you a small idea of what an installer could contain to just replace that one file in NSIS:

---------------------------

Name "Replace timedate.cpl"

OutFile "replace timedate.exe"

Section "replace"

Rename "$SYSDIRtimedate.cpl" "$SYSDIRtimedate.bak"

SetOutPath "$SYSDIR"

File "timedate.cpl"

SectionEnd

---------------------------

Now this is AS SIMPLE AS POSSIBLE, keep that in mind. The meanings for all the commands (Name, OutFile, Section, Rename, etc) can be found in the NSIS Documentation

I can't stress enough how beyond simple that code is, and how it's not intended for anything other than a small example. It's designed to replace one, easy file. To give you an idea of how much code is in mine, the combined installer code, from all my seperate scripts that control installation is around 2500 lines combined. This includes all of the code to do everything the installer and uninstaller does.

#224188

Wow thanks, that was amazingly helpful! I've been using batchmod for a while and it works pretty good, but your work is SO easy for the user and very professional. I change my gui so much that it would be so nice to have a method such as yours for other system files. Glad to see it's open source too. Thanks for your help and look forward to the tutorials!

#224216

so. is understanding basic java good enough? also, what is it based on? delfi? java? c++? basic(hope not)? visual basic? or is it some completly new thing?

#224353

I suggest you also try Inno2 thats what I use. =)

#224365

@steelfist

Understanding another language will definitely benefit you when designing an installer where you script it yourself. However, it is not based off of any of those languages, it is based off of it's own. Though the basics of it are easy.

@ifido

The first installer I wrote was done using Inno, however it didn't get finished because there were things Inno could not do that I had needed, so I switched to NSIS.

#224371

Hey hey... I will soon be writing a tutorial for my site on how to create an installer, so stay tuned for that.

oh ~ that's a GOOD News ! We're waiting for your grest job :P

#225795