mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Introduce Inno Setup Preprocessor constants in order to automate most version strings and other commonly used literals.
This commit is contained in:
107
out/heidisql.iss
107
out/heidisql.iss
@ -1,100 +1,92 @@
|
|||||||
; Script generated by the Inno Setup Script Wizard.
|
; HeidiSQL setup script for Innosetup
|
||||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|
||||||
|
; Set commonly used constants for preprocessor
|
||||||
|
#define ProgName "HeidiSQL"
|
||||||
|
#define ProgNameLower LowerCase(ProgName)
|
||||||
|
#define ProgExeName ProgNameLower + ".exe"
|
||||||
|
#define ProgVersion GetFileVersion(AddBackslash(SourcePath) + ProgExeName)
|
||||||
|
#define ProgShortVersion Copy(ProgVersion, 1, 3)
|
||||||
|
#define WebSite "http://www." + ProgNameLower + ".com/"
|
||||||
|
#define OutDir "."
|
||||||
|
#define ResourceDir OutDir + "\..\res\"
|
||||||
|
|
||||||
; Original HeidiSQL setup script for Innosetup
|
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppId=HeidiSQL
|
AppId={#ProgName}
|
||||||
AppName=HeidiSQL
|
AppName={#ProgName}
|
||||||
AppVerName=HeidiSQL 5.1
|
AppVerName={#ProgName} {#ProgShortVersion}
|
||||||
VersionInfoVersion=5.1
|
VersionInfoVersion={#ProgVersion}
|
||||||
|
|
||||||
; Displayed on the "Support" dialog of the Add/Remove Programs Control Panel applet:
|
; Displayed on the "Support" dialog of the Add/Remove Programs Control Panel applet:
|
||||||
AppVersion=5.1
|
AppVersion={#ProgShortVersion}
|
||||||
AppPublisher=Ansgar Becker
|
AppPublisher=Ansgar Becker
|
||||||
AppPublisherURL=http://www.heidisql.com/
|
AppPublisherURL={#WebSite}
|
||||||
AppSupportURL=http://www.heidisql.com/forum.php
|
AppSupportURL={#WebSite}forum.php
|
||||||
AppUpdatesURL=http://www.heidisql.com/download.php
|
AppUpdatesURL={#WebSite}download.php
|
||||||
AppContact=heidisql@anse.de
|
AppContact={#ProgNameLower}@anse.de
|
||||||
AppReadmeFile={app}\readme.txt
|
AppReadmeFile={app}\readme.txt
|
||||||
|
|
||||||
DefaultDirName={pf}\HeidiSQL
|
DefaultDirName={pf}\{#ProgName}
|
||||||
DefaultGroupName=HeidiSQL
|
DefaultGroupName={#ProgName}
|
||||||
LicenseFile=license.txt
|
LicenseFile=license.txt
|
||||||
ChangesAssociations=yes
|
ChangesAssociations=yes
|
||||||
WizardImageFile=.\..\res\installer-logo.bmp
|
WizardImageFile={#ResourceDir}installer-logo.bmp
|
||||||
WizardImageBackColor=$ffffff
|
WizardImageBackColor=$ffffff
|
||||||
WizardSmallImageFile=.\..\res\installer-small-logo.bmp
|
WizardSmallImageFile={#ResourceDir}installer-small-logo.bmp
|
||||||
OutputDir=.
|
OutputDir={#OutDir}
|
||||||
OutputBaseFilename=HeidiSQL_5.1_Setup
|
OutputBaseFilename={#ProgName}_{#ProgShortVersion}_Setup
|
||||||
UninstallDisplayIcon={app}\heidisql.exe
|
UninstallDisplayIcon={app}\{#ProgExeName}
|
||||||
SetupIconFile=.\..\res\mainicon.ico
|
SetupIconFile={#ResourceDir}mainicon.ico
|
||||||
; uncomment the following line if you want your installation to run on NT 3.51 too.
|
|
||||||
; MinVersion=4,3.51
|
|
||||||
UsePreviousAppDir=yes
|
UsePreviousAppDir=yes
|
||||||
DirExistsWarning=auto
|
DirExistsWarning=auto
|
||||||
PrivilegesRequired=none
|
PrivilegesRequired=none
|
||||||
; uncomment the two following lines if you want to build an update installation
|
|
||||||
;CreateUninstallRegKey=no
|
|
||||||
;UpdateUninstallLogAppName=no
|
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; MinVersion: 4,4
|
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"; MinVersion: 4,4
|
||||||
Name: "quicklaunchicon"; Description: "Create a &Quick Launch icon"; GroupDescription: "Additional icons:"; MinVersion: 4,4; Flags: unchecked
|
Name: "associatesqlfiles"; Description: "Associate .&SQL files with {#ProgName}"; GroupDescription: "Options:";
|
||||||
Name: "associatesqlfiles"; Description: "Associate .&SQL-Files with HeidiSQL"; GroupDescription: "Options:";
|
Name: "activate_updatechecks"; Description: "Automatically check {#WebSite} for updates"; GroupDescription: "Options:";
|
||||||
Name: "activate_updatechecks"; Description: "Automatically check heidisql.com for updates"; GroupDescription: "Options:";
|
Name: "activate_statistics"; Description: "Automatically report client and server versions on {#WebSite}"; GroupDescription: "Options:";
|
||||||
Name: "activate_statistics"; Description: "Automatically report client and server versions on heidisql.com"; GroupDescription: "Options:";
|
|
||||||
|
|
||||||
[InstallDelete]
|
[InstallDelete]
|
||||||
Type: files; Name: "{app}\libmysql40.dll"
|
Type: files; Name: "{app}\libmysql40.dll"
|
||||||
Type: files; Name: "{app}\libmysql41.dll"
|
Type: files; Name: "{app}\libmysql41.dll"
|
||||||
Type: files; Name: "{app}\heidisql.exe.manifest"
|
Type: files; Name: "{app}\{#ProgExeName}.manifest"
|
||||||
|
Type: files; Name: "{app}\{#ProgNameLower}.url"
|
||||||
|
Type: files; Name: "{app}\{#ProgNameLower}_forum.url"
|
||||||
|
Type: files; Name: "{app}\donate.url"
|
||||||
|
Type: files; Name: "{app}\function.txt"
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "heidisql.exe"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "{#ProgExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "readme.txt"; DestDir: "{app}"; Flags: ignoreversion isreadme
|
Source: "readme.txt"; DestDir: "{app}"; Flags: ignoreversion isreadme
|
||||||
Source: "license.txt"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "license.txt"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "gpl.txt"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "gpl.txt"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "libmysql.dll"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "libmysql.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "Snippets\*.sql"; DestDir: "{commonappdata}\HeidiSQL\Snippets";
|
Source: "Snippets\*.sql"; DestDir: "{commonappdata}\{#ProgName}\Snippets";
|
||||||
|
|
||||||
[INI]
|
|
||||||
Filename: "{app}\heidisql.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.heidisql.com/"
|
|
||||||
Filename: "{app}\heidisql_forum.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.heidisql.com/forum/"
|
|
||||||
Filename: "{app}\donate.url"; Section: "InternetShortcut"; Key: "URL"; String: "http://www.heidisql.com/donate.php"
|
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\HeidiSQL"; Filename: "{app}\heidisql.exe"
|
Name: "{group}\{#ProgName}"; Filename: "{app}\{#ProgExeName}"
|
||||||
Name: "{group}\HeidiSQL on the Web"; Filename: "{app}\heidisql.url"
|
Name: "{group}\Readme file"; Filename: "{app}\readme.txt"
|
||||||
Name: "{group}\HeidiSQL Forum"; Filename: "{app}\heidisql_forum.url"
|
Name: "{userdesktop}\{#ProgName}"; Filename: "{app}\{#ProgExeName}"; MinVersion: 4,4; Tasks: desktopicon
|
||||||
Name: "{group}\Donate"; Filename: "{app}\donate.url"
|
|
||||||
Name: "{userdesktop}\HeidiSQL"; Filename: "{app}\heidisql.exe"; MinVersion: 4,4; Tasks: desktopicon
|
|
||||||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\HeidiSQL"; Filename: "{app}\heidisql.exe"; MinVersion: 4,4; Tasks: quicklaunchicon
|
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKCR; Subkey: ".sql"; ValueType: string; ValueName: ""; ValueData: "SQLScriptFile"; Flags: uninsdeletevalue; Tasks: associatesqlfiles
|
Root: HKCR; Subkey: ".sql"; ValueType: string; ValueName: ""; ValueData: "SQLScriptFile"; Flags: uninsdeletevalue; Tasks: associatesqlfiles
|
||||||
Root: HKCR; Subkey: "SQLScriptFile"; ValueType: string; ValueName: ""; ValueData: "SQL-Script"; Flags: uninsdeletekey; Tasks: associatesqlfiles
|
Root: HKCR; Subkey: "SQLScriptFile"; ValueType: string; ValueName: ""; ValueData: "SQL-Script"; Flags: uninsdeletekey; Tasks: associatesqlfiles
|
||||||
Root: HKCR; Subkey: "SQLScriptFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\heidisql.exe,0"; Tasks: associatesqlfiles
|
Root: HKCR; Subkey: "SQLScriptFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#ProgExeName},0"; Tasks: associatesqlfiles
|
||||||
Root: HKCR; Subkey: "SQLScriptFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\heidisql.exe"" ""%1"""; Tasks: associatesqlfiles
|
Root: HKCR; Subkey: "SQLScriptFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ProgExeName}"" ""%1"""; Tasks: associatesqlfiles
|
||||||
; Enable auto-updatechecks if this option was checked. Only save the value when it's checked, as the default in HeidiSQL is False (see const.inc)
|
; Enable auto-updatechecks if this option was checked. Only save the value when it's checked, as the default in preferences is False (see const.inc)
|
||||||
Root: HKCU; Subkey: "Software\HeidiSQL"; ValueType: dword; ValueName: "Updatecheck"; ValueData: 1; Tasks: activate_updatechecks
|
Root: HKCU; Subkey: "Software\{#ProgName}"; ValueType: dword; ValueName: "Updatecheck"; ValueData: 1; Tasks: activate_updatechecks
|
||||||
Root: HKCU; Subkey: "Software\HeidiSQL"; ValueType: dword; ValueName: "DoUsageStatistics"; ValueData: 1; Tasks: activate_statistics
|
Root: HKCU; Subkey: "Software\{#ProgName}"; ValueType: dword; ValueName: "DoUsageStatistics"; ValueData: 1; Tasks: activate_statistics
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\heidisql.exe"; Description: "Launch HeidiSQL"; Flags: nowait postinstall skipifsilent
|
Filename: "{app}\{#ProgExeName}"; Description: "Launch {#ProgName}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|
||||||
[UninstallDelete]
|
|
||||||
Type: files; Name: "{app}\heidisql.url"
|
|
||||||
Type: files; Name: "{app}\heidisql_forum.url"
|
|
||||||
Type: files; Name: "{app}\donate.url"
|
|
||||||
Type: files; Name: "{app}\function.txt"
|
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
procedure DonateClick(Sender: TObject);
|
procedure DonateClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
ErrorCode: Integer;
|
ErrorCode: Integer;
|
||||||
begin
|
begin
|
||||||
ShellExec('open', 'http://www.heidisql.com/donate.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
|
ShellExec('open', '{#WebSite}donate.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure InitializeWizard();
|
procedure InitializeWizard();
|
||||||
@ -104,7 +96,7 @@ var
|
|||||||
begin
|
begin
|
||||||
txt := TNewStaticText.Create(WizardForm);
|
txt := TNewStaticText.Create(WizardForm);
|
||||||
txt.Parent := WizardForm.FinishedPage;
|
txt.Parent := WizardForm.FinishedPage;
|
||||||
txt.Caption := 'HeidiSQL is free software. You may make a donation:';
|
txt.Caption := '{#ProgName} is free software. You may make a donation:';
|
||||||
txt.Left := WizardForm.FinishedLabel.Left;
|
txt.Left := WizardForm.FinishedLabel.Left;
|
||||||
txt.Top := WizardForm.FinishedLabel.Top + 130;
|
txt.Top := WizardForm.FinishedLabel.Top + 130;
|
||||||
txt.AutoSize := True;
|
txt.AutoSize := True;
|
||||||
@ -118,4 +110,3 @@ begin
|
|||||||
btn.Caption := 'Donate';
|
btn.Caption := 'Donate';
|
||||||
btn.OnClick := @DonateClick;
|
btn.OnClick := @DonateClick;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user