Skip to content

Commit 9e5ce57

Browse files
committed
[+] add installer
1 parent 2b5b7c3 commit 9e5ce57

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
patroni*
1+
/patroni*

installer/patroni.iss

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "Patroni Environment Setup"
5+
#define MyAppVersion "0.1"
6+
#define MyAppPublisher "CYBERTEC PostgreSQL International GmbH"
7+
#define MyAppURL "https://www.cybertec-postgresql.com/"
8+
9+
[Setup]
10+
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
11+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
12+
AppId={{4D29D928-999E-4D56-9896-76DEB4F259EC}
13+
AppName={#MyAppName}
14+
AppVersion={#MyAppVersion}
15+
;AppVerName={#MyAppName} {#MyAppVersion}
16+
AppPublisher={#MyAppPublisher}
17+
AppPublisherURL={#MyAppURL}
18+
AppSupportURL={#MyAppURL}
19+
AppUpdatesURL={#MyAppURL}
20+
DefaultDirName={autopf}\{#MyAppName}
21+
DefaultGroupName={#MyAppName}
22+
AllowNoIcons=yes
23+
LicenseFile=..\LICENSE
24+
; Uncomment the following line to run in non administrative install mode (install for current user only.)
25+
PrivilegesRequired=lowest
26+
OutputDir=..
27+
OutputBaseFilename=Patroni-Env-Setup
28+
Compression=lzma
29+
SolidCompression=yes
30+
WizardStyle=modern
31+
ArchitecturesInstallIn64BitMode="x64"
32+
33+
[Languages]
34+
Name: "english"; MessagesFile: "compiler:Default.isl"
35+
36+
[Files]
37+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
38+
Source: "..\patroni-win-x64\python-install.exe"; DestDir: "{app}"
39+
Source: "..\patroni-win-x64\*.bat"; DestDir: "{app}"
40+
Source: "..\patroni-win-x64\*.yml"; DestDir: "{app}"
41+
Source: "..\patroni-win-x64\etcd\*"; DestDir: "{app}\etcd"; Flags: ignoreversion createallsubdirs recursesubdirs
42+
Source: "..\patroni-win-x64\patroni\*"; DestDir: "{app}\patroni"; Flags: ignoreversion createallsubdirs recursesubdirs
43+
44+
[Icons]
45+
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
46+
47+
[Run]
48+
; Filename: "{app}\python-install.exe"; Parameters: "SimpleInstall=1 InstallAllUsers=0 PrependPath=1 Include_test=0 Include_launcher=0 SimpleInstallDescription=""Patroni Environment Setup"""; Flags: waituntilterminated; Description: "Install Python interpreter"
49+
; Filename: "{localappdata}\Programs\Python\Python38\Scripts\pip3.exe"; Parameters: "install --no-index --find-links .patroni-packages -r requirements.txt"; WorkingDir: "{app}"; Flags: waituntilterminated runasoriginaluser runmaximized; StatusMsg: "Installing required packages"
50+
; Filename: "{localappdata}\Programs\Python\Python38\Scripts\pip3.exe"; Parameters: "install --no-index --find-links ""{app}\.patroni-packages"" psycopg2-binary"; WorkingDir: "{app}"; Flags: waituntilterminated runasoriginaluser runmaximized; Description: "Install required packages"; StatusMsg: "Installing psycopg2 package..."
51+
Filename: "{app}\install.bat"; WorkingDir: "{app}"; Flags: waituntilterminated

make-installer.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@ECHO off
2+
3+
SET "INNOTOOL=C:\Program Files (x86)\Inno Setup 6"
4+
5+
IF NOT EXIST "%INNOTOOL%" (
6+
ECHO !INNOTOOL! does not exist
7+
ECHO Please install Innotool and set the INNOTOOL environment variable.
8+
EXIT /B 1
9+
)
10+
11+
CALL "%INNOTOOL%\iscc.exe" "installer\patroni.iss" || EXIT /B 1

0 commit comments

Comments
 (0)