Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed bin/lib/ant-contrib/ant-contrib.jar
Binary file not shown.
Binary file modified bin/lib/composer.phar
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added bin/lib/innosetup-6.2.2.exe
Binary file not shown.
Binary file removed bin/lib/innosetup.exe
Binary file not shown.
Binary file added bin/lib/innosetup/Compil32.exe
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; *** Inno Setup version 6.4.0+ English messages ***
; *** Inno Setup version 6.1.0+ English messages ***
;
; To download user-contributed translations of this file, go to:
; https://jrsoftware.org/files/istrans/
Expand Down Expand Up @@ -222,13 +222,6 @@ ErrorFileHash2=Invalid file hash: expected %1, found %2
ErrorProgress=Invalid progress: %1 of %2
ErrorFileSize=Invalid file size: expected %1, found %2

; *** TExtractionWizardPage wizard page and Extract7ZipArchive
ExtractionLabel=Extracting additional files...
ButtonStopExtraction=&Stop extraction
StopExtraction=Are you sure you want to stop the extraction?
ErrorExtractionAborted=Extraction aborted
ErrorExtractionFailed=Extraction failed: %1

; *** "Preparing to Install" wizard page
WizardPreparing=Preparing to Install
PreparingDesc=Setup is preparing to install [name] on your computer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; Demonstrates installation of a program built for the x64 (a.k.a. AMD64)
; architecture.
; To successfully run this installation and the program it installs,
; you must have a "x64" edition of Windows or Windows 11 on Arm.
; you must have a "x64" edition of Windows.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!

Expand All @@ -16,14 +16,13 @@ UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
; on anything but x64 and Windows 11 on Arm.
ArchitecturesAllowed=x64compatible
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
; meaning it should use the native 64-bit Program Files directory and
; the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64compatible
; "ArchitecturesAllowed=x64" specifies that Setup cannot run on
; anything but x64.
ArchitecturesAllowed=x64
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64

[Files]
Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"
Expand Down
53 changes: 53 additions & 0 deletions bin/lib/innosetup/Examples/64BitThreeArch.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
; -- 64BitThreeArch.iss --
; Demonstrates how to install a program built for three different
; architectures (x86, x64, ARM64) using a single installer.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!

[Setup]
AppName=My Program
AppVersion=1.5
WizardStyle=modern
DefaultDirName={autopf}\My Program
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
; "ArchitecturesInstallIn64BitMode=x64 arm64" requests that the install
; be done in "64-bit mode" on x64 & ARM64, meaning it should use the
; native 64-bit Program Files directory and the 64-bit view of the
; registry. On all other architectures it will install in "32-bit mode".
ArchitecturesInstallIn64BitMode=x64 arm64

[Files]
; Install MyProg-x64.exe if running on x64, MyProg-ARM64.exe if
; running on ARM64, MyProg.exe otherwise.
; Place all x64 files here
Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: InstallX64
; Place all ARM64 files here, first one should be marked 'solidbreak'
Source: "MyProg-ARM64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: InstallARM64; Flags: solidbreak
; Place all x86 files here, first one should be marked 'solidbreak'
Source: "MyProg.exe"; DestDir: "{app}"; Check: InstallOtherArch; Flags: solidbreak
; Place all common files here, first one should be marked 'solidbreak'
Source: "MyProg.chm"; DestDir: "{app}"; Flags: solidbreak
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme

[Icons]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"

[Code]
function InstallX64: Boolean;
begin
Result := Is64BitInstallMode and (ProcessorArchitecture = paX64);
end;

function InstallARM64: Boolean;
begin
Result := Is64BitInstallMode and (ProcessorArchitecture = paARM64);
end;

function InstallOtherArch: Boolean;
begin
Result := not InstallX64 and not InstallARM64;
end;
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
; Demonstrates how to install a program built for two different
; architectures (x86 and x64) using a single installer: on a "x86"
; edition of Windows the x86 version of the program will be
; installed but on a "x64" edition of Windows or Windows 11 on Arm
; the x64 version will be installed.
; installed but on a "x64" edition of Windows the x64 version will
; be installed.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!

