user863551
user863551

Reputation:

Creating an installer

I was just trying to make an installer. What is the best way to handle storing files in the exe file and then extracting them to the installation directory?

For example, I have my installer.exe file, I want it to contain the following:

Upon selecting the install directory and clicking install, I wish for the contained files to be extracted to the chosen installation directory, however I can not find out how to store the files that I need extracting within the installer.

Upvotes: 11

Views: 7870

Answers (4)

All installers (Inno, Setup Factory, NSIS installer) are showing issues about false positive virus. To fix this, it's necessary to use a sign tools to create a key for your software, but it is payed.

Upvotes: 0

kimherrero
kimherrero

Reputation: 9

I had an installer made in Delphi 7, but because of the elevated privileges needed to copy files on Program Files, the installed App was launched elevated too. That behaviour is not what I wanted.

Now I solved the problem with a new approach and I've made a demo that handles most of the common features an installer need to do.

The Demo is entirely written in Delphi 7 ( 32 bits ), and is available to all at github. Hope it helps.

https://github.com/kimherrero/DelphiAppSetupDemo

Upvotes: 0

John Easley
John Easley

Reputation: 1580

We use Setup Factory. It's simple to learn and use, and integrates with our automated build process using Final Builder.

Setup Factory

Upvotes: 2

Arnaud Bouchez
Arnaud Bouchez

Reputation: 43053

Inno Setup is interesting. This is a huge project, with a lot of features (including scripting language and plugins), and is coded in Delphi.

But take a look at NSIS installer. It is not written in Delphi, but it is much lighter. Creating a simple .ini file and you've your full installer made. See for instance how it was easy to create an installer for our small Secure NotePad tool - very similar to your need.

I use to create custom installers in Delphi code. In some cases, if you do not have to use a lot of features but need to reuse some existing code, it could make sense.

For this, I use two of our Open Source units:

  • Our PasZip unit is able to create a stand-alone unzipper, directly from the exe - see the sample code;
  • Our LVCL classes which are able to create very small executables.

Last advice: do not pack your exe with upx or other packers, since it tends to create false positives associated to Delphi executables with some anti virus softwares.

Upvotes: 17

Related Questions