1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-05-18 15:17:46 +00:00

Download libunshield on Windows

This commit is contained in:
Joshua Goins 2024-04-25 20:41:04 -04:00
parent 3ed199d388
commit 064ca5b722
3 changed files with 21 additions and 3 deletions

View file

@ -176,6 +176,13 @@ jobs:
cmake -B ${{ steps.strings.outputs.build-output-dir }}-qtkeychain -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S qtkeychain -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF -DBUILD_WITH_QT6=ON cmake -B ${{ steps.strings.outputs.build-output-dir }}-qtkeychain -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S qtkeychain -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF -DBUILD_WITH_QT6=ON
cmake --build ${{ steps.strings.outputs.build-output-dir }}-qtkeychain --config ${{ matrix.build_type }} --target install cmake --build ${{ steps.strings.outputs.build-output-dir }}-qtkeychain --config ${{ matrix.build_type }} --target install
- name: Build unshield
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
run: |
git clone https://github.com/twogood/unshield.git
cmake -B ${{ steps.strings.outputs.build-output-dir }}-unshield -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S unshield -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
cmake --build ${{ steps.strings.outputs.build-output-dir }}-unshield --config ${{ matrix.build_type }} --target install
- name: Save Prefix - name: Save Prefix
id: cache-prefix-save id: cache-prefix-save
uses: actions/cache/save@v4 uses: actions/cache/save@v4

View file

@ -18,8 +18,13 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libphysis/logger EXCLUDE_FROM_ALL)
target_include_directories(physis INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/target/public) target_include_directories(physis INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/target/public)
# TODO: enable unshield on Windows # We should use the CMake module everywhere once distros update their packages
if (NOT WIN32) if (WIN32)
# FIXME: unshield should include zlib in their upstream cmake
find_package(ZLIB REQUIRED)
find_package(unshield REQUIRED)
target_link_libraries(physis INTERFACE unshield::libunshield)
else()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(UNSHIELD REQUIRED IMPORTED_TARGET libunshield) pkg_check_modules(UNSHIELD REQUIRED IMPORTED_TARGET libunshield)
target_link_directories(physis INTERFACE ${UNSHIELD_LIBRARY_DIRS}) target_link_directories(physis INTERFACE ${UNSHIELD_LIBRARY_DIRS})

View file

@ -126,3 +126,9 @@ Clone "qtkeychain" "https://github.com/frankosterfeld/qtkeychain.git"
Configure "qtkeychain" "-DBUILD_TESTING=OFF -DBUILD_WITH_QT6=ON" Configure "qtkeychain" "-DBUILD_TESTING=OFF -DBUILD_WITH_QT6=ON"
cmake --build "$BuildDir-qtkeychain" --config Debug --target install --parallel $NumCores cmake --build "$BuildDir-qtkeychain" --config Debug --target install --parallel $NumCores
CheckCompileResult "qtkeychain" CheckCompileResult "qtkeychain"
# Build unshield
Clone "unshield" "https://github.com/twogood/unshield.git"
Configure "unshield" "-DBUILD_TESTING=OFF"
cmake --build "$BuildDir-unshield" --config Debug --target install --parallel $NumCores
CheckCompileResult "unshield"