Skip to content

Instantly share code, notes, and snippets.

@gijzelaerr
Created June 16, 2020 08:56
Show Gist options
  • Save gijzelaerr/8c523407e17fac23c04e1503ed99c328 to your computer and use it in GitHub Desktop.
Save gijzelaerr/8c523407e17fac23c04e1503ed99c328 to your computer and use it in GitHub Desktop.

Windows

Run as Administrator:

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco feature enable -n allowGlobalConfirmation
choco install ActivePerl ant ruby python3 git winflexbison
cinst VisualStudio2017community --package-parameters "--add Microsoft.VisualStudio.Workload.NativeDesktop --add microsoft.visualstudio.component.vc.cmake.project --add microsoft.visualstudio.component.vc.ATLMFC"
refreshenv

Then run as normal user:

git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat -disableMetrics
#vcpkg integrate install
# needed for 64 bits (with the available python being 64 bit this is needed)
set VCPKG_DEFAULT_TRIPLET=x64-windows
vcpkg install libiconv openssl bzip2 geos libxml2 pcre pcre2 zlib getopt

To compile MonetDB:

"c:\program files (x86)\microsoft visual studio\2017\community\common7\tools\vsdevcmd.bat"
"c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
cd ..
mkdir build
cd build
cmake -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=\users\monetdb\install -A x64 ../MonetDB-11.34.0-Source -DTESTING=OFF
cmake -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=\users\monetdb\install -A x64 ../home/niels/data/monetdb-embedded -DODBC=OFF
cmake --build . --target ALL_BUILD
cmake --build . --target INSTALL
set PATH=\Users\monetdb\install\bin;\Users\monetdb\install\lib;\Users\monetdb\install\lib\monetdb5;\Users\monetdb\vcpkg\installed\x64-windows\bin;\Users\monetdb\vcpkg\installed\x64-windows\debug\bin;%PATH%
cmake --build . --target RUN_TESTS
cmake --build . --target mtest
# windows2k19-worker-0 (vcpkg installed as Administrator with integrate install)
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=C:/Users/Administrator/vcpkg/scripts/buildsystems/vcpkg.cmake"
@gijzelaerr
Copy link
Author

to compile monetdbe-python:

python setup.py build_ext --include-dirs=C:\Users\gijs\Code\monetdb-installed\include --library-dirs=C:\Users\gijs\Code\monetdb-installed\bin

and then

python setup.py bdist_wheel

you need to have wheel installed (pip install wheel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment