Skip to content

Commit

Permalink
Build PG17 docs (#143)
Browse files Browse the repository at this point in the history
Build the PG17 docs using meson-doc.sh script as we can’t build the docs on windows.

Update installation-notes to use procedural languages pl/Perl,
pl/Python and pl/Tcl from community upstream for windows.

Use strawberry-perl 5.38
  • Loading branch information
muralikrishna05 authored Aug 7, 2024
1 parent 32cb8e9 commit b9eb892
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 12 deletions.
10 changes: 5 additions & 5 deletions server/resources/installation-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ <h3>Supported Operating Systems</h3>

<h3>Procedural Languages</h3>

<p>The procedural languages pl/Perl, pl/Python and pl/Tcl are included in this distribution of PostgreSQL. The server has been built using the LanguagePack community distributions of those language interpreters. To use any of the these languages from within PostgreSQL, download and install the appropriate interpreters and ensure they are included in the PATH variable under which the database server will be started. The versions used are shown below - newer minor (bugfix) releases may also work, but have not been tested:</p>
<p>The procedural languages pl/Perl, pl/Python and pl/Tcl are included in this distribution of PostgreSQL on Windows. The server has been built using the community upstream distributions of those language interpreters. To use any of the these languages from within PostgreSQL, download and install the appropriate interpreters and ensure they are included in the PATH variable under which the database server will be started. The versions used are shown below - newer minor (bugfix) releases may also work, but have not been tested:</p>

<ul>
<li>Perl 5.38</li>
<li>Python 3.11</li>
<li>Tcl 8.6</li>
<li>Perl 5.38 : https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_53822_64bit/strawberry-perl-5.38.2.2-64bit-portable.zip </li>
<li>Python 3.12 : https://www.python.org/ftp/python/3.12.3/python-3.12.3-amd64.exe </li>
<li>Tcl 8.6 : https://sourceforge.net/projects/magicsplat/files/latest/download</li>
</ul>

<p>The current pl/Python is dynamically linked with Python's shared library in the LanguagePack v4.x installers. Some distributions of Python interpreters (including ActivePython) on Linux do not carry a dynamic library of Python. Such interpreters would no longer be functional with pl/Python.We strongly recommend the users to use LanguagePack installers for pl/Perl, pl/Python and pl/Tcl. The beta installers might see plperl extension failing on x86_64 architecture</p>
<p>The current pl/Python is dynamically linked with Python's shared library in the LanguagePack v4.x installers. Some distributions of Python interpreters (including ActivePython) on Linux do not carry a dynamic library of Python. Such interpreters would no longer be functional with pl/Python.We strongly recommend the users to use LanguagePack installers for pl/Perl, pl/Python and pl/Tcl on macOS.</p>

<h3>pl/pgsql Debugger</h3>

Expand Down
4 changes: 4 additions & 0 deletions server/scripts/windows/compile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ Set-Acl $temporary_data_location $Acl
Write-Host "Executing meson bat file"
Start-Process -FilePath packaging-config/server/scripts/windows/meson.bat -Wait -NoNewWindow

Write-Host " Executing Doc Script "
C:\msys64\usr\bin\sh.exe packaging-config/server/scripts/windows/meson-doc.sh
Write-Host "Meson doc Script execution completed"

Write-Host "copying meson-install content to $installation_directory"
Copy-Item -Path "$source_directory\meson-install\*" -Destination $installation_directory/ -Recurse
Get-ChildItem -Path "$installation_directory"
Expand Down
18 changes: 18 additions & 0 deletions server/scripts/windows/meson-doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

echo "==== Installing libxml2 and libxslt using pacman ===="
pacman -S libxml2 libxslt

echo "==== Installing docbook-xml and docbook-xsl using pacman ===="
pacman -S docbook-xml docbook-xsl

export PATH=/C/hostedtoolcache/windows/Python/3.12.3/x64:/C/hostedtoolcache/windows/Python/3.12.3/x64/Scripts:$PATH

mkdir /D/a/postgresql-packaging-foundation/postgresql-packaging-foundation/postgresql-17beta3/meson-build-doc

meson setup /D/a/postgresql-packaging-foundation/postgresql-packaging-foundation/postgresql-17beta3 /D/a/postgresql-packaging-foundation/postgresql-packaging-foundation/postgresql-17beta3/meson-build-doc --prefix=/D/a/postgresql-packaging-foundation/postgresql-packaging-foundation/postgresql-17beta3/meson-build/meson-install

cd /D/a/postgresql-packaging-foundation/postgresql-packaging-foundation/postgresql-17beta3/meson-build-doc
ninja docs
mv /D/a/postgresql-packaging-foundation/postgresql-packaging-foundation/postgresql-17beta3/meson-build-doc/doc /D/a/postgresql-packaging-foundation/postgresql-packaging-foundation/postgresql-17beta3/meson-install/
ls -l /D/a/postgresql-packaging-foundation/postgresql-packaging-foundation/postgresql-17beta3/meson-install/doc/src/sgml/html/a*.html
15 changes: 8 additions & 7 deletions server/scripts/windows/meson.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ CALL "C:\\Program Files\\Microsoft Visual Studio\\2022\Enterprise\VC\Auxiliary\B

ECHO Creating build and install dirs...

mkdir D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta2\meson-build
mkdir D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta2\meson-install
mkdir D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta3\meson-build
mkdir D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta3\meson-install

SET BASE_PATH=D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation

SET PATH=%BASE_PATH%\pkg-config-lite-0.28-1\bin;C:\Strawberry\perl\bin;%BASE_PATH%\openssl\bin;%BASE_PATH%\zlib\bin;%BASE_PATH%\libxml2\bin;%BASE_PATH%\zstd\bin;%BASE_PATH%\1z4\bin;%BASE_PATH%\libxslt\bin;%BASE_PATH%\icu\bin;%PATH%
SET
PATH=C:\hostedtoolcache\windows\Python\3.12.3\x64;C:\hostedtoolcache\windows\Python\3.12.3\x64\Scripts;%BASE_PATH%\pkg-config-lite-0.28-1\bin;%BASE_PATH%\strawberry-perl-5.38.2.2-64bit-portable\perl\bin;%BASE_PATH%\openssl\bin;%BASE_PATH%\zlib\bin;%BASE_PATH%\libxml2\bin;%BASE_PATH%\zstd\bin;%BASE_PATH%\1z4\bin;%BASE_PATH%\libxslt\bin;%BASE_PATH%\icu\bin;%PATH%

SET PKG_CONFIG_PATH=%BASE_PATH%\zlib\lib\pkgconfig;%BASE_PATH%\libxml2\lib\pkgconfig;%BASE_PATH%\zstd\lib\pkgconfig;%BASE_PATH%\lz4\lib\pkgconfig;%BASE_PATH%\libxslt\lib\pkgconfig;%BASE_PATH%\icu\lib\pkgconfig;C:\Users\runneradmin\AppData\Local\Apps\Tcl86\lib\pkgconfig;%BASE_PATH%\uuid\lib\pkgconfig
SET PKG_CONFIG_PATH=%BASE_PATH%\zlib\lib\pkgconfig;%BASE_PATH%\libxml2\lib\pkgconfig;%BASE_PATH%\zstd\lib\pkgconfig;%BASE_PATH%\lz4\lib\pkgconfig;%BASE_PATH%\libxslt\lib\pkgconfig;%BASE_PATH%\icu\lib64\pkgconfig;C:\Users\runneradmin\AppData\Local\Apps\Tcl86\lib\pkgconfig;%BASE_PATH%\uuid\lib\pkgconfig

meson setup D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta2 D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta2\meson-build --prefix=D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta2\meson-install -Dnls=enabled -Duuid=ossp -Dplperl=enabled -Dssl=openssl -Dextra_include_dirs=D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\gettext\include,D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\openssl\include -Dextra_lib_dirs=D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\gettext\lib,D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\openssl\lib
meson setup D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta3 D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta3\meson-build --prefix=D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta3\meson-install -Dnls=enabled -Duuid=ossp -Dplperl=enabled -Dssl=openssl -Dextra_include_dirs=D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\gettext\include,D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\openssl\include -Dextra_lib_dirs=D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\gettext\lib,D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\openssl\lib

cd D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta2\meson-build
cd D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta3\meson-build
ECHO meson build dir content
dir
ninja --verbose

ninja install
dir D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta2\meson-install
dir D:\a\postgresql-packaging-foundation\postgresql-packaging-foundation\postgresql-17beta3\meson-install

0 comments on commit b9eb892

Please sign in to comment.