Skip to content

Commit 317edcd

Browse files
committed
feat: enable InnoSetup script for creating Windows installer
1 parent 287abde commit 317edcd

9 files changed

+346
-0
lines changed

create-windows-installer.iss

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
; HeidiSQL setup script for Innosetup
2+
3+
; Set commonly used constants for preprocessor
4+
#define ProgName "HeidiSQL"
5+
#define ProgNameLower LowerCase(ProgName)
6+
#define ProgExeName ProgNameLower + ".exe"
7+
#define WebSite "https://www." + ProgNameLower + ".com/"
8+
#define OutDir ".\out\"
9+
#define ResourceDir ".\res\"
10+
#define SnippetsDir "{autodocs}\" + ProgName + "\Snippets"
11+
; Some effort to get the major.minor program version: "11.23"
12+
#define ProgVerMajor
13+
#define ProgVerMinor
14+
#define ProgVerRevision
15+
#define ProgVerBuild
16+
#define ProgVersion GetVersionComponents(OutDir + ProgNameLower + ".exe", ProgVerMajor, ProgVerMinor, ProgVerRevision, ProgVerBuild)
17+
#define ProgVersionStr Str(ProgVerMajor) + "." + Str(ProgVerMinor) + "." + Str(ProgVerRevision) + "." + Str(ProgVerBuild)
18+
19+
[Languages]
20+
Name: "en"; MessagesFile: "compiler:Default.isl"
21+
Name: "hy"; MessagesFile: "compiler:Languages\Armenian.isl"
22+
Name: "bg"; MessagesFile: "compiler:Languages\Bulgarian.isl"
23+
Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl"
24+
Name: "co"; MessagesFile: "compiler:Languages\Corsican.isl"
25+
Name: "cs"; MessagesFile: "compiler:Languages\Czech.isl"
26+
Name: "da"; MessagesFile: "compiler:Languages\Danish.isl"
27+
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
28+
Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl"
29+
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
30+
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
31+
Name: "he"; MessagesFile: "compiler:Languages\Hebrew.isl"
32+
Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl"
33+
Name: "is"; MessagesFile: "compiler:Languages\Icelandic.isl"
34+
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
35+
Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl"
36+
Name: "kr"; MessagesFile: "compiler:Languages\Korean.isl"
37+
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl"
38+
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
39+
Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl"
40+
Name: "pt_BR"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
41+
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
42+
Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl"
43+
Name: "sl"; MessagesFile: "compiler:Languages\Slovenian.isl"
44+
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
45+
Name: "se"; MessagesFile: "compiler:Languages\Swedish.isl"
46+
Name: "ta"; MessagesFile: "compiler:Languages\Tamil.isl"
47+
Name: "tr"; MessagesFile: "compiler:Languages\Turkish.isl"
48+
Name: "uk"; MessagesFile: "compiler:Languages\Ukrainian.isl"
49+
50+
[Setup]
51+
AppId={#ProgName}
52+
AppName={#ProgName}
53+
AppVerName={#ProgName} {#ProgVersion}
54+
VersionInfoVersion={#ProgVersion}
55+
; Displayed on the "Support" dialog of the Add/Remove Programs Control Panel applet:
56+
AppVersion={#ProgVersionStr}
57+
AppPublisher=Ansgar Becker
58+
AppPublisherURL={#WebSite}
59+
AppSupportURL={#WebSite}forum.php
60+
AppUpdatesURL={#WebSite}download.php
61+
AppContact=anse@heidisql.com
62+
AppReadmeFile={#WebSite}help.php?place=installer
63+
Compression=lzma2/ultra64
64+
SolidCompression=yes
65+
CloseApplications=yes
66+
ShowLanguageDialog=auto
67+
DefaultDirName={autopf}\{#ProgName}
68+
DefaultGroupName={#ProgName}
69+
AllowNoIcons=yes
70+
LicenseFile=license.txt
71+
ChangesAssociations=yes
72+
WizardStyle=modern
73+
WizardImageFile={#ResourceDir}installer-logo.bmp
74+
WizardSmallImageFile={#ResourceDir}installer-small-logo.bmp
75+
OutputDir={#OutDir}
76+
OutputBaseFilename={#ProgName}_{#ProgVersionStr}_Setup
77+
UninstallDisplayIcon={app}\{#ProgExeName}
78+
SetupIconFile={#ResourceDir}heidisql.ico
79+
ArchitecturesAllowed=x64compatible
80+
ArchitecturesInstallIn64BitMode=x64compatible
81+
UsePreviousAppDir=yes
82+
DirExistsWarning=auto
83+
PrivilegesRequired=admin
84+
PrivilegesRequiredOverridesAllowed=commandline dialog
85+
;SignedUninstaller=yes
86+
;SignTool=signtool $f
87+
88+
[Tasks]
89+
Name: "desktopicon"; Description: "Create a &desktop icon"; GroupDescription: "Local options:"; MinVersion: 4,4
90+
Name: "install_snippets"; Description: "Create example SQL snippet files in {#SnippetsDir}"; GroupDescription: "Local options:"; Flags: unchecked
91+
Name: "associatesqlfiles"; Description: "Associate .&SQL files with {#ProgName}"; GroupDescription: "Local options:";
92+
93+
[Files]
94+
Source: "{#OutDir}{#ProgNameLower}.exe"; DestDir: "{app}"; DestName: "{#ProgExeName}"; Flags: ignoreversion
95+
Source: "license.txt"; DestDir: "{app}"; Flags: ignoreversion
96+
Source: "LICENSE"; DestDir: "{app}"; Flags: ignoreversion
97+
Source: "extra\dll\plugins\*.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion
98+
Source: "extra\Snippets\*.sql"; DestDir: "{#SnippetsDir}"; Tasks: install_snippets
99+
Source: "extra\dll\plink-64.exe"; DestDir: "{app}"; DestName: "plink.exe"; Flags: ignoreversion
100+
Source: "extra\dll\plink-0.81-64.exe"; DestDir: "{app}"; DestName: "plink-0.81.exe"; Flags: ignoreversion
101+
; MySQL + MariaDB:
102+
Source: "extra\dll\libmariadb.dll"; DestDir: "{app}"; DestName: "libmariadb.dll"; Flags: ignoreversion
103+
Source: "extra\dll\libmysql.dll"; DestDir: "{app}"; DestName: "libmysql.dll"; Flags: ignoreversion
104+
Source: "extra\dll\libmysql-6.1.dll"; DestDir: "{app}"; DestName: "libmysql-6.1.dll"; Flags: ignoreversion
105+
Source: "extra\dll\libmysql-8.4.0.dll"; DestDir: "{app}"; DestName: "libmysql-8.4.0.dll"; Flags: ignoreversion
106+
Source: "extra\dll\libmysql-9.4.0.dll"; DestDir: "{app}"; DestName: "libmysql-9.4.0.dll"; Flags: ignoreversion
107+
; PostgreSQL:
108+
Source: "extra\dll\libpq-15.dll"; DestDir: "{app}"; DestName: "libpq-15.dll"; Flags: ignoreversion
109+
Source: "extra\dll\libpq-17.dll"; DestDir: "{app}"; DestName: "libpq-17.dll"; Flags: ignoreversion
110+
Source: "extra\dll\libintl-9.dll"; DestDir: "{app}"; DestName: "libintl-9.dll"; Flags: ignoreversion
111+
Source: "extra\dll\libssl-3-x64.dll"; DestDir: "{app}"; DestName: "libssl-3-x64.dll"; Flags: ignoreversion
112+
Source: "extra\dll\libcrypto-3-x64.dll"; DestDir: "{app}"; DestName: "libcrypto-3-x64.dll"; Flags: ignoreversion
113+
Source: "extra\dll\LICENSE-openssl"; DestDir: "{app}"; Flags: ignoreversion
114+
Source: "extra\dll\libiconv-2.dll"; DestDir: "{app}"; DestName: "libiconv-2.dll"; Flags: ignoreversion
115+
Source: "extra\dll\libwinpthread-1.dll"; DestDir: "{app}"; DestName: "libwinpthread-1.dll"; Flags: ignoreversion
116+
; SQLite:
117+
Source: "extra\dll\sqlite3.dll"; DestDir: "{app}"; DestName: "sqlite3.dll"; Flags: ignoreversion
118+
Source: "extra\dll\sqlite3mc.dll"; DestDir: "{app}"; DestName: "sqlite3mc.dll"; Flags: ignoreversion
119+
; Interbase/Firebird:
120+
Source: "extra\dll\ibclient64-14.1.dll"; DestDir: "{app}"; Flags: ignoreversion
121+
Source: "extra\dll\fbclient-4.0.dll"; DestDir: "{app}"; DestName: "fbclient-4.0.dll"; Flags: ignoreversion
122+
; SQL function definitions
123+
Source: "extra\ini\functions-*.ini"; DestDir: "{app}"; Flags: ignoreversion
124+
125+
126+
[Icons]
127+
Name: "{group}\{#ProgName}"; Filename: "{app}\{#ProgExeName}"
128+
Name: "{group}\Website"; Filename: "{#Website}"
129+
Name: "{group}\General help"; Filename: "{#Website}help.php?place=startmenu"
130+
Name: "{autodesktop}\{#ProgName}"; Filename: "{app}\{#ProgExeName}"; MinVersion: 4,4; Tasks: desktopicon
131+
132+
[Registry]
133+
Root: HKCR; Subkey: ".sql"; ValueType: string; ValueName: ""; ValueData: "SQLScriptFile"; Flags: noerror uninsdeletevalue; Tasks: associatesqlfiles
134+
Root: HKCR; Subkey: "SQLScriptFile"; ValueType: string; ValueName: ""; ValueData: "SQL-Script"; Flags: noerror uninsdeletekey; Tasks: associatesqlfiles
135+
Root: HKCR; Subkey: "SQLScriptFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#ProgExeName},0"; Flags: noerror; Tasks: associatesqlfiles
136+
Root: HKCR; Subkey: "SQLScriptFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ProgExeName}"" ""%1"""; Flags: noerror; Tasks: associatesqlfiles
137+
138+
[Run]
139+
Filename: "{app}\{#ProgExeName}"; Description: "Launch {#ProgName}"; Flags: nowait postinstall skipifsilent
140+
141+
[Code]
142+
var
143+
txt: TNewStaticText;
144+
btn: TButton;
145+
146+
procedure DonateClick(Sender: TObject);
147+
var
148+
ErrorCode: Integer;
149+
begin
150+
ShellExec('open', '{#WebSite}donatebutton.php?place=installer', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
151+
end;
152+
153+
procedure InitializeWizard();
154+
begin
155+
txt := TNewStaticText.Create(WizardForm);
156+
txt.Parent := WizardForm.FinishedPage;
157+
txt.Caption := '{#ProgName} is free software for database workers.'+#13#10+'Keep it alive with a donation:';
158+
txt.Left := WizardForm.FinishedLabel.Left;
159+
txt.Top := WizardForm.FinishedLabel.Top + WizardForm.FinishedLabel.Height + 80;
160+
161+
btn := TButton.Create(WizardForm);
162+
btn.Parent := WizardForm.FinishedPage;
163+
btn.Left := txt.Left;
164+
btn.Top := txt.Top + txt.Height + 10;
165+
btn.Width := WizardForm.Width div 2;
166+
btn.Height := WizardForm.CancelButton.Height + 10;
167+
btn.Caption := 'Donate via Paypal';
168+
btn.OnClick := @DonateClick;
169+
end;
170+
171+
172+
procedure CurPageChanged(CurPageID: Integer);
173+
begin
174+
if CurPageID = wpFinished then
175+
WizardForm.ActiveControl := btn;
176+
end;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SELECT t1.row1 r1, COUNT(*) hits
2+
FROM table1 t1
3+
GROUP BY
4+
r1
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SELECT t1.*
2+
FROM table1 t1
3+
LEFT JOIN table2 AS t2 ON t1.id = t2.relid
4+
WHERE
5+
t2.relid IS NULL

extra/dll/LICENSE-openssl

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
2+
LICENSE ISSUES
3+
==============
4+
5+
The OpenSSL toolkit stays under a double license, i.e. both the conditions of
6+
the OpenSSL License and the original SSLeay license apply to the toolkit.
7+
See below for the actual license texts.
8+
9+
OpenSSL License
10+
---------------
11+
12+
/* ====================================================================
13+
* Copyright (c) 1998-2019 The OpenSSL Project. All rights reserved.
14+
*
15+
* Redistribution and use in source and binary forms, with or without
16+
* modification, are permitted provided that the following conditions
17+
* are met:
18+
*
19+
* 1. Redistributions of source code must retain the above copyright
20+
* notice, this list of conditions and the following disclaimer.
21+
*
22+
* 2. Redistributions in binary form must reproduce the above copyright
23+
* notice, this list of conditions and the following disclaimer in
24+
* the documentation and/or other materials provided with the
25+
* distribution.
26+
*
27+
* 3. All advertising materials mentioning features or use of this
28+
* software must display the following acknowledgment:
29+
* "This product includes software developed by the OpenSSL Project
30+
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
31+
*
32+
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
33+
* endorse or promote products derived from this software without
34+
* prior written permission. For written permission, please contact
35+
* openssl-core@openssl.org.
36+
*
37+
* 5. Products derived from this software may not be called "OpenSSL"
38+
* nor may "OpenSSL" appear in their names without prior written
39+
* permission of the OpenSSL Project.
40+
*
41+
* 6. Redistributions of any form whatsoever must retain the following
42+
* acknowledgment:
43+
* "This product includes software developed by the OpenSSL Project
44+
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
45+
*
46+
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
47+
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
48+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
49+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
50+
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
51+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
52+
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
53+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
54+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
55+
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
56+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
57+
* OF THE POSSIBILITY OF SUCH DAMAGE.
58+
* ====================================================================
59+
*
60+
* This product includes cryptographic software written by Eric Young
61+
* (eay@cryptsoft.com). This product includes software written by Tim
62+
* Hudson (tjh@cryptsoft.com).
63+
*
64+
*/
65+
66+
Original SSLeay License
67+
-----------------------
68+
69+
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
70+
* All rights reserved.
71+
*
72+
* This package is an SSL implementation written
73+
* by Eric Young (eay@cryptsoft.com).
74+
* The implementation was written so as to conform with Netscapes SSL.
75+
*
76+
* This library is free for commercial and non-commercial use as long as
77+
* the following conditions are aheared to. The following conditions
78+
* apply to all code found in this distribution, be it the RC4, RSA,
79+
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
80+
* included with this distribution is covered by the same copyright terms
81+
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
82+
*
83+
* Copyright remains Eric Young's, and as such any Copyright notices in
84+
* the code are not to be removed.
85+
* If this package is used in a product, Eric Young should be given attribution
86+
* as the author of the parts of the library used.
87+
* This can be in the form of a textual message at program startup or
88+
* in documentation (online or textual) provided with the package.
89+
*
90+
* Redistribution and use in source and binary forms, with or without
91+
* modification, are permitted provided that the following conditions
92+
* are met:
93+
* 1. Redistributions of source code must retain the copyright
94+
* notice, this list of conditions and the following disclaimer.
95+
* 2. Redistributions in binary form must reproduce the above copyright
96+
* notice, this list of conditions and the following disclaimer in the
97+
* documentation and/or other materials provided with the distribution.
98+
* 3. All advertising materials mentioning features or use of this software
99+
* must display the following acknowledgement:
100+
* "This product includes cryptographic software written by
101+
* Eric Young (eay@cryptsoft.com)"
102+
* The word 'cryptographic' can be left out if the rouines from the library
103+
* being used are not cryptographic related :-).
104+
* 4. If you include any Windows specific code (or a derivative thereof) from
105+
* the apps directory (application code) you must include an acknowledgement:
106+
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
107+
*
108+
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
109+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
110+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
111+
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
112+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
113+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
114+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
115+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
116+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
117+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
118+
* SUCH DAMAGE.
119+
*
120+
* The licence and distribution terms for any publically available version or
121+
* derivative of this code cannot be changed. i.e. this code cannot simply be
122+
* copied and put under another distribution licence
123+
* [including the GNU Public Licence.]
124+
*/
125+

extra/dll/plink-0.81-64.exe

973 KB
Binary file not shown.

extra/dll/plink-64.exe

1010 KB
Binary file not shown.

license.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Copyright (C)2000 - 2026 - Ansgar Becker
2+
3+
HeidiSQL is free. You don't have to pay for it, and you can use it any
4+
way you want. It is developed as an Open Source project under the GNU
5+
General Public License (GPL). That means you have full access to the source
6+
code of this program. You can find it at GitHub here:
7+
https://github.com/HeidiSQL/HeidiSQL
8+
9+
The General Public License (GPL) is shipped with the installer-package and
10+
should be located in the same folder as this file (gpl.txt).
11+
12+
If you simply wish to install and use this software, you need only be aware
13+
of the disclaimer conditions in the license, which are set out below.
14+
15+
NO WARRANTY
16+
17+
Because the program is licensed free of charge, there is no warranty for the
18+
program, to the extent permitted by applicable law. Except when otherwise
19+
stated in writing the copyright holders and/or other parties provide the
20+
program "as is" without warranty of any kind, either expressed or implied,
21+
including, but not limited to, the implied warranties of merchantability and
22+
fitness for a particular purpose. The entire risk as to the quality and
23+
performance of the program is with you. Should the program prove defective,
24+
you assume the cost of all necessary servicing, repair or correction.
25+
In no event unless required by applicable law or agreed to in writing will
26+
any copyright holder, or any other party who may modify and/or redistribute
27+
the program as permitted above, be liable to you for damages, including any
28+
general, special, incidental or consequential damages arising out of the use
29+
or inability to use the program (including but not limited to loss of data
30+
or data being rendered inaccurate or losses sustained by you or third
31+
parties or a failure of the program to operate with any other programs),
32+
even if such holder or other party has been advised of the possibility of
33+
such damages.
34+
35+
This product includes software developed by the OpenSSL Project
36+
for use in the OpenSSL Toolkit. (http://www.openssl.org/)

res/installer-logo.bmp

1.25 MB
Binary file not shown.

res/installer-small-logo.bmp

9.08 KB
Binary file not shown.

0 commit comments

Comments
 (0)