mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-25 05:17:44 +00:00
Add GitHub actions
It now builds Novus (and it's dependencies) for Windows and Linux. Artifacts and macOS support will come later.
This commit is contained in:
parent
503cbbc5cb
commit
1e898130b9
10 changed files with 313 additions and 35 deletions
280
.github/workflows/cmake-multi-platform.yml
vendored
Normal file
280
.github/workflows/cmake-multi-platform.yml
vendored
Normal file
|
@ -0,0 +1,280 @@
|
|||
name: Main
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest]
|
||||
build_type: [Release]
|
||||
c_compiler: [gcc, cl]
|
||||
include:
|
||||
- os: windows-latest
|
||||
c_compiler: cl
|
||||
cpp_compiler: cl
|
||||
- os: ubuntu-latest
|
||||
c_compiler: gcc
|
||||
cpp_compiler: g++
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
c_compiler: gcc
|
||||
- os: ubuntu-latest
|
||||
c_compiler: cl
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: "6.6.*"
|
||||
cache: true
|
||||
modules: 'qthttpserver qtwebsockets'
|
||||
|
||||
- name: Prepare Vulkan SDK
|
||||
uses: humbletim/setup-vulkan-sdk@v1.2.0
|
||||
with:
|
||||
vulkan-query-version: latest
|
||||
vulkan-components: Vulkan-Headers, Vulkan-Loader, SPIRV-Cross, SPIRV-Headers
|
||||
vulkan-use-cache: true
|
||||
|
||||
- name: Set reusable strings
|
||||
id: strings
|
||||
shell: bash
|
||||
run: |
|
||||
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
|
||||
echo "prefix-dir=${{ github.workspace }}/prefix" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Setup Linux dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install \
|
||||
gettext \
|
||||
gperf \
|
||||
libwayland-dev \
|
||||
|
||||
- name: Cache Prefix
|
||||
id: cache-prefix-restore
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ${{ steps.strings.outputs.prefix-dir }}
|
||||
key: ${{ runner.os }}-prefix
|
||||
|
||||
- name: Setup Windows dependencies
|
||||
if: (runner.os == 'Windows') && (steps.cache-prefix-restore.outputs.cache-hit != 'true')
|
||||
shell: powershell
|
||||
run: |
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
Invoke-WebRequest https://xiv.zone/distrib/dependencies/gettext.zip -OutFile libintl.zip
|
||||
unzip libintl.zip -d ${{ steps.strings.outputs.prefix-dir }}
|
||||
|
||||
Invoke-WebRequest https://cfhcable.dl.sourceforge.net/project/gnuwin32/gperf/3.0.1/gperf-3.0.1-bin.zip -OutFile gperf.zip
|
||||
unzip gperf.zip -d ${{ steps.strings.outputs.prefix-dir }}
|
||||
|
||||
- name: Build zlib
|
||||
if: (runner.os == 'Windows') && (steps.cache-prefix-restore.outputs.cache-hit != 'true')
|
||||
run: |
|
||||
git clone https://github.com/madler/zlib.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-zlib -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 zlib "H"-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-zlib --target install
|
||||
|
||||
- name: Build Extra CMake Modules
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/extra-cmake-modules.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-ECM -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 extra-cmake-modules -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-ECM --target install
|
||||
cmake --install ${{ steps.strings.outputs.build-output-dir }}-ECM
|
||||
|
||||
- name: Configure KI18n
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/ki18n.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-ki18n -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 ki18n -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
|
||||
- name: Windows KI18n workaround
|
||||
if: (runner.os == 'Windows') && (steps.cache-prefix-restore.outputs.cache-hit != 'true')
|
||||
run: |
|
||||
(Get-Content -ReadCount 0 ${{ steps.strings.outputs.build-output-dir }}-ki18n/cmake/build-pofiles.cmake) -replace 'FATAL_ERROR', 'WARNING' | Set-Content ${{ steps.strings.outputs.build-output-dir }}-ki18n/cmake/build-pofiles.cmake
|
||||
|
||||
- name: Build KI18n
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-ki18n --target install
|
||||
|
||||
- name: Build KCoreAddons
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kcoreaddons.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kca -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 kcoreaddons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kca --target install
|
||||
|
||||
- name: Build KConfig
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kconfig.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kconfig -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 kconfig -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kconfig --target install
|
||||
|
||||
- name: Build KArchive
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/karchive.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-karchive -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 karchive -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF -DWITH_BZIP2=OFF -DWITH_LIBLZMA=OFF -DWITH_LIBZSTD=OFF # TODO: enable bzip which we need later
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-karchive --target install
|
||||
|
||||
- name: Build KItemViews
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kitemviews.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kitemviews -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 kitemviews -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kitemviews --target install
|
||||
|
||||
- name: Build KCodecs
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kcodecs.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kcodecs -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 kcodecs -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kcodecs --target install
|
||||
|
||||
- name: Build Plasma Wayland Protocols
|
||||
if: (runner.os == 'Linux') && (steps.cache-prefix-restore.outputs.cache-hit != 'true')
|
||||
run: |
|
||||
git clone https://invent.kde.org/libraries/plasma-wayland-protocols.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-plasma-wayland-protocols -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 plasma-wayland-protocols -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-plasma-wayland-protocols --target install
|
||||
|
||||
- name: Build KGuiAddons
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kguiaddons.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kguiaddons -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 kguiaddons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kguiaddons --target install
|
||||
|
||||
- name: Build KWidgetsAddons
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kwidgetsaddons.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kwidgetsaddons -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 kwidgetsaddons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kwidgetsaddons --target install
|
||||
|
||||
- name: Configure KColorScheme
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kcolorscheme.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kcolorscheme -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 kcolorscheme -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
|
||||
- name: Windows KI18n workaround
|
||||
if: (runner.os == 'Windows') && (steps.cache-prefix-restore.outputs.cache-hit != 'true')
|
||||
run: |
|
||||
(Get-Content -ReadCount 0 ${{ steps.strings.outputs.prefix-dir }}/lib/cmake/KF6I18n/build-pofiles.cmake) -replace 'FATAL_ERROR', 'WARNING' | Set-Content ${{ steps.strings.outputs.prefix-dir }}/lib/cmake/KF6I18n/build-pofiles.cmake
|
||||
|
||||
- name: Build KColorScheme
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kcolorscheme --target install
|
||||
|
||||
- name: Build KConfigWidgets
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kconfigwidgets.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kconfigwidgets -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 kconfigwidgets -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kconfigwidgets --target install
|
||||
|
||||
- name: Build KIconThemes
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kiconthemes.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kiconthemes -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 kiconthemes -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kiconthemes --target install
|
||||
|
||||
- name: Build Sonnet
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/sonnet.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-sonnet -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 sonnet -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-sonnet --target install
|
||||
|
||||
- name: Build KCompletion
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kcompletion.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kcompletion -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 kcompletion -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kcompletion --target install
|
||||
|
||||
- name: Build KTextWidgets
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/ktextwidgets.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-ktextwidgets -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 ktextwidgets -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF -DWITH_TEXT_TO_SPEECH=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-ktextwidgets --target install
|
||||
|
||||
- name: Build KXmlGui
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://invent.kde.org/frameworks/kxmlgui.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kxmlgui -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 kxmlgui -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF -DFORCE_DISABLE_KGLOBALACCEL=ON
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kxmlgui --target install
|
||||
|
||||
- name: Build glm
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://github.com/g-truc/glm.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-glm -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 glm -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DGLM_BUILD_TESTS=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-glm --target install
|
||||
|
||||
- name: Build Corrosion
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://github.com/corrosion-rs/corrosion.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-corrosion -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 corrosion -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DCORROSION_BUILD_TESTS=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-corrosion --target install
|
||||
|
||||
- name: Build nlohmann
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://github.com/nlohmann/json.git
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}-nlohmann -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 json -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DJSON_BuildTests=OFF
|
||||
cmake --build ${{ steps.strings.outputs.build-output-dir }}-nlohmann --target install
|
||||
|
||||
- name: Build stb
|
||||
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://github.com/nothings/stb.git
|
||||
mv stb/* ${{ steps.strings.outputs.prefix-dir }}/include
|
||||
|
||||
- name: Save Prefix
|
||||
id: cache-prefix-save
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: ${{ steps.strings.outputs.prefix-dir }}
|
||||
key: ${{ steps.cache-prefix-restore.outputs.cache-primary-key }}
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
cmake -B ${{ steps.strings.outputs.build-output-dir }}
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
|
||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||
-DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }}
|
||||
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }}
|
||||
-S ${{ github.workspace }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ steps.strings.outputs.build-output-dir }}
|
||||
run: ctest --build-config ${{ matrix.build_type }}
|
|
@ -31,7 +31,7 @@ ecm_setup_version(${PROJECT_VERSION}
|
|||
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/novus-version.h
|
||||
)
|
||||
|
||||
find_package(Qt6 ${QT_MIN_VERSION} COMPONENTS Core Widgets Concurrent Core5Compat Sql HttpServer Network CONFIG REQUIRED)
|
||||
find_package(Qt6 ${QT_MIN_VERSION} COMPONENTS Core Widgets Concurrent Sql HttpServer Network CONFIG REQUIRED)
|
||||
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS CoreAddons Config XmlGui Archive I18n)
|
||||
find_package(Vulkan REQUIRED)
|
||||
find_package(glm REQUIRED)
|
||||
|
|
|
@ -9,8 +9,7 @@ target_sources(novus-argcracker
|
|||
target_link_libraries(novus-argcracker
|
||||
PRIVATE
|
||||
Physis::Physis
|
||||
Qt6::Core
|
||||
Qt6::Core5Compat)
|
||||
Qt6::Core)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
target_compile_definitions(novus-argcracker PUBLIC MACOS)
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
#include <QStringRef>
|
||||
|
||||
#include <physis.hpp>
|
||||
|
||||
|
@ -54,7 +53,7 @@ inline QString decryptGameArg(uint32_t tickCount, const QString &sqexString)
|
|||
|
||||
Blowfish *session = physis_blowfish_initialize(reinterpret_cast<uint8_t *>(buffer), 9);
|
||||
|
||||
QStringRef base64String(&sqexString, 12, sqexString.length() - 5 - 12);
|
||||
QStringView base64String = sqexString.mid(12, sqexString.length() - 5 - 12);
|
||||
QByteArray base64Decoded =
|
||||
QByteArray::fromBase64(base64String.toUtf8(), QByteArray::Base64Option::Base64UrlEncoding | QByteArray::Base64Option::OmitTrailingEquals);
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@ target_link_libraries(novus-common
|
|||
KF6::XmlGui
|
||||
KF6::I18n
|
||||
Qt6::Core
|
||||
Qt6::Widgets)
|
||||
Qt6::Widgets
|
||||
glm::glm)
|
||||
target_compile_definitions(novus-common PRIVATE TRANSLATION_DOMAIN="novus")
|
||||
|
||||
add_library(Novus::Common ALIAS novus-common)
|
||||
|
|
1
extern/CMakeLists.txt
vendored
1
extern/CMakeLists.txt
vendored
|
@ -10,7 +10,6 @@ corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/Cargo
|
|||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libphysis/logger)
|
||||
|
||||
target_include_directories(physis INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/target/public)
|
||||
target_link_libraries(physis INTERFACE unshield z)
|
||||
|
||||
add_library(Physis::Physis ALIAS physis)
|
||||
add_library(Physis::Logger ALIAS physis-logger)
|
||||
|
|
2
extern/dxbc
vendored
2
extern/dxbc
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 907b70249bcc4c0889778b0c47902ef359afacc0
|
||||
Subproject commit 2a43b89533a2c62398a827eb504f06e034786ac2
|
2
extern/tinygltf/CMakeLists.txt
vendored
2
extern/tinygltf/CMakeLists.txt
vendored
|
@ -4,4 +4,4 @@ find_package(stb REQUIRED)
|
|||
add_library(tinygltf STATIC)
|
||||
target_sources(tinygltf PRIVATE src/tiny_gltf.cc)
|
||||
target_include_directories(tinygltf PUBLIC include)
|
||||
target_link_libraries(tinygltf PUBLIC nlohmann_json::nlohmann_json)
|
||||
target_link_libraries(tinygltf PUBLIC nlohmann_json::nlohmann_json stb::stb)
|
4
extern/tinygltf/include/tiny_gltf.h
vendored
4
extern/tinygltf/include/tiny_gltf.h
vendored
|
@ -1710,13 +1710,13 @@ class TinyGLTF {
|
|||
|
||||
#ifndef TINYGLTF_NO_STB_IMAGE
|
||||
#ifndef TINYGLTF_NO_INCLUDE_STB_IMAGE
|
||||
#include <stb/stb_image.h>
|
||||
#include <stb_image.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef TINYGLTF_NO_STB_IMAGE_WRITE
|
||||
#ifndef TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE
|
||||
#include <stb/stb_image_write.h>
|
||||
#include <stb_image_write.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -229,14 +229,14 @@ void GameRenderer::render(VkCommandBuffer commandBuffer, uint32_t imageIndex, Ca
|
|||
}
|
||||
std::vector<uint32_t> subviewKeys = {physis_shpk_crc("Default"), physis_shpk_crc("SUB_VIEW_MAIN")};
|
||||
|
||||
const u_int32_t selector = physis_shpk_build_selector_from_all_keys(systemKeys.data(),
|
||||
systemKeys.size(),
|
||||
sceneKeys.data(),
|
||||
sceneKeys.size(),
|
||||
materialKeys.data(),
|
||||
materialKeys.size(),
|
||||
subviewKeys.data(),
|
||||
subviewKeys.size());
|
||||
const uint32_t selector = physis_shpk_build_selector_from_all_keys(systemKeys.data(),
|
||||
systemKeys.size(),
|
||||
sceneKeys.data(),
|
||||
sceneKeys.size(),
|
||||
materialKeys.data(),
|
||||
materialKeys.size(),
|
||||
subviewKeys.data(),
|
||||
subviewKeys.size());
|
||||
const physis_SHPKNode node = physis_shpk_get_node(&renderMaterial.shaderPackage, selector);
|
||||
|
||||
// check if invalid
|
||||
|
@ -280,14 +280,14 @@ void GameRenderer::render(VkCommandBuffer commandBuffer, uint32_t imageIndex, Ca
|
|||
physis_shpk_crc("SUB_VIEW_MAIN"),
|
||||
};
|
||||
|
||||
const u_int32_t selector = physis_shpk_build_selector_from_all_keys(systemKeys.data(),
|
||||
systemKeys.size(),
|
||||
nullptr,
|
||||
0,
|
||||
nullptr,
|
||||
0,
|
||||
subviewKeys.data(),
|
||||
subviewKeys.size());
|
||||
const uint32_t selector = physis_shpk_build_selector_from_all_keys(systemKeys.data(),
|
||||
systemKeys.size(),
|
||||
nullptr,
|
||||
0,
|
||||
nullptr,
|
||||
0,
|
||||
subviewKeys.data(),
|
||||
subviewKeys.size());
|
||||
const physis_SHPKNode node = physis_shpk_get_node(&createViewPositionShpk, selector);
|
||||
|
||||
// check if invalid
|
||||
|
@ -332,14 +332,14 @@ void GameRenderer::render(VkCommandBuffer commandBuffer, uint32_t imageIndex, Ca
|
|||
physis_shpk_crc("SUB_VIEW_MAIN"),
|
||||
};
|
||||
|
||||
const u_int32_t selector = physis_shpk_build_selector_from_all_keys(systemKeys.data(),
|
||||
systemKeys.size(),
|
||||
sceneKeys.data(),
|
||||
sceneKeys.size(),
|
||||
nullptr,
|
||||
0,
|
||||
subviewKeys.data(),
|
||||
subviewKeys.size());
|
||||
const uint32_t selector = physis_shpk_build_selector_from_all_keys(systemKeys.data(),
|
||||
systemKeys.size(),
|
||||
sceneKeys.data(),
|
||||
sceneKeys.size(),
|
||||
nullptr,
|
||||
0,
|
||||
subviewKeys.data(),
|
||||
subviewKeys.size());
|
||||
const physis_SHPKNode node = physis_shpk_get_node(&directionalLightningShpk, selector);
|
||||
|
||||
// check if invalid
|
||||
|
|
Loading…
Add table
Reference in a new issue