Open kb173 opened 3 years ago
The MacOS homebrew brew install gdal
has lots of dependencies installed too. See brew info gdal
and https://github.com/boku-ilen/geodot-plugin/pull/33#issuecomment-768264392
Not sure what my last comment tried to tell : I guess same goes for linux ... can we deploy to a clean machine by just using libgdal.*
I can test for Mac when that works through PR #33
Regarding this and https://github.com/boku-ilen/geodot-plugin/pull/33#issuecomment-769651814: On Windows, there's a specific order in which libraries are searched for - maybe something similar exists on Mac, and the one in /usr/local/Cellar/gdal/3.2.1
has a higher priority than the one you created locally? Or maybe it is because the ones in usr/local/Cellar/gdal/3.2.1
are what it's compiled against (due to that being the osgeo_path
). So I guess that'd mean we have to copy the files first, and then compile against those.
We got a working and packaged Windows build, generated on Linux (relevant for #41) :partying_face:
I will push everything (in the form of GitHub Actions and README docs) soon, but here's the general approach for future reference: Building is done on a Docker container running Fedora. That container first installs mingw64 and its GDAL build. The result of the build is copied out of the container, along with all previously installed mingw DLLs (as those are GDAL and its dependencies).
Windows packaging is done and #60 also publishes the packaged artifact! Same for Linux. Only Mac OS left to do.
I found dylibbundler which seems like it does what we need on Mac. I integrated it into our build action and successfully created a Mac build: https://github.com/boku-ilen/geodot-plugin/actions/runs/3943687695
Would be great if anyone could test!
btw: I also tried creating a build for the new ARM Macs, but that's currently held back by the lack of a GitHub Action runner with that chip.
On Linux, we just copied over the
libgdal.so
intodemo/addons/geodot/x11/
(as described in the README). On Windows, we can probably do something similar, but we need to figure out which DLLs are needed. Also we should document any other dependencies.Same for OSX - as described by @clemens-tolboom, we might be able to use a copy of
/usr/local/Cellar/gdal/3.2.1/lib/libgdal.dylib
.Required for #36.