Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04a89c2

Browse files
committed
WIP
1 parent093254f commit04a89c2

File tree

2 files changed

+62
-87
lines changed

2 files changed

+62
-87
lines changed

‎Readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ If you want to use GIT:
4242
You can specify several environmental variables depending on desirable result:
4343

4444
* PROBACKUP_VERSION=[2.1.3/2.1.5] - pg_probackup full version
45-
45+
* PROBACKUP_EDITION=[vanilla/std] -- fork to build probackup for, default 'vanilla'
46+
* PROBACKUP_PATCH_POSTGRESQL=[YES/NO] -- apply probackup specific patches, default NO

‎build/helpers/probackup.cmd

Lines changed: 60 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,60 @@
1-
SETPGDIRSRC=Z:\extension-packaging\pg_probackup\windows\postgresql
2-
SETPGDIR=Z:\inst\
3-
SETPGDIRSRC=Z:\pgwininstall\builddir\postgresql\postgresql-11.2.1
4-
SETPGDIR=Z:\Program Files\PostgresProEnterprise\11
5-
SETAPPVERSION=2.1.1
6-
SETPG_REG_KEY=SOFTWARE\PostgresPro\X64\PostgresProEnterprise\11\Installations\postgresql-11
7-
SETPG_DEF_BRANDING=PostgresPro Enterprise11
8-
SETPRODUCT_NAME=PostgresProEnterprise
9-
SETBITS=64bit
10-
SETPGVER=11.1.1
11-
SETEDITION=vanilla
12-
SETAPPVERSION=2.1.1
13-
SETPRODUCT_NAME=PostgreSQL
14-
15-
SETPERL5LIB=.
16-
17-
rem GOTO :INS
18-
SETLIB=%LIB%%PGDIR%\lib;
19-
SETINCLUDE=%INCLUDE%%PGDIR%\include\server;%PGDIR%\include\server\port\win32;%PGDIR%\include\server\port\win32_msvc;%PGDIR%\include;addsrc\;src\;
20-
setCPU=AMD64
21-
REM GOTO :INS
22-
SETARCHIVE=pg_probackup-%APPVERSION%.tar.gz
23-
IFNOTexist .\pg_probackup (
24-
echo Download sources ...
25-
git clone https://github.com/postgrespro/pg_probackup.git -b%APPVERSION%||goto :ERROR
26-
REM wget -O "%ARCHIVE%" "http://localrepo.l.postgrespro.ru/tarballs/extensions/%ARCHIVE%"|| goto :ERROR
27-
REM MKDIR .\pg_probackup
28-
REM tar xf %ARCHIVE% -C .\pg_probackup
29-
)
30-
31-
perl genres.pl"pg_probackup for PostgreSQL"%APPVERSION% exe||GOTO :ERROR
32-
cp win32ver.rc ./pg_probackup
33-
cp win32.ico ./pg_probackup
34-
CD pg_probackup
35-
mkdir addsrc
36-
cp"%PGDIRSRC%/src/backend/access/transam/xlogreader.c" addsrc||goto :ERROR
37-
cp"%PGDIRSRC%/src/backend/utils/hash/pg_crc.c" addsrc||goto :ERROR
38-
cp"%PGDIRSRC%/src/bin/pg_basebackup/receivelog.c" addsrc||goto :ERROR
39-
cp"%PGDIRSRC%/src/bin/pg_basebackup/receivelog.h" addsrc||goto :ERROR
40-
cp"%PGDIRSRC%/src/bin/pg_basebackup/streamutil.c" addsrc||goto :ERROR
41-
cp"%PGDIRSRC%/src/bin/pg_basebackup/streamutil.h" addsrc||goto :ERROR
42-
cp"%PGDIRSRC%/src/bin/pg_basebackup/walmethods.c" addsrc
43-
cp"%PGDIRSRC%/src/bin/pg_basebackup/walmethods.h" addsrc
44-
cp"%PGDIRSRC%/src/bin/pg_rewind/datapagemap.c" addsrc||goto :ERROR
45-
cp"%PGDIRSRC%/src/bin/pg_rewind/datapagemap.h" addsrc||goto :ERROR
46-
cp"%PGDIRSRC%/src/bin/pg_rewind/logging.h" addsrc||goto :ERROR
47-
cp"%PGDIRSRC%/src/timezone/strftime.c" addsrc||goto :ERROR
48-
cp"%PGDIRSRC%/src/timezone/private.h" addsrc||goto :ERROR
49-
50-
cp"%PGDIRSRC%/src/interfaces/libpq/pthread-win32.c" addsrc||goto :ERROR
51-
cp"%PGDIRSRC%/src/interfaces/libpq/pqexpbuffer.h" addsrc||goto :ERROR
52-
cp"%PGDIRSRC%/src/interfaces/libpq/libpq-int.h" addsrc||goto :ERROR
53-
cp"%PGDIRSRC%/src/port/pthread-win32.h" addsrc||goto :ERROR
54-
mkdir addsrc\port
55-
cp"%PGDIRSRC%/src/port/pthread-win32.h" addsrc/port/||goto :ERROR
56-
57-
rc.exe win32ver.rc
58-
CL /MD /O2 src\*.c src\utils\*.c addsrc\*.c /DWIN32 /DFRONTEND /Fepg_probackup.exe /link ws2_32.lib advapi32.lib libpq.lib libpgport.lib libintl.lib zdll.lib iconv.lib libpgcommon.lib win32ver.res||goto :ERROR
59-
rem libecpg.lib -> libpgtypes.lib libpgfeutils.lib
60-
mkdir .\..\out
61-
mkdir .\..\out\bin
62-
copy pg_probackup.exe .\..\out\bin
63-
64-
mkdir .\..\out_full
65-
copy pg_probackup.exe .\..\out_full
66-
cp"%PGDIR%/bin/libpq.dll" ./../out_full
67-
cp"%PGDIR%/bin/zlib1.dll" ./../out_full
68-
cp"%PGDIR%/bin/libintl.dll" ./../out_full
69-
cp"%PGDIR%/bin/libeay32.dll" ./../out_full
70-
cp"%PGDIR%/bin/libiconv.dll" ./../out_full
71-
cp"%PGDIR%/bin/ssleay32.dll" ./../out_full
72-
rem copy C:\Windows\System32\msvcr120.dll .\..\out_full
73-
74-
rem SET ZIP_FILE=%PRODUCT_NAME%_%PGVER%_%BITS%_Pg_probackup%APPVERSION%.zip
75-
SETZIP_FILE=pg-probackup-%EDITION%-%PG_MAJOR_VERSION%-%APPVERSION%-%BITS%.zip
76-
rem 7z.exe a .\..\out\pg_probackup.zip .\..\out\*.* -r
77-
7z.exe a .\..\%ZIP_FILE% .\..\out\*.* -r
78-
79-
goto :DONE
80-
81-
:ERROR
82-
ECHO Failed with error #%errorlevel%.
83-
EXIT /b%errorlevel%
84-
85-
:DONE
86-
ECHO Done.
1+
CALL%ROOT%\build\helpers\setvars.cmd
2+
3+
IFEXIST%DOWNLOADS_DIR%\%DEPS_ZIP% (
4+
7z x%DOWNLOADS_DIR%\%DEPS_ZIP% -o%DEPENDENCIES_BIN_DIR% -y
5+
REM Go to last build
6+
GOTO :BUILD_ALL
7+
)ELSE (
8+
ECHO"You need to build dependencies first!"
9+
EXIT /B1||GOTO :ERROR
10+
)
11+
12+
SETPROBACKUP_URL=https://github.com/postgrespro/pg_probackup/tarball/%PROBACKUP_VERSION%
13+
SETBIN_DIR=%BUILD_DIR%\pg_probackup_%PG_MAJOR_VERSION%_%PROBACKUP_VERSION%_%ARCH%
14+
SETPRODUCT_NAME=PostgreSQL
15+
16+
SETPGDIRSRC=%BUILD_DIR%\postgresql\postgresql-%PG_MAJOR_VERSION%\
17+
SETPGDIR=Z:\inst\
18+
19+
SETPGDIR=Z:\Program Files\PostgresProEnterprise\11
20+
SETPG_REG_KEY=SOFTWARE\PostgresPro\X64\PostgresProEnterprise\11\Installations\postgresql-11
21+
22+
SETINCLUDE=%INCLUDE%%PGDIR%\include\server;%PGDIR%\include\server\port\win32;%PGDIR%\include\server\port\win32_msvc;%PGDIR%\include;addsrc\;src\;
23+
SETARCHIVE=pg_probackup-%PROBACKUP_VERSION%.tar.gz
24+
25+
echo Download sources ...
26+
27+
rm -rf%BUILD_DIR%\pg_probackup||GOTO :ERROR
28+
MKDIR%BUILD_DIR%\pg_probackup||GOTO :ERROR
29+
MKDIR%BUILD_DIR%\pg_probackup\pg_probackup-%PG_MAJOR_VERSION%-%PROBACKUP_VERSION%||GOTO :ERROR
30+
31+
CD /D%BUILD_DIR%\pg_probackup\pg_probackup-%PG_MAJOR_VERSION%-%PROBACKUP_VERSION%||GOTO :ERROR
32+
wget --no-check-certificate%PROBACKUP_URL% -O%DOWNLOADS_DIR%\pg_probackup-%PROBACKUP_VERSION%.tar.bz2||GOTO :ERROR
33+
34+
tar xf%DOWNLOADS_DIR%\pg_probackup-%PROBACKUP_VERSION%.tar.bz2 -C%BUILD_UDIR%/pg_probackup||GOTO :ERROR
35+
CD /D%BUILD_DIR%\pg_probackup\*%PROBACKUP_VERSION%*||GOTO :ERROR
36+
37+
gen_probackup_project.pl%BUILD_DIR%\postgresql\postgresql-%PG_MAJOR_VERSION%
38+
39+
MKDIR%BIN_DIR%||GOTO :ERROR
40+
MKDIR%BIN_DIR%\bin||GOTO :ERROR
41+
42+
rem copy pg_probackup binaries and dependencies
43+
copy%BUILD_DIR%\postgresql\postgresql-%PG_MAJOR_VERSION%\Release\pg_probackup.exe%BIN_DIR%||GOTO :ERROR
44+
copy%BUILD_DIR%\postgresql\postgresql-%PG_MAJOR_VERSION%\Release\libpq\libpq.dll%BIN_DIR%||GOTO :ERROR
45+
copy%DEPENDENCIES_BIN_DIR%\zlib\lib\zlib1.dll%BIN_DIR%||GOTO :ERROR
46+
copy%DEPENDENCIES_BIN_DIR%\openssl\lib\libeay32.dll%BIN_DIR%||GOTO :ERROR
47+
copy%DEPENDENCIES_BIN_DIR%\openssl\lib\ssleay32.dll%BIN_DIR%||GOTO :ERROR
48+
49+
rem SET ZIP_FILE=pg-probackup-%PROBACKU_EDITION%-%PG_MAJOR_VERSION%-%PROBACKUP_VERSION%-%ARCH%.zip
50+
rem 7z.exe a .\..\out\pg_probackup.zip .\..\out\*.* -r
51+
rem 7z.exe a .\..\%ZIP_FILE% .\..\out\*.* -r
52+
53+
goto :DONE
54+
55+
:ERROR
56+
ECHO Failed with error #%errorlevel%.
57+
EXIT /b%errorlevel%
58+
59+
:DONE
60+
ECHO Done.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp