From 9a0530a7085a14ea1ebc28b1bd2d691cae6a5cec Mon Sep 17 00:00:00 2001 From: Anthony Rabine Date: Fri, 11 Aug 2023 14:04:44 +0200 Subject: [PATCH] (WIP) Action for windows build --- .github/workflows/build_windows.yml | 35 +++++++++++++++++++++++++++++ story-editor/CMakeLists.txt | 7 ++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build_windows.yml diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 0000000..7a214fd --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -0,0 +1,35 @@ +name: continous_build + +on: + push: + branches: [ master ] +env: + QT_VERSION: 5.15.2 + +jobs: + build_win: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: install_deps + run : | + choco install wget -y + choco install nsis -y + choco install ninja -y + choco install cmake -y + pip install aqtinstall + - name: install_qt + run : | + python3 -m aqt install-qt -m qtmultimedia -O ${{ github.workspace }}/Qt/ windows desktop ${{ env.QT_VERSION }} win64_msvc2019_64 + echo "${{ github.workspace }}/Qt/${{ env.QT_VERSION }}/msvc2019_64/bin/" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: build + working-directory: ./story-editor + run : | + mkdir build && cd build + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{ github.workspace }}\Qt\6.5.1\msvc2019_64 -DQT_DIR=${{ github.workspace }}\Qt\6.5.1\msvc2019_64\lib\cmake\Qt6 -G Ninja .. + ninja + ls diff --git a/story-editor/CMakeLists.txt b/story-editor/CMakeLists.txt index c5b305c..d9a6a53 100644 --- a/story-editor/CMakeLists.txt +++ b/story-editor/CMakeLists.txt @@ -172,11 +172,14 @@ target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::OpenGL Qt${QT_VERSION_MAJOR}::Multimedia QHexView - dl ) +if (UNIX) + target_link_libraries(${PROJECT_NAME} PUBLIC dl) +endif (UNIX) + set_target_properties(${PROJECT_NAME} PROPERTIES - MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com + MACOSX_BUNDLE_GUI_IDENTIFIER storyeditor.d8s.eu MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE TRUE