Expand All @@ -17,17 +17,17 @@ WizardStyle=modern
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
; meaning it should use the native 64-bit Program Files directory and
; the 64-bit view of the registry.
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
; On all other architectures it will install in "32-bit mode".
ArchitecturesInstallIn64BitMode=x64compatible
; Note: We don't set ArchitecturesAllowed because we want this
; installation to run on all architectures.
ArchitecturesInstallIn64BitMode=x64
; Note: We don't set ProcessorsAllowed because we want this
; installation to run on all architectures (including Itanium,
; since it's capable of running 32-bit code too).

[Files]
; Install MyProg-x64.exe if running in 64-bit mode (see above), and
; Install MyProg-x64.exe if running in 64-bit mode (x64; see above),
; MyProg.exe otherwise.
; Place all x64 files here
Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: Is64BitInstallMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ end;
{--- MSXML ---}

const
XMLURL = 'https://jrsoftware.github.io/issrc/ISHelp/isxfunc.xml';
XMLURL = 'http://jrsoftware.github.io/issrc/ISHelp/isxfunc.xml';
XMLFileName = 'isxfunc.xml';
XMLFileName2 = 'isxfuncmodified.xml';

Expand All @@ -171,7 +171,7 @@ var
XMLHTTP, XMLDoc, NewNode, RootNode: Variant;
Path: String;
begin
if MsgBox('Setup will now use MSXML to download XML file ''' + XMLURL + ''' and save it to the source folder.'#13#13'Setup will then load, modify and save this XML file. Do you want to continue?', mbInformation, mb_YesNo) = idNo then
if MsgBox('Setup will now use MSXML to download XML file ''' + XMLURL + ''' and save it to disk.'#13#13'Setup will then load, modify and save this XML file. Do you want to continue?', mbInformation, mb_YesNo) = idNo then
Exit;

{ Create the main MSXML COM Automation object }
Expand Down Expand Up @@ -275,46 +275,6 @@ begin
MsgBox('Setup is now an authorized application for the current profile', mbInformation, mb_Ok);
end;

{--- Unzip ---}

const
ZipURL = 'https://jrsoftware.org/download.php/iscrypt.zip';
ZipFileName = 'iscrypt.zip';
ZipSHA256 = '0569ffe1677ba699d07063a902d48c2f92c8e88669bdc13118f5808c30e998bc';
SHCONTCH_NOPROGRESSBOX = 4;
SHCONTCH_RESPONDYESTOALL = 16;

procedure UnzipButtonOnClick(Sender: TObject);
var
Shell, ZipFolder, TargetFolder: Variant;
ZipPath, TargetPath: String;
begin
if MsgBox('Setup will now download Zip file ''' + ZipURL + ''' and save it to a temporary folder.'#13#13'Setup will then unzip this Zip file to the source folder. Do you want to continue?', mbInformation, mb_YesNo) = idNo then
Exit;

{ Download the Zip file }
DownloadTemporaryFile(ZipURL + '?dontcount=1', ZipFileName, ZipSHA256, nil);
ZipPath := ExpandConstant('{tmp}\' + ZipFileName);

MsgBox('Downloaded the Zip file and saved it as ''' + ZipPath + '''.', mbInformation, mb_Ok);

{ Unzip the Zip file to the source folder }
Shell := CreateOleObject('Shell.Application');

ZipFolder := Shell.NameSpace(ZipPath);
if VarIsClear(ZipFolder) then
RaiseException(Format('Zip file ''%s'' does not exist or cannot be opened', [ZipPath]));

TargetPath := ExpandConstant('{src}');
TargetFolder := Shell.NameSpace(TargetPath);
if VarIsClear(TargetFolder) then
RaiseException(Format('Target ''%s'' does not exist', [TargetPath]));

TargetFolder.CopyHere(ZipFolder.Items, SHCONTCH_NOPROGRESSBOX or SHCONTCH_RESPONDYESTOALL);

MsgBox('Unzipped the Zip file to ''' + TargetPath + '''.', mbInformation, mb_Ok);
end;

{---}

procedure CreateButton(ALeft, ATop: Integer; ACaption: String; ANotifyEvent: TNotifyEvent);
Expand Down Expand Up @@ -348,6 +308,4 @@ begin
CreateButton(Left, Top, '&MSXML...', @MSXMLButtonOnClick);
Top := Top + TopInc;
CreateButton(Left, Top, '&Word...', @WordButtonOnClick);
Top := Top + TopInc;
CreateButton(Left, Top, '&Unzip...', @UnzipButtonOnClick);
end;
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,9 @@ begin
CreateButton(Left, Top, '&IShellLink...', @IShellLinkButtonOnClick);
Top := Top + TopInc;
CreateButton(Left, Top, '&ITaskScheduler...', @ITaskSchedulerButtonOnClick);
end;
end;





Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,6 @@ begin
end;
end;

procedure LinkLabelOnLinkClick(Sender: TObject; const Link: string; LinkType: TSysLinkType);
var
ErrorCode: Integer;
begin
if (LinkType = sltID) and (Link = 'jrsoftware') then
ShellExecAsOriginalUser('open', 'https://jrsoftware.org', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode)
else if LinkType = sltURL then
ShellExecAsOriginalUser('open', Link, '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure CreateTheWizardPages;
var
Page: TWizardPage;
Expand All @@ -126,8 +116,7 @@ var
Memo: TNewMemo;
ComboBox: TNewComboBox;
ListBox: TNewListBox;
StaticText, StaticText2, ProgressBarLabel: TNewStaticText;
LinkLabel: TNewLinkLabel;
StaticText, ProgressBarLabel: TNewStaticText;
ProgressBar, ProgressBar2, ProgressBar3: TNewProgressBar;
CheckListBox, CheckListBox2: TNewCheckListBox;
FolderTreeView: TFolderTreeView;
Expand Down Expand Up @@ -233,45 +222,22 @@ begin
StaticText.Top := ListBox.Top + ListBox.Height + ScaleY(8);
StaticText.Anchors := [akLeft, akRight, akBottom];
StaticText.Caption := 'TNewStaticText';
StaticText.AutoSize := True;
StaticText.Parent := Page.Surface;

StaticText2 := TNewStaticText.Create(Page);
StaticText2.AutoSize := False;
StaticText2.Left := StaticText.Width + ScaleX(32);
StaticText2.Top := StaticText.Top;
StaticText2.Anchors := [akLeft, akRight, akBottom];
StaticText2.WordWrap := True;
StaticText2.Caption := 'TNewStaticText with more text and an adjusted label height so it''s multi-line.';
StaticText2.Width := 2 * StaticText.Width;
StaticText2.Parent := Page.Surface;
StaticText2.AdjustHeight;

LinkLabel := TNewLinkLabel.Create(Page);
LinkLabel.AutoSize := False;
LinkLabel.Left := StaticText2.Left;
LinkLabel.Top := StaticText2.Top + StaticText2.Height + ScaleY(8);
LinkLabel.Anchors := [akLeft, akRight, akBottom];
LinkLabel.Caption := 'TNew<a id="jrsoftware">Link</a>Label with more text and an adjusted label height so it''s multi-line with a second <a id="jrsoftware">link</a> on the second line.';
LinkLabel.Width := StaticText2.Width;
LinkLabel.OnLinkClick := @LinkLabelOnLinkClick;
LinkLabel.Parent := Page.Surface;
LinkLabel.AdjustHeight;

{ TNewProgressBar }

Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TNewProgressBar');

ProgressBarLabel := TNewStaticText.Create(Page);
ProgressBarLabel.Anchors := [akLeft, akTop];
ProgressBarLabel.Top := StaticText.Top + StaticText.Height + ScaleY(8);
ProgressBarLabel.Anchors := [akLeft, akBottom];
ProgressBarLabel.Caption := 'TNewProgressBar';
ProgressBarLabel.AutoSize := True;
ProgressBarLabel.Parent := Page.Surface;

ProgressBar := TNewProgressBar.Create(Page);
ProgressBar.Left := ProgressBarLabel.Width + ScaleX(8);
ProgressBar.Top := ProgressBarLabel.Top;
ProgressBar.Width := Page.SurfaceWidth - ProgressBar.Left;
ProgressBar.Height := ProgressBarLabel.Height + ScaleY(8);
ProgressBar.Anchors := [akLeft, akRight, akTop];
ProgressBar.Anchors := [akLeft, akRight, akBottom];
ProgressBar.Parent := Page.Surface;
ProgressBar.Position := 25;

Expand All @@ -280,7 +246,7 @@ begin
ProgressBar2.Top := ProgressBar.Top + ProgressBar.Height + ScaleY(4);
ProgressBar2.Width := Page.SurfaceWidth - ProgressBar.Left;
ProgressBar2.Height := ProgressBarLabel.Height + ScaleY(8);
ProgressBar2.Anchors := [akLeft, akRight, akTop];
ProgressBar2.Anchors := [akLeft, akRight, akBottom];
ProgressBar2.Parent := Page.Surface;
ProgressBar2.Position := 50;
ProgressBar2.State := npbsError;
Expand All @@ -290,7 +256,7 @@ begin
ProgressBar3.Top := ProgressBar2.Top + ProgressBar2.Height + ScaleY(4);
ProgressBar3.Width := Page.SurfaceWidth - ProgressBar.Left;
ProgressBar3.Height := ProgressBarLabel.Height + ScaleY(8);
ProgressBar3.Anchors := [akLeft, akRight, akTop];
ProgressBar3.Anchors := [akLeft, akRight, akBottom];
ProgressBar3.Parent := Page.Surface;
ProgressBar3.Style := npbstMarquee;

Expand Down Expand Up @@ -401,10 +367,17 @@ begin
MsgBox('This demo shows some features of the various form objects and control classes.', mbInformation, mb_Ok);
end;

procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExecAsOriginalUser('open', 'http://www.innosetup.com/', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure CreateAboutButtonAndURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton);
var
AboutButton: TNewButton;
URLLabel: TNewLinkLabel;
URLLabel: TNewStaticText;
begin
AboutButton := TNewButton.Create(ParentForm);
AboutButton.Left := ParentForm.ClientWidth - CancelButton.Left - CancelButton.Width;
Expand All @@ -416,14 +389,17 @@ begin
AboutButton.OnClick := @AboutButtonOnClick;
AboutButton.Parent := ParentForm;

URLLabel := TNewLinkLabel.Create(ParentForm);
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
URLLabel := TNewStaticText.Create(ParentForm);
URLLabel.Caption := 'www.innosetup.com';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := ParentForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clHotLight
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
URLLabel.Anchors := [akLeft, akBottom];
URLLabel.Caption := '<a href="https://jrsoftware.org">jrsoftware.org</a>';
URLLabel.OnLinkClick := @LinkLabelOnLinkClick;
URLLabel.UseVisualStyle := True;
URLLabel.Parent := ParentForm;
end;

procedure InitializeWizard();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ begin
DataDirPage := CreateInputDirPage(wpSelectDir,
'Select Personal Data Directory', 'Where should personal data files be installed?',
'Select the folder in which Setup should install personal data files, then click Next.',
False, SetupMessage(msgNewFolderName));
False, '');
DataDirPage.Add('');

{ Set default values, using settings that were stored last time if possible }
Expand Down Expand Up @@ -153,7 +153,7 @@ begin
finally
ProgressPage.Hide;
end;
if GetSHA256OfString('codedlg' + KeyPage.Values[0]) = '4c06e466ec3a2c977ac902a6cf4c602457f701b59309fc4282d9cb2234b7559b' then
if GetSHA1OfString('codedlg' + KeyPage.Values[0]) = '8013f310d340dab18a0d0cda2b5b115d2dcd97e4' then
Result := True
else begin
MsgBox('You must enter a valid registration key. (Hint: The key is "inno".)', mbError, MB_OK);
Expand Down
Loading