Unfortunately, I did not need to install everything from scratch for this as I had all prerequisites installed already. Here is my guess:
- Install
rustup
and run the script. This takes some time but is fairly easy. - Make sure you have gdal library installed on your machine, it should be available in your package manager.
- Run
cargo build
from this directory.
Getting this compiling on Windows was more difficult, There are more steps and several very large extras that have to be downloaded. The gdal install was discovered through piecing information together from various sources and trial and error, I suspect because most people who develop this already have most of this installed. There may be easier ways to do this, if so, please let me know. This is my first attempt at Windows development in at least ten years, and going through this sort of process is one of the reasons.
- You will need to install gdal on your system, as described under the installation section of Readme.md.
- Install
rustup
and run the script. It may ask you to download and install an enormous (about 1.5 GB) Visual Studio package from Microsoft to complete this task. - The above does not install the
gdal_i.lib
file needed by the rust library. So it's necessary to install the gdal SDK: a) Downloadgdal
SDK from GISInternals Development Kits. I chose the latest one forMSVC 2022
andx64
:release-1930-x64-dev
. The number after release will depend on which one you download, as well. b) unzip that into awindows
folder under this project so that it's contents are incosmopoeia\windows\release-1930-x64-dev
, wherecosmopoeia
is the root of this project. - The build routine needs to find the actual library installed by gdal using a tool called
pkg-config
. a) downloadpkg-config
. b) unzip that into thewindows
folder as well, so that it's contents are incosmopoeia\windows\pkg-config-lite-0.28-1_bin-win32
. There will be a single folder inside that calledpkg-config-lite-0.28-1
- Set some environment variables: NOTE: The deploy_windows.ers script sets them in this manner
a) So pkg-config can be found:
set PATH=%CD%\windows\pkg-config-lite-0.28-1_bin-win32\pkg-config-lite-0.28-1\bin;%PATH%
b) Sogdal_i.lib
can be found:set GDAL_HOME=%CD%\windows\release-1930-x64-dev\release-1930-x64
c) Sogdal.dll
can be found:set PKG_CONFIG_PATH=%homedrive%%homepath%\miniconda3\Library\lib\pkgconfig
cargo build
should now run successfully in the same session where the environment variables were set.
I don't have access to Mac machines for development. So, if anyone wants to support compiling and running this product on Macintosh products, please let me know.