-
-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win: patch from OSGeo4W applied #4121
base: main
Are you sure you want to change the base?
Changes from all commits
cc4e522
d904476
42ef646
3b2313f
fd270e0
907a884
daba1e6
feb3a5c
56dc8ef
b435503
a78f378
3d1af45
5c4bd6a
cb11b60
f9f9d52
ba31883
6e7532a
b4a86c4
fb0244e
2f9c87a
b6bd490
7ffcbad
43bfc39
2031013
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -8,6 +8,8 @@ REM Uncomment if you want to use Bash instead of Cmd | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
REM Note that msys package must be also installed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
REM set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
set PYTHONPATH=%OSGEO4W_ROOT%\apps\grass\grass@POSTFIX@\etc\python;%PYTHONPATH% | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
set GRASS_COMPATIBILITY_TEST=0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does this mean? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The first one, PYTHONPATH, is needed, I often had to add it to make windows tests work in CI (like when working hard to get pytest running), but the second one I don't know There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the fatal version check in gisinit.c that used to be patched out in osgeo4w now just causes a warning if GRASS_COMPATIBILITY_TEST is 0. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, so you're talking about this part: Lines 43 to 73 in 3e22b87
Shouldn't it be |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python3.exe | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we document somewhere why and which DLL is needed to include in the winGRASS package? IIRC I was involved in a trial/error-way to check which of the DLLs we added finally back then. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could add a separate issue for this, as we're mostly only applying the patches that have been used upstream. Something quite simple that we've spent 4 months on, so I would hope to not stretch it further if no easy consensus comes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a libpng update in osgeo4w broke "our" version of |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,8 +1,9 @@ | ||||
#!/usr/bin/bash | ||||
#!/bin/bash | ||||
|
||||
set -e | ||||
|
||||
PWD="$(pwd)" | ||||
export ARCH=x86_64-w64-mingw32 | ||||
export SRC=$PWD | ||||
|
||||
if ! [ -d mswindows ]; then | ||||
echo Start from GRASS toplevel dir | ||||
|
@@ -107,31 +108,24 @@ fi | |||
exec 3>&1 > >(tee mswindows/osgeo4w/package.log) 2>&1 | ||||
|
||||
DLLS=" | ||||
/mingw64/bin/libbrotlicommon.dll | ||||
/mingw64/bin/libbrotlidec.dll | ||||
/mingw64/bin/libbz2-1.dll | ||||
/mingw64/bin/libcairo-2.dll | ||||
/mingw64/bin/libfftw3-3.dll | ||||
/mingw64/bin/libfontconfig-1.dll | ||||
/mingw64/bin/libfreetype-6.dll | ||||
/mingw64/bin/libgcc_s_seh-1.dll | ||||
/mingw64/bin/libgfortran-5.dll | ||||
/mingw64/bin/libglib-2.0-0.dll | ||||
/mingw64/bin/libgomp-1.dll | ||||
/mingw64/bin/libgraphite2.dll | ||||
/mingw64/bin/libharfbuzz-0.dll | ||||
/mingw64/bin/libiconv-2.dll | ||||
/mingw64/bin/libintl-8.dll | ||||
/mingw64/bin/libopenblas.dll | ||||
/mingw64/bin/libpcre-1.dll | ||||
/mingw64/bin/libpixman-1-0.dll | ||||
/mingw64/bin/libpng16-16.dll | ||||
/mingw64/bin/libquadmath-0.dll | ||||
/mingw64/bin/libreadline8.dll | ||||
/mingw64/bin/libstdc++-6.dll | ||||
/mingw64/bin/libsystre-0.dll | ||||
/mingw64/bin/libtre-5.dll | ||||
/mingw64/bin/libwinpthread-1.dll | ||||
/mingw64/bin/zlib1.dll | ||||
/mingw64/bin/libopenblas.dll | ||||
" | ||||
|
||||
if ! [ -f mswindows/osgeo4w/configure-stamp ]; then | ||||
|
@@ -143,52 +137,54 @@ if ! [ -f mswindows/osgeo4w/configure-stamp ]; then | |||
log remove old logs | ||||
rm -f mswindows/osgeo4w/package.log.* | ||||
|
||||
mkdir -p dist.x86_64-w64-mingw32/bin | ||||
cp -uv $DLLS dist.x86_64-w64-mingw32/bin | ||||
|
||||
mkdir -p mswindows/osgeo4w/lib | ||||
cp -uv $OSGEO4W_ROOT_MSYS/lib/libpq.lib mswindows/osgeo4w/lib/pq.lib | ||||
cp -uv $OSGEO4W_ROOT_MSYS/lib/sqlite3_i.lib mswindows/osgeo4w/lib/sqlite3.lib | ||||
|
||||
|
||||
log configure | ||||
CFLAGS="$CFLAGS -pipe" \ | ||||
CXXFLAGS="$CXXFLAGS -pipe" \ | ||||
./configure \ | ||||
--bindir=$OSGEO4W_ROOT_MSYS/bin \ | ||||
--bindir=${OSGEO4W_ROOT_MSYS}/bin \ | ||||
--enable-largefile \ | ||||
--enable-shared \ | ||||
--host=x86_64-w64-mingw32 \ | ||||
--includedir=$OSGEO4W_ROOT_MSYS/include \ | ||||
--libexecdir=$OSGEO4W_ROOT_MSYS/bin \ | ||||
--prefix=$OSGEO4W_ROOT_MSYS/apps/grass \ | ||||
--host=${ARCH} \ | ||||
--includedir=${OSGEO4W_ROOT_MSYS}/include \ | ||||
--libexecdir=${OSGEO4W_ROOT_MSYS}/bin \ | ||||
--prefix=${OSGEO4W_ROOT_MSYS}/apps/grass \ | ||||
--with-blas \ | ||||
--with-bzlib \ | ||||
--with-cairo \ | ||||
--with-cairo-includes=$OSGEO4W_ROOT_MSYS/include \ | ||||
--with-cairo-ldflags="-L$PWD/mswindows/osgeo4w/lib -lcairo -lfontconfig" \ | ||||
--with-cairo-includes=${OSGEO4W_ROOT_MSYS}/include \ | ||||
--with-cairo-ldflags="-L${SRC}/mswindows/osgeo4w/lib -lcairo" \ | ||||
--with-cairo-libs=${OSGEO4W_ROOT_MSYS}/lib \ | ||||
--with-cxx \ | ||||
--with-fftw \ | ||||
--with-freetype \ | ||||
--with-freetype-includes=/mingw64/include/freetype2 \ | ||||
--with-gdal=$PWD/mswindows/osgeo4w/gdal-config \ | ||||
--with-geos=$PWD/mswindows/osgeo4w/geos-config \ | ||||
--with-includes=$OSGEO4W_ROOT_MSYS/include \ | ||||
--with-freetype-includes=${OSGEO4W_ROOT_MSYS}/include/freetype2 \ | ||||
--with-gdal=${SRC}/mswindows/osgeo4w/gdal-config \ | ||||
--with-geos=${SRC}/mswindows/osgeo4w/geos-config \ | ||||
--with-includes=${OSGEO4W_ROOT_MSYS}/include \ | ||||
--with-lapack \ | ||||
--with-liblas=$PWD/mswindows/osgeo4w/liblas-config \ | ||||
--with-libs="$OSGEO4W_ROOT_MSYS/lib" \ | ||||
--with-liblas=${SRC}/mswindows/osgeo4w/liblas-config \ | ||||
--with-libpng=${SRC}/mswindows/osgeo4w/libpng-config \ | ||||
--with-libs="${OSGEO4W_ROOT_MSYS}/lib ${OSGEO4W_ROOT_MSYS}/bin" \ | ||||
--with-netcdf=${OSGEO4W_ROOT_MSYS}/bin/nc-config \ | ||||
--with-nls \ | ||||
--with-odbc \ | ||||
--with-opengl=windows \ | ||||
--with-openmp \ | ||||
--with-postgres \ | ||||
--with-postgres-includes=$OSGEO4W_ROOT_MSYS/include \ | ||||
--with-postgres-libs=$PWD/mswindows/osgeo4w/lib \ | ||||
--with-proj-includes=$OSGEO4W_ROOT_MSYS/include \ | ||||
--with-proj-libs=$OSGEO4W_ROOT_MSYS/lib \ | ||||
--with-proj-share=$OSGEO4W_ROOT_MSYS/share/proj \ | ||||
--with-postgres-includes=${OSGEO4W_ROOT_MSYS}/include \ | ||||
--with-postgres-libs=${OSGEO4W_ROOT_MSYS}/lib \ | ||||
--with-proj-includes=${OSGEO4W_ROOT_MSYS}/include \ | ||||
--with-proj-libs=${OSGEO4W_ROOT_MSYS}/lib \ | ||||
--with-proj-share=${OSGEO4W_ROOT_MSYS}/share/proj \ | ||||
--with-readline \ | ||||
--with-regex \ | ||||
--with-sqlite \ | ||||
--with-sqlite-includes=$OSGEO4W_ROOT_MSYS/include \ | ||||
--with-sqlite-libs=$PWD/mswindows/osgeo4w/lib \ | ||||
--with-sqlite-includes=${OSGEO4W_ROOT_MSYS}/include \ | ||||
--with-sqlite-libs=${OSGEO4W_ROOT_MSYS}/lib \ | ||||
--with-zstd \ | ||||
--without-pdal \ | ||||
--without-x | ||||
|
@@ -244,9 +240,11 @@ if [ -n "$PACKAGE_PATCH" ]; then | |||
unix2dos etc/postinstall/grass${PACKAGE_POSTFIX}.bat | ||||
unix2dos etc/preremove/grass${PACKAGE_POSTFIX}.bat | ||||
|
||||
# copy dependencies (TODO: to be reduced) | ||||
cp -uv $DLLS apps/grass/grass$POSTFIX/bin | ||||
cp -uv /mingw64/etc/fonts/fonts.conf apps/grass/grass$POSTFIX/etc | ||||
# copy dependencies | ||||
cp -uv $(/usr/bin/find apps/grass/grass$POSTFIX -iname "*.dll" -o -iname "*.exe" | PATH=$PWD/apps/grass/grass$POSTFIX/lib:$PWD/bin:/mingw64/bin:/usr/bin /usr/bin/xargs /usr/bin/ldd | /usr/bin/sed -ne 's#^.* => \(/mingw64/bin/.*\) (.*)$#\1#p' | /usr/bin/sort -u) apps/grass/grass$POSTFIX/bin | ||||
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if this is merged, DLLS (line 109/10) can be removed |
||||
# copy R batch files | ||||
cp -uv $SRC/mswindows/external/rbatch/* apps/grass/grass$POSTFIX/bin | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be checked whether we include these files already in another way, e.g. in the NSIS installer- There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this exact script really used for the NSIS installer? This script is used only by OSGeo4W (yet) from the best of my knowledge. I have some work prepared even before this PR was filed to use this script for our CI, to be really closer to what OSGeo4W packages, and could upload the artifacts that could be tested locally, and use ccache (that is already scripted here, we only have to download and upload the cache in CI). To not duplicate work, I was patiently waiting for this PR to be merged before continuing, but I would really want to continue to allow shaving some time off of the longest CI job that we have. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, NSIS does that here: grass/mswindows/GRASS-Packager.bat.tmpl Line 65 in 3e22b87
|
||||
|
||||
# creating grass package | ||||
/bin/tar -cjf $PDIR/grass$PACKAGE_POSTFIX-$VERSION-$PACKAGE_PATCH.tar.bz2 \ | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #4121 (comment):