From 099ed29d0675a2d50e39e3d97a4a61ac11a5dbde Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Mon, 31 Jul 2023 15:16:19 +0200 Subject: [PATCH] ci: Add MAGE build for windows. --- .gitlab-ci.yml | 31 +++++++++++++++++++++++++++++-- packages/windows.bat | 10 ++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 183337a4..87578db8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: # BUILD # ######### -build-mage: +build-mage-linux: stage: build tags: - linux @@ -29,6 +29,31 @@ build-mage: - mage/src/build/mage_extraire - mage/src/build/mailleurPF +build-mage-windows: + stage: build + tags: + - wine + rules: + - if: $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG + variables: + GIT_SUBMODULE_STRATEGY: recursive + GIT_SUBMODULE_DEPTH: 1 + script: + - cd mage/src/ + - sed s/add_compile_definitions(win)/add_compile_definitions(windows)/ CMakeLists.txt > __tmp__ + - echo set(CMAKE_Fortran_COMPILER "C:/Program\ Files/gcc/bin/gfortran.exe") > CMakeLists.txt + - echo set(CMAKE_MAKE_PROGRAM "C:/Program Files\ \(x86\)/GnuWin32/bin/make.exe") >> CMakeLists.txt + - type __tmp__ >> CMakeLists.txt + - mkdir build + - cd build + - cmake -G "MinGW Makefiles" .. + - make + artifacts: + paths: + - mage/src/build/mage.exe + - mage/src/build/mage_extraire.exe + - mage/src/build/mailleurPF.exe + build: stage: build tags: @@ -74,7 +99,7 @@ linux-package: artifacts: true - job: build artifacts: true - - job: build-mage + - job: build-mage-linux artifacts: true rules: - if: $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG @@ -95,6 +120,8 @@ windows-package: artifacts: true - job: build artifacts: true + - job: build-mage-windows + artifacts: true rules: - if: $CI_COMMIT_BRANCH == 'master' || $CI_COMMIT_TAG artifacts: diff --git a/packages/windows.bat b/packages/windows.bat index 84d55613..453b0d03 100644 --- a/packages/windows.bat +++ b/packages/windows.bat @@ -11,12 +11,22 @@ rem Copy data mkdir dist\pamhyr\View\ui\ressources mkdir dist\pamhyr\View\ui\Widgets +rem UI copy /y ..\src\View\ui\ressources\ dist\pamhyr\View\ui\ressources copy /y ..\src\View\ui\Widgets\*.ui dist\pamhyr\View\ui\Widgets copy /y ..\src\View\ui\*.ui dist\pamhyr\View\ui\ + +rem Lang copy /y ..\src\lang\*.qm dist\pamhyr\lang\ + +rem Information copy /y ..\VERSION dist\pamhyr\ copy /y ..\AUTHORS dist\pamhyr\ +rem MAGE +copy /y ..\mage\src\build\mage.exe dist\pamhyr\ +copy /y ..\mage\src\build\mage_extraire.exe dist\pamhyr\ +copy /y ..\mage\src\build\mailleurPF.exe dist\pamhyr\ + rem Make installer "C:\Program Files (x86)\NSIS\makensis.exe" pamhyr.nsi