From 14160e7e9cee49c537e2426f38fd19f0b741759e Mon Sep 17 00:00:00 2001 From: "J. Fronny" <6260391-JFronny@users.noreply.gitlab.com> Date: Sat, 5 Sep 2020 11:16:14 +0000 Subject: [PATCH] Attempt at automatic dll building --- .gitlab-ci.yml | 5 ++++- src/main/c/build.bat | 12 +++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cf5d82c..9018747 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,8 +7,11 @@ before_script: - export GRADLE_USER_HOME=`pwd`/.gradle deploy: + tags: + - windows stage: deploy - script: gradle --build-cache assemble + script: | + gradle --build-cache assemble artifacts: paths: - build/libs diff --git a/src/main/c/build.bat b/src/main/c/build.bat index 86e2cb4..c0c3317 100644 --- a/src/main/c/build.bat +++ b/src/main/c/build.bat @@ -1,10 +1,12 @@ @echo off -echo -------------------------------------------------------- -echo THIS SHOULD MOST LIKELY BE MODIFIED FOR YOUR ENVIRONMENT -echo -------------------------------------------------------- -cl .\io_gitlab_jfronny_breakme_breakme_NativeCrash.cpp /I"C:\Program Files\Java\jdk-14.0.1\include" /I"C:\Program Files\Java\jdk-14.0.1\include\win32" -Fenatives.dll -MD -LD +echo Setting up native env +cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build" +vcvarsall x86_x64 +cd %~dp0 +echo Building natives +cl .\io_gitlab_jfronny_breakme_breakme_NativeCrash.cpp /I"C:\Program Files\Java\jdk-12.0.2\include" /I"C:\Program Files\Java\jdk-12.0.2\include\win32" -Fenatives.dll -MD -LD del .\natives.exp del .\natives.lib del .\io_gitlab_jfronny_breakme_breakme_NativeCrash.obj del ..\resources\native\natives.dll -copy /y natives.dll ..\resources\native\natives.dll \ No newline at end of file +copy /y natives.dll ..\resources\native\natives.dll