Skip to content

Commit 3262a4f

Browse files
committed
[+] ship pgsql binaries within installation, closes #7
1 parent 4ffc1ae commit 3262a4f

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

installer/patroni.iss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
3737

3838
[Files]
3939
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
40-
Source: "..\patroni-win-x64\python-install.exe"; DestDir: "{app}"
41-
Source: "..\patroni-win-x64\*.bat"; DestDir: "{app}"
42-
Source: "..\patroni-win-x64\etcd\*"; DestDir: "{app}\etcd"; Flags: ignoreversion createallsubdirs recursesubdirs
43-
Source: "..\patroni-win-x64\micro\*"; DestDir: "{app}\micro"; Flags: ignoreversion createallsubdirs recursesubdirs
44-
Source: "..\patroni-win-x64\patroni\*"; DestDir: "{app}\patroni"; Flags: ignoreversion createallsubdirs recursesubdirs
45-
Source: "..\patroni-win-x64\vip-manager\*"; DestDir: "{app}\vip-manager"; Flags: ignoreversion createallsubdirs recursesubdirs
46-
40+
Source: "..\patroni-win-x64\*"; DestDir: "{app}"; Flags: ignoreversion createallsubdirs recursesubdirs
4741

4842
[Icons]
4943
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"

make.bat

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ SET PATRONI_REF=https://github.com/zalando/patroni/archive/v1.6.5.zip
55
SET MICRO_REF=https://github.com/zyedidia/micro/releases/download/v2.0.6/micro-2.0.6-win64.zip
66
SET WINSW_REF=https://github.com/winsw/winsw/releases/download/v2.9.0/WinSW.NET461.exe
77
SET VIP_REF=https://github.com/cybertec-postgresql/vip-manager/releases/download/v1.0-beta/vip-manager.zip
8+
SET PGSQL_REF=https://get.enterprisedb.com/postgresql/postgresql-12.3-1-windows-x64-binaries.zip
89

910
@ECHO --- Start bootstrapping ---
1011

1112
RMDIR /Q /S %MD% patroni > nul 2>&1
1213
DEL %MD%.zip > nul 2>&1
1314
MKDIR %MD%
1415
COPY src\*.bat %MD%\
16+
COPY src\*.ps1 %MD%\
1517

1618
@ECHO --- Update Python and PIP installation ---
1719
CALL install-env.bat
@@ -36,6 +38,13 @@ powershell -Command "Expand-Archive '%TEMP%\vip.zip' '%CD%'"
3638
MOVE vip-manager* %MD%\vip-manager
3739
@ECHO --- VIP-MANAGER downloaded ---
3840

41+
@ECHO --- Download POSTGRESQL ---
42+
curl %PGSQL_REF% --location --output %TEMP%\pgsql.zip
43+
powershell -Command "Expand-Archive '%TEMP%\pgsql.zip' '%CD%'"
44+
MOVE pgsql* %MD%\pgsql
45+
RMDIR /Q /S "%MD%\pgsql\pgAdmin 4" "%MD%\pgsql\symbols"
46+
@ECHO --- POSTGRESQL downloaded ---
47+
3948
@ECHO --- Download PATRONI ---
4049
curl %PATRONI_REF% --location --output %TEMP%\patroni.zip
4150
powershell -Command "Expand-Archive '%TEMP%\patroni.zip' '%CD%'"

src/install-packages.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ SET PIP=pip3.exe
66
CD patroni
77
%PIP% install --no-index --find-links .patroni-packages -r requirements.txt
88
%PIP% install --no-index --find-links .patroni-packages psycopg2-binary
9+
CD ..
910
@ECHO --- Patroni packages installed ---
1011

1112
@ECHO --- You may close this terminal window ---

0 commit comments

Comments
 (0)