-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make changes to windows build environment to support GitHub Actions
Historically, the build-windows-x64.sh script was responsible to prepare the build environment, to compile the source code and to generate the BitRock based installer. This is now changed to using GitHub Actions based workflow and the supporting powershell scripts. The workflow resides in a separate repository whereas the build scripts and installer code resides in this repository. Summary of the Changes: - remove build-windows-x64.sh as it is no more needed, instead add new scripts compile.ps1, prepare-staging, compile-system-stats - packages-win64.txt contains 3rd party libs name and versions. - version.txt contains versions of PG, LP, stackbuilder and pgAdmin4 - update the project files to suite the newer Visual Studio - additional fixes required in installer XML DBP-858, Manika Singhal, --Tested by Manika Singhal --Reviewed by Sandeep Thakkar, Srinu Perabattula and Kritika Agarwal
- Loading branch information
1 parent
93957bf
commit 57b0e11
Showing
23 changed files
with
1,239 additions
and
2,013 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#! /bin/sh | ||
|
||
set -xeu | ||
|
||
NAME=postgresql | ||
|
||
: ${VERSION:?The VERSION environment variable is required} | ||
|
||
WORKDIR=$(pwd)/src | ||
cd ${WORKDIR} | ||
TARNAME="${NAME}-${VERSION}.${EXTRA_VERSION:-}" | ||
wget ${URL} | ||
md5sum "${TARNAME}.tar.bz2" > "${TARNAME}.tar.bz2.md5" | ||
mv ${TARNAME}.tar.bz2 ../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
WD="$(dirname "$PWD")" | ||
|
||
# $1 - Component Name | ||
generate_3rd_party_license() | ||
{ | ||
export ComponentName="$1" | ||
export ListGeneratorScriptFileWin="$WD/list-libs-windows.sh" | ||
export ListGeneratorScriptFileJar="$WD/list-jars.sh" | ||
export ListPipModules="$WD/list_pip_libs.sh" | ||
export ListJSScripts="$WD/list_js_libs.sh" | ||
export ListpgAdminFiles="$WD/list_pgadmin_files.sh" | ||
export blnIsWindows=false | ||
export LibListDir="3rd_party_libraries_list" | ||
export CurrentDir="$PWD" | ||
export ComponentFile="$PWD/${ComponentName}_3rd_party_licenses.txt" | ||
export LicenseTypePath="$WD/resources/3rd_party_license_types" | ||
export LIBPQPattern="libpq" | ||
|
||
echo "[$FUNCNAME] Component Name: $ComponentName" | ||
echo "[$FUNCNAME] Library List File: $Lib_List_File" | ||
|
||
echo "[$FUNCNAME] Component File: $ComponentFile" | ||
|
||
|
||
mkdir -p "$WD/output/$LibListDir" | ||
|
||
blnIsWindows=true | ||
ListGeneratorScriptFile="$ListGeneratorScriptFileWin" | ||
CurrentPlatform="windows" | ||
|
||
export Lib_List_File="$WD/output/$LibListDir/${ComponentName}_${CurrentPlatform}_libs.txt" | ||
|
||
if [[ $ComponentName != "server" || $ComponentName != "commandlinetools" ]]; | ||
then | ||
LIBPQPattern=xyz${LIBPQPattern}abc | ||
fi | ||
|
||
TempFile=$(mktemp) | ||
$ListGeneratorScriptFile >> $TempFile | ||
$ListGeneratorScriptFileJar >> $TempFile | ||
$ListJSScripts >> $TempFile | ||
|
||
cat $TempFile | xargs -I{} grep -w {} $WD/resources/files_to_project_map.txt | sort -u | cut -f1 | grep -v $LIBPQPattern | xargs -I{} echo "awk '/\<{}\>/ {print \$1\" {}\"}' $WD/resources/license_to_project_map.txt" | sh | sort -u > $Lib_List_File | ||
|
||
awk '\ | ||
BEGIN \ | ||
{ \ | ||
prevLicenseName=""; \ | ||
listProject=""; \ | ||
system("rm -f "ENVIRON["ComponentFile"]); \ | ||
} \ | ||
{ \ | ||
gsub(/^project_/, "", $2); \ | ||
\ | ||
if ( $1 == prevLicenseName ) \ | ||
{ \ | ||
listProject=listProject", "$2; \ | ||
} \ | ||
else \ | ||
{ \ | ||
if ( listProject != "" ) \ | ||
{ \ | ||
system("echo -e \"==================\n"listProject" license\n==================\" >> "ENVIRON["ComponentFile"]); \ | ||
system("cat "ENVIRON["LicenseTypePath"]"/"prevLicenseName" >> "ENVIRON["ComponentFile"]); \ | ||
system("echo >> "ENVIRON["ComponentFile"]); \ | ||
} \ | ||
listProject=$2; \ | ||
prevLicenseName=$1; \ | ||
} \ | ||
} \ | ||
END \ | ||
{ \ | ||
if ( listProject != "" ) \ | ||
{ \ | ||
system("echo -e \"==================\n"listProject" license\n==================\" >> "ENVIRON["ComponentFile"]); \ | ||
system("cat "ENVIRON["LicenseTypePath"]"/"prevLicenseName" >> "ENVIRON["ComponentFile"]); \ | ||
system("echo >> "ENVIRON["ComponentFile"]); \ | ||
} \ | ||
}' $Lib_List_File | ||
|
||
if [[ ! -s $ComponentFile ]]; | ||
then | ||
rm -f $ComponentFile | ||
fi | ||
|
||
echo "cat componentfile" | ||
cat $ComponentFile | ||
|
||
if [[ -f $ComponentFile ]]; | ||
then | ||
if [[ $blnIsWindows == true ]]; | ||
then | ||
unix2dos $ComponentFile || _die "Unable to convert 3rd party license file [$ComponentFile] to dos format." | ||
else | ||
dos2unix $ComponentFile || _die "Unable to convert 3rd party license file [$ComponentFile] to unix format." | ||
fi | ||
|
||
chmod 444 $ComponentFile | ||
fi | ||
} | ||
|
||
pushd ../installer/server/staging/windows-x64/commandlinetools | ||
generate_3rd_party_license "commandlinetools" | ||
popd | ||
|
||
pushd ../installer/server/staging/windows-x64/stackbuilder | ||
generate_3rd_party_license "StackBuilder" | ||
popd | ||
|
||
pushd ../installer/server/staging/windows-x64/pgadmin4 | ||
generate_3rd_party_license "pgAdmin" | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
curl-8.8.0-windows-x64.tar.bz2 | ||
zstd-1.5.6-windows-x64.tar.bz2 | ||
lz4-1.9.4-windows-x64.tar.bz2 | ||
libxml2-2.11.8-windows-x64.tar.bz2 | ||
libxslt-1.1.39-windows-x64.tar.bz2 | ||
iconv-1.17-windows-x64.tar.bz2 | ||
zlib-1.3.1-windows-x64.tar.bz2 | ||
icu-67-1-windows-x64.tar.bz2 | ||
uuid-1.6.2-windows-x64.tar.bz2 | ||
wxwidgets-3.2.4-windows-x64.tar.bz2 | ||
gettext-0.19.8-windows-x64.tar.bz2 | ||
openssl-3.0.14-windows-x64.tar.bz2 | ||
libwinpthread-1.0.0-windows-x64.tar.bz2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Powershell script to compile system_stats | ||
|
||
# Setting variables | ||
$vc_bat_file="$(pwd)\packaging-config\server\scripts\windows\vc-build-x64.bat" | ||
$project_file="$(pwd)\system_stats\system_stats.vcxproj" | ||
$out_dir="$(pwd)\system_stats\x64\Release\" | ||
|
||
# Compilation | ||
Invoke-Expression -Command "$vc_bat_file $project_file Release x64 $out_dir v143" || exit 1 | ||
|
||
# Copy system-stats dlls to correct place | ||
Copy-Item "$(pwd)\system_stats\x64\Release\system_stats.dll" "$(pwd)\binaries-archive\pgsql\lib" | ||
Copy-Item "$(pwd)\system_stats\x64\Release\system_stats.dll" "$(pwd)\packaging-config\server" |
Oops, something went wrong.