1
0
mirror of https://github.com/ErnyTech-Archive/JTDLib synced 2024-11-11 22:09:22 +01:00
JTDLib/travis/win.sh

30 lines
689 B
Bash
Raw Normal View History

2018-11-29 17:58:52 +01:00
#!/bin/bash
# Vcpkg
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
powershell .\bootstrap-vcpkg.bat
powershell .\vcpkg integrate install
powershell .\vcpkg install zlib:x64-windows-static openssl:x64-windows-static
cd $TRAVIS_BUILD_DIR
# Build deps
choco install gperf
choco install jdk8 -params 'installdir=c:\\java8'
# Dirs
cd src/main/jni
mkdir build
mkdir $TRAVIS_BUILD_DIR/out
cd build
# Setup env
export JAVA_HOME="c:\\java8"
# Build
cmake -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=. -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR\vcpkg\scripts\buildsystems\vcpkg.cmake ..
cmake --build . --target install
# Copy artifacts
cp bin/libtdjni.dll $TRAVIS_BUILD_DIR/out