mirror of
https://github.com/ErnyTech-Archive/JTDLib
synced 2024-11-11 13:59:22 +01:00
30 lines
754 B
Bash
30 lines
754 B
Bash
#!/bin/bash
|
|
|
|
# Vcpkg
|
|
git clone https://github.com/Microsoft/vcpkg.git
|
|
cd vcpkg
|
|
powershell.exe -NoProfile -ExecutionPolicy Bypass "& {& '%~dp0scripts\bootstrap.ps1' %*}"
|
|
powershell.exe .\vcpkg integrate install
|
|
powershell.exe .\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
|