mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +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.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
; HeidiSQL setup script for Innosetup
|
||||
|
||||
; 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]
|
||||
AppId=HeidiSQL
|
||||
AppName=HeidiSQL
|
||||
AppVerName=HeidiSQL 5.1
|
||||
VersionInfoVersion=5.1
|
||||
AppId={#ProgName}
|
||||
AppName={#ProgName}
|
||||
AppVerName={#ProgName} {#ProgShortVersion}
|
||||
VersionInfoVersion={#ProgVersion}
|
||||
|
||||
; Displayed on the "Support" dialog of the Add/Remove Programs Control Panel applet:
|
||||
AppVersion=5.1
|
||||
AppVersion={#ProgShortVersion}
|
||||
AppPublisher=Ansgar Becker
|
||||
AppPublisherURL=http://www.heidisql.com/
|
||||
AppSupportURL=http://www.heidisql.com/forum.php
|
||||
AppUpdatesURL=http://www.heidisql.com/download.php
|
||||
AppContact=heidisql@anse.de
|
||||
AppPublisherURL={#WebSite}
|
||||
AppSupportURL={#WebSite}forum.php
|
||||
AppUpdatesURL={#WebSite}download.php
|
||||
AppContact={#ProgNameLower}@anse.de
|
||||
AppReadmeFile={app}\readme.txt
|
||||
|
||||
DefaultDirName={pf}\HeidiSQL
|
||||
DefaultGroupName=HeidiSQL
|
||||
DefaultDirName={pf}\{#ProgName}
|
||||
DefaultGroupName={#ProgName}
|
||||
LicenseFile=license.txt
|
||||
ChangesAssociations=yes
|
||||
WizardImageFile=.\..\res\installer-logo.bmp
|
||||
WizardImageFile={#ResourceDir}installer-logo.bmp
|
||||
WizardImageBackColor=$ffffff
|
||||
WizardSmallImageFile=.\..\res\installer-small-logo.bmp
|
||||
OutputDir=.
|
||||
OutputBaseFilename=HeidiSQL_5.1_Setup
|
||||
UninstallDisplayIcon={app}\heidisql.exe
|
||||
SetupIconFile=.\..\res\mainicon.ico
|
||||
; uncomment the following line if you want your installation to run on NT 3.51 too.
|
||||
; MinVersion=4,3.51
|
||||
WizardSmallImageFile={#ResourceDir}installer-small-logo.bmp
|
||||
OutputDir={#OutDir}
|
||||
OutputBaseFilename={#ProgName}_{#ProgShortVersion}_Setup
|
||||
UninstallDisplayIcon={app}\{#ProgExeName}
|
||||
SetupIconFile={#ResourceDir}mainicon.ico
|
||||
UsePreviousAppDir=yes
|
||||
DirExistsWarning=auto
|
||||
PrivilegesRequired=none
|
||||
; uncomment the two following lines if you want to build an update installation
|
||||
;CreateUninstallRegKey=no
|
||||
;UpdateUninstallLogAppName=no
|
||||
|
||||
[Tasks]
|
||||
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 HeidiSQL"; 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 heidisql.com"; GroupDescription: "Options:";
|
||||
Name: "associatesqlfiles"; Description: "Associate .&SQL files with {#ProgName}"; GroupDescription: "Options:";
|
||||
Name: "activate_updatechecks"; Description: "Automatically check {#WebSite} for updates"; GroupDescription: "Options:";
|
||||
Name: "activate_statistics"; Description: "Automatically report client and server versions on {#WebSite}"; GroupDescription: "Options:";
|
||||
|
||||
[InstallDelete]
|
||||
Type: files; Name: "{app}\libmysql40.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]
|
||||
Source: "heidisql.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "{#ProgExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "readme.txt"; DestDir: "{app}"; Flags: ignoreversion isreadme
|
||||
Source: "license.txt"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "gpl.txt"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "libmysql.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "Snippets\*.sql"; DestDir: "{commonappdata}\HeidiSQL\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"
|
||||
Source: "Snippets\*.sql"; DestDir: "{commonappdata}\{#ProgName}\Snippets";
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\HeidiSQL"; Filename: "{app}\heidisql.exe"
|
||||
Name: "{group}\HeidiSQL on the Web"; Filename: "{app}\heidisql.url"
|
||||
Name: "{group}\HeidiSQL Forum"; Filename: "{app}\heidisql_forum.url"
|
||||
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
|
||||
Name: "{group}\{#ProgName}"; Filename: "{app}\{#ProgExeName}"
|
||||
Name: "{group}\Readme file"; Filename: "{app}\readme.txt"
|
||||
Name: "{userdesktop}\{#ProgName}"; Filename: "{app}\{#ProgExeName}"; MinVersion: 4,4; Tasks: desktopicon
|
||||
|
||||
[Registry]
|
||||
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\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\heidisql.exe,0"; Tasks: associatesqlfiles
|
||||
Root: HKCR; Subkey: "SQLScriptFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\heidisql.exe"" ""%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)
|
||||
Root: HKCU; Subkey: "Software\HeidiSQL"; ValueType: dword; ValueName: "Updatecheck"; ValueData: 1; Tasks: activate_updatechecks
|
||||
Root: HKCU; Subkey: "Software\HeidiSQL"; ValueType: dword; ValueName: "DoUsageStatistics"; ValueData: 1; Tasks: activate_statistics
|
||||
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}\{#ProgExeName}"" ""%1"""; Tasks: associatesqlfiles
|
||||
; 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\{#ProgName}"; ValueType: dword; ValueName: "Updatecheck"; ValueData: 1; Tasks: activate_updatechecks
|
||||
Root: HKCU; Subkey: "Software\{#ProgName}"; ValueType: dword; ValueName: "DoUsageStatistics"; ValueData: 1; Tasks: activate_statistics
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\heidisql.exe"; Description: "Launch HeidiSQL"; 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"
|
||||
Filename: "{app}\{#ProgExeName}"; Description: "Launch {#ProgName}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[Code]
|
||||
procedure DonateClick(Sender: TObject);
|
||||
var
|
||||
ErrorCode: Integer;
|
||||
begin
|
||||
ShellExec('open', 'http://www.heidisql.com/donate.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
|
||||
ShellExec('open', '{#WebSite}donate.php', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
|
||||
end;
|
||||
|
||||
procedure InitializeWizard();
|
||||
@ -104,7 +96,7 @@ var
|
||||
begin
|
||||
txt := TNewStaticText.Create(WizardForm);
|
||||
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.Top := WizardForm.FinishedLabel.Top + 130;
|
||||
txt.AutoSize := True;
|
||||
@ -118,4 +110,3 @@ begin
|
||||
btn.Caption := 'Donate';
|
||||
btn.OnClick := @DonateClick;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user