Entry
Installer: Microsoft Windows: Inno Setup: Create: How to create setup file?
Jul 16th, 2006 09:06
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 10 April 2005 - 08:29 pm ----------------------
Installer: Microsoft Windows: Inno Setup: Create: How to create setup
file?
The idea is that one or more files (e.g. executables or initialization
files) have to be copied to certain directories. You inform which files
and where this directories are.
You put this information in a text file with extension .iss file which
you create.
After you compile this .iss file, with your given information one file
(=setup.exe) is created, which contains all your files packed together,
together where to install them, so that they can be unpacked to the
correct directories on the computer on which you install it.
===
Steps: Overview:
1. -Create a setup file by taking e.g. a template like example1.iss
(this file (or similar files) is present in the directory of
Inno Setup after you installed it)
2. -Open your favorite text editor
1. -E.g.
notepad
2. -E.g.
Semware TSE
3. -Change the necessary information and save that file
1. -The idea is that you tell it which source files
to copy to which destination directory.
To tell where this destination directory is.
you use general alias abbreviations (because that information
varies e.g. depending on the operating system version, and
user name login) like
{app} =
The application directory, which the user selects on the
Select Destination Location page of the wizard.
For example: If you used {app}\MYPROG.EXE on an entry and the
user selected "C:\MYPROG" as the application directory, Setup
will translate it to "C:\MYPROG\MYPROG.EXE".
{userappdata} =
c:\documents and settings\<user name>\application data
{pf} =
The path of the system's Program Files directory, typically
"C:\Program Files".
{win}
The system's Windows directory.
For example:
If you used {win}\MYPROG.INI on an entry and the system's
Windows directory is "C:\WINDOWS", Setup will translate it to
"C:\WINDOWS\MYPROG.INI".
{sys}
The system's Windows System directory (System32 on Windows NT
platforms).
For example:
If you used {sys}\CTL3D32.DLL on an entry and the system's
Windows System directory is "C:\WINDOWS\SYSTEM", Setup will
translate it to "C:\WINDOWS\SYSTEM\CTL3D32.DLL".
{src}
The directory in which the Setup files are located.
For example:
If you used {src}\MYPROG.EXE on an entry and the user is
installing from "S:\", Setup will translate it to
"S:\MYPROG.EXE".
{sd}
System Drive. The drive Windows is installed on, typically
"C:". On Windows NT platforms, this directory constant is
equivalent to the SystemDrive environment variable.
{cf}
Common Files. The path of the system's Common Files directory,
typically "C:\Program Files\Common Files".
{tmp}
Temporary directory. This is not the value of the user's TEMP
environment variable. It is a subdirectory of the user's
temporary directory which is created at installation startup
(with a name like "C:\WINDOWS\TEMP\IS-xxxxx.tmp"). All files
and subdirectories in this directory are deleted when the
setup program exits. This is primarily useful for extracting
files that are to be executed in the [Run] section but are not
needed after the installation.
{fonts}
Fonts directory. Normally named "FONTS" under the Windows
directory.
1. -Search in the Inno Setup program 'help' e.g. for
userappdata
to get more help about this abbreviations
3. Your .iss text file contains several sections
1. [Setup]
gives e.g. version information
2. [Files]
here you tell which files (Source) have to
be copied to where (DestDir)
3. [Icons]
here you tell where to install icons
to launch your program
4. [Registry]
here you can possibly set your registry
values
{reg:HKxx\SubkeyName,ValueName|DefaultValue}
4. [Run]
here you tell if you have to ask to run your
program after installation
4. -Put this .iss text file in some directory
1. -E.g. in the source directory of your own files
(because then you know yourself where
to find it easy, as you keep all your
files together)
5. -Compile this .iss text file
1. -Run the command line executable
iscc.exe <your script filename>
or the full path, currently by default
c:\program files\inno setup 4\iscc.exe <your script filename>
e.g.
c:\program files\inno setup 4\iscc.exe example1.iss
e.g.
c:\program files\inno setup 4\iscc.exe myinstaller.iss
2. -Note
You will usually have to give the full path to your .iss file,
otherwise it will not be found by the program iscc.exe
5. -After successful compilation of your .iss text file,
this will create 1 file (containing all your files,
so that they can be unpacked to the destination computer
easily, as you only have one file to take care of)
You could rename this file then to your specific
installer name (e.g. myinstaller.exe)
setup.exe
in the subdirectory (in the directory where you did put your .iss
text file)
output
6. -You can then e.g. burn your setup.exe on CD or put it
on the Internet for download purposes, or copy it otherwise
to the other computer(s)
7. -They then have to run this program
setup.exe
on the destination computer to install your program
8. -After running this installation (by running this 'setup.exe'
installation wizard) it will e.g. have copied the files to the
destination directories, installed icons, added some registry
values, installed an uninstaller entry in 'Add/Remove' programs,
and asked to run your main executable program
===
Internet: see also:
---
Installer: Microsoft Windows: Inno Setup: Link: Overview: Can you give
an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/35404/fid/868
----------------------------------------------------------------------