📄 readme.txt
字号:
Inno Setup
Copyright (C) 1997-2004 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2004 Martijn Laan. All rights reserved.
For conditions of distribution and use, see LICENSE.TXT.
Source code README
1. Intro
========
I compile all of Inno Setup's projects with Delphi 2.01, with the exception
of Compil32, which is compiled with Delphi 3.02 (for the better foreign
character set support). I use these old versions of Delphi because their
VCLs have a significantly smaller code size footprint than the later
versions. If you do not have access to these old versions of Delphi, you
should be able to compile the projects on later versions, however complete
compatibility is NOT guaranteed. I try to make Inno Setup compilable on the
later versions when possible, but I do not have time to test every change on
every Delphi version.
If you intend to view or modify Inno Setup's forms, you must install 8
components that Inno Setup uses. The components are named BitmapImage,
FolderTreeView, NewNotebook, NewCheckListBox, NewProgressBar, NewStaticText,
PasswordEdit and RichEditViewer and are located in the Components directory.
If you only want to edit code, then you may skip installation of the
components, and choose "Cancel" when Delphi tells you a class can't be found.
If you want to compile the CompForm and CompWizard units, you must also
install the DropListBox and NewTabSet components, which are located in the
Components directory, and have the SynEdit component suite installed.
To download SynEdit, visit: http://synedit.sourceforge.net/
At the time of this writing, I am using SynEdit version 1.1.
Starting with Inno Setup 4.0.0 you'll need RemObjects Pascal Script to
recompile Inno Setup. See http://www.remobjects.com/?ps
for more information. You also need to install the SynHighlighterISXCode
component, located in the Components directory. To be able to compile
this component, you'll have to move the TSynPasSyn.Run field from the
private section to the protected section. This does not affect
TSynPasSyn's functionality so if needed you can continue using it in your
own projects. TSynPasSyn is located in SynHighligherPas.pas in your
SynEdit\Source directory.
2. Overview
===========
Inno Setup consists of five projects:
Compil32.dpr - This is the GUI front-end for the compiler. Compil32 does not
do the actual compilation itself; it relegates it to ISCmplr.dll. If the
ISCmplr project is changed, you normally don't need to recompile Compil32
since it's essentially a text editor, and is not affected by internal
changes to the compiler.
Note: This is the only project that I compile under Delphi 3 (3.02 to be
exact). The rest of the projects are compiled under Delphi 2.0.
ISCC.dpr - This is the command-line front-end to the compiler. Like
Compil32, it depends on ISCmplr.dll to do the actual compiling.
ISCmplr.dpr - This is a DLL which is loaded by Compil32 and ISCC to compile
scripts. The actual compiler code is in Compile.pas. See CompInt.pas for the
various structures and function declarations used to interface to the DLL.
Setup.dpr - This is the actual "Setup" program. It displays the wizard, and
performs all (un)installation-related tasks.
SetupLdr.dpr - This is the "setup loader." It self-extracts a compressed
Setup program into the user's TEMP directory and runs it from there. It also
displays the "This will install..." message box.
How do the projects link together?
- ISCmplr, Setup, and SetupLdr share the unit Struct.pas. This unit
contains various data structures and constants shared by the projects. If
Struct.pas is changed, you usually will need to recompile ISCmplr, Setup,
and SetupLdr so that everything is in synch.
- There are more units which are shared between projects. Search the 'uses'
clauses of the projects and units if you aren't sure if a project uses a
particular unit.
3. Delphi 2.0x users ONLY
=========================
Before you can successfully compile the projects in Delphi 2.0, you must
do two things:
- Install the latest version of SYSTEM.DCU if you haven't already done so.
It can be downloaded from Inprise's site at:
http://www.borland.com/devsupport/delphi/downloads/index.html
Look for "System.zip" in the "Delphi 2 Items" section.
If you do not do this, you will probably get an "I/O Error" message
when trying to run the projects.
- If the files SHLOBJ.DCU and REGSTR.DCU are missing from your Delphi\Lib
directory, download them here:
http://www.jrsoftware.org/files/delphi200units.zip
4. Source code tips
===================
- If you modify the Setup or SetupLdr projects and want to be able to compile
your installations with the new code, you'll need to copy the new EXE
file(s) to the Setup Compiler directory under the extension .E32.
- When debugging the SETUP project you should set UseSetupLdr=0 in your
script, and copy the resulting SETUP-*.BIN files to the source code
directory. This way you can simulate an actual installation while running
under the Delphi debugger.
- When I release new versions, you can tell which source code files have
changed by checking their date/time stamps. You can then use a file
comparison utility such as DOS's "FC" or Microsoft's WinDiff to show the
differences between an old version of a file and a new version.
- All of the forms in the Setup project, with the exception of Main.dfm, have
Scaled set to False. This is because they dynamically scale themselves at
run-time by calling a function named SetFormFont.
- When a Cardinal-type variable is compared against a constant expression,
why is a Cardinal cast sometimes used around the constant expression?
For example:
var
X: Cardinal;
begin
if X > Cardinal(1) then
...
The cast is needed to to work around a bug in Delphi 2 and 3 compilers:
without it, a *signed* comparison is done.
- A note for those curious: The Setup Compiler creates single EXE Setups by
first creating the SETUP.EXE as usual, then concatenating the SETUP.0 and
SETUP-1.BIN to the end of the SETUP.EXE, and finally modifying an internal
data block in SETUP.EXE so it knows it's in "single EXE" form.
- Starting with the 32-bit version of Inno Setup 1.12.7, I am using my own
"StripReloc" utility to decrease the size of the .EXE and .E32 files.
To download StripReloc, go to:
http://www.jrsoftware.org/striprlc.php
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -