-
- Notifications
You must be signed in to change notification settings - Fork 377
Building on windows with msys2 and mingw64 (WIP)
Regina Obe edited this page Apr 6, 2023 · 5 revisions
- Download msys2 from https://www.msys2.org/ and run the exe installer
- After installing, launch the mingw64.exe
- Run the following commands
pacman -Syu pacman -S --needed base-devel mingw-w64-x86_64-toolchain pacman --needed -S git mingw-w64-x86_64-cmake mingw-w64-x86_64-postgresql mingw-w64-x86_64-postgis - Launch PostgreSQL
#now initialize postgresql cluster initdb -D C:/temp/pgsql # start the cluster pg_ctl -D C:/temp/pgsql -l logfile start - Connect to PostgreSQL and create test db
psql -d postgres #connect to postgres database # in psql shell SELECT version(); -- outputs the version CREATE DATABASE gisdb; \c gisdb CREATE EXTENSION postgis; SELECT postgis_full_version(); exit - Build pgtap - this is needed for testing
#back in shell mkdir C:/projects cd C:/projects git clone https://github.com/theory/pgtap.git cd pgtap cpan CPAN::DistnameInfo cpan TAP::Parser::SourceHandler::pgTAP make make installcheck - Download and try to build pgrouting
# back in shell mkdir C:/projects cd C:/projects git clone https://github.com/pgRouting/pgRouting.git cd pgRouting cmake --version #returns cmake version 3.25.2 rm -rf build mkdir build cd build cmake -G"Unix Makefiles" .. cmake --build . make install psql -c "CREATE DATABASE ___pgr___test___;" -d postgres cd /c/projects/pgrouting bash ./tools/testers/pg_prove_tests.sh