Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 81 additions & 13 deletions .github/workflows/stable-compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ on:
description: Git Ref (Optional)
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
flatpak:
name: "Flatpak"
name: "Flatpak (x86_64)"
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.10
Expand Down Expand Up @@ -48,33 +52,36 @@ jobs:
name: ubuntu-24.04-arm

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0

- name: Install dependencies
- &deps
name: Install dependencies
run: |
export DEBIAN_FRONTEND="noninteractive"
apt-get update
apt-get install -yqq --no-install-recommends --no-install-suggests \
ca-certificates build-essential cmake ninja-build git \
curl zip unzip tar tzdata
libicu-dev curl zip unzip tar tzdata

- name: Install Qt6
- &qt6
name: Install Qt6
uses: jurplel/install-qt-action@v4
with:
version: '6.10.1'
install-deps: 'nosudo'
modules: 'qtmultimedia qtshadertools'
modules: 'qtmultimedia qtshadertools qtwaylandcompositor'

- name: Install vcpkg
- &vcpkg
name: Install vcpkg
run: |
git clone https://github.com/Microsoft/vcpkg.git ../vcpkg

- name: Clone Repository
uses: actions/checkout@v2
- &clone
name: Clone Repository
uses: actions/checkout@v6
if: github.event.inputs.git-ref == ''
- name: Clone Repository (with custom ref)
uses: actions/checkout@v2

- &cloneref
name: Clone Repository (with custom ref)
uses: actions/checkout@v6
if: github.event.inputs.git-ref != ''
with:
ref: ${{ github.event.inputs.git-ref }}
Expand All @@ -93,3 +100,64 @@ jobs:
- name: Install
run: |
cmake --build --preset vcpkg-liblcf-release --target install

appimage:
name: "AppImage (x86_64)"
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
options: --privileged

steps:
- *deps

- name: Install linuxdeploy dependencies
run: |
export DEBIAN_FRONTEND="noninteractive"
apt-get install -yqq --no-install-recommends --no-install-suggests \
file fuse

- *qt6
- *vcpkg
- *clone
- *cloneref

- name: Download linuxdeploy
run: |
curl -LO https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage

- name: Download linuxdeploy qt plugin
run: |
curl -LO https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage

- name: Compile
run: |
export VCPKG_ROOT=$PWD/../vcpkg
export Qt6_Path=$QT_ROOT_DIR
cmake --preset vcpkg-liblcf-release -DCMAKE_INSTALL_PREFIX=AppDir \
-DCMAKE_PREFIX_PATH=$QT_ROOT_DIR
cmake --build --preset vcpkg-liblcf-release

- name: Install
run: |
cmake --build --preset vcpkg-liblcf-release --target install

- name: Build AppImage
run: |
export EXTRA_QT_PLUGINS=waylandcompositor
export QML_SOURCES_PATHS="$PWD/src/ui"
./linuxdeploy-x86_64.AppImage \
--appdir AppDir \
--executable AppDir/bin/easyrpg-editor \
--desktop-file AppDir/share/applications/easyrpg-editor.desktop \
--icon-file AppDir/share/icons/hicolor/48x48/apps/easyrpg-editor.png \
--output appimage \
--plugin qt

- name: Upload AppImage artifact
uses: actions/upload-artifact@v4
with:
name: EasyRPG-Editor-AppImage
path: ./EasyRPG*.AppImage
59 changes: 36 additions & 23 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ cmake_policy(SET CMP0091 NEW) # Support MSVC_RUNTIME_LIBRARY

project(EasyRPG_Editor VERSION 0.1.0 LANGUAGES CXX)

# Qt6 and KF6 required
set(REQUIRED_QT_VERSION "6.11.0")
set(KF_DEP_VERSION "6.11.0")

# Extra CMake Module files
find_package(ECM ${KF_DEP_VERSION} REQUIRED)
set(REQUIRED_QT_VERSION "6.10.1")
find_package(ECM ${REQUIRED_QT_VERSION} REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/builds/cmake/Modules" ${ECM_MODULE_PATH})
include(EditorConfigureWindows)

Expand Down Expand Up @@ -334,14 +331,16 @@ set(EDITOR_QML_INTERFACE
)

# Dependencies
find_package(Qt6 CONFIG REQUIRED COMPONENTS Widgets Core Multimedia Gui Svg QuickControls2)
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED COMPONENTS Widgets Core Multimedia Gui GuiPrivate Svg QuickControls2)
find_package(Qt6LinguistTools CONFIG QUIET)
find_package(ZLIB REQUIRED)
find_package(glaze REQUIRED)
find_package(KF6 ${KF_DEP_VERSION} REQUIRED COMPONENTS Kirigami)
find_package(QQC2BreezeStyle REQUIRED)

qt_standard_project_setup(
REQUIRES "6.10.1"
REQUIRES "${REQUIRED_QT_VERSION}"
)

# Executable
Expand Down Expand Up @@ -471,6 +470,35 @@ target_link_libraries(${EXE_NAME} PRIVATE
Qt6::QuickControls2
)

get_target_property(KIRIGAMI_TYPE KF6::Kirigami TYPE)
message(STATUS "Kirigami library type: ${KIRIGAMI_TYPE}")
if(KIRIGAMI_TYPE STREQUAL "STATIC_LIBRARY")
# Why is this so difficult? Kirigami bug?
target_link_libraries(${EXE_NAME} PRIVATE
KF6::Kirigami
KF6Kirigamiplugin
KF6KirigamiTemplatesplugin
KF6KirigamiDialogsplugin
KF6KirigamiDelegatesplugin
KF6KirigamiLayoutsplugin
KF6KirigamiLayoutsPrivateplugin
KF6KirigamiPrimitivesplugin
KF6KirigamiPrivateplugin
KF6KirigamiPolyfillplugin
)
endif()

get_target_property(QQC2_TYPE org.kde.breeze TYPE)
message(STATUS "BreezeStyle library type: ${QQC2_TYPE}")
if(QQC2_TYPE STREQUAL "STATIC_LIBRARY")
target_link_libraries(${EXE_NAME} PRIVATE
BreezeStyle
BreezeImpl
)
endif()

qt_import_qml_plugins(${EXE_NAME})

# Add resources
target_sources(${EXE_NAME} PRIVATE "resources/Resources.qrc")

Expand All @@ -495,11 +523,6 @@ else()
message(STATUS "Disabling translation support")
endif()

# Kirigami QML import path to make developing easier when using vcpkg
if (DEFINED VCPKG_TARGET_TRIPLET)
target_compile_options(${EXE_NAME} PUBLIC "-DQML_EXTRA_IMPORT_PATHS=\"${VCPKG_DIR}/lib/qml\"")
endif()

qt_finalize_target(${EXE_NAME})

# Installation
Expand Down Expand Up @@ -544,20 +567,10 @@ if(WIN32 OR APPLE)
endif()

if(WIN32)
# Copy DLL dependencies
install(
DIRECTORY ${VCPKG_DIR}/bin/
DESTINATION ${CMAKE_INSTALL_BINDIR}
FILES_MATCHING
PATTERN "*.dll"
)
# Copy Kirigami QML
install(DIRECTORY ${VCPKG_DIR}/lib/qml/ DESTINATION qml)

# Environment for the MSVC Debugger
set_target_properties(${EXE_NAME}
PROPERTIES VS_DEBUGGER_ENVIRONMENT
"PATH=${VCPKG_DIR}/bin;$ENV{Qt6_Path}/bin;%PATH%"
"PATH=$ENV{Qt6_Path}/bin;%PATH%"
)

# Other dev environments
Expand Down
28 changes: 14 additions & 14 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
{
"name": "windows-parent",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "$env{VSCMD_ARG_TGT_ARCH}-windows-static-easyrpgeditor"
"VCPKG_TARGET_TRIPLET": "$env{VSCMD_ARG_TGT_ARCH}-windows-eze"
},
"inherits": "win-user",
"hidden": true
Expand All @@ -141,7 +141,7 @@
"windows-parent",
"type-debug"
],
"binaryDir": "${sourceDir}/build/win-debug"
"binaryDir": "${sourceDir}/build/win-dbg"
},
{
"name": "windows-relwithdebinfo",
Expand All @@ -150,7 +150,7 @@
"windows-parent",
"type-relwithdebinfo"
],
"binaryDir": "${sourceDir}/build/win-relwithdebinfo"
"binaryDir": "${sourceDir}/build/win-reld"
},
{
"name": "windows-release",
Expand All @@ -159,7 +159,7 @@
"windows-parent",
"type-release"
],
"binaryDir": "${sourceDir}/build/win-release"
"binaryDir": "${sourceDir}/build/win-rel"
},
{
"name": "windows-liblcf-debug",
Expand All @@ -169,7 +169,7 @@
"windows-parent",
"type-debug"
],
"binaryDir": "${sourceDir}/build/win-debug"
"binaryDir": "${sourceDir}/build/win-dbg"
},
{
"name": "windows-liblcf-relwithdebinfo",
Expand All @@ -179,7 +179,7 @@
"windows-parent",
"type-relwithdebinfo"
],
"binaryDir": "${sourceDir}/build/win-relwithdebinfo"
"binaryDir": "${sourceDir}/build/win-reld"
},
{
"name": "windows-liblcf-release",
Expand All @@ -189,14 +189,14 @@
"windows-parent",
"type-release"
],
"binaryDir": "${sourceDir}/build/win-release"
"binaryDir": "${sourceDir}/build/win-rel"
},
{
"name": "windows-x64-vs2022-parent",
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-windows-static-easyrpgeditor"
"VCPKG_TARGET_TRIPLET": "x64-windows-eze"
},
"inherits": "win-user",
"hidden": true
Expand All @@ -208,7 +208,7 @@
"windows-x64-vs2022-parent",
"type-debug"
],
"binaryDir": "${sourceDir}/build/win-debug"
"binaryDir": "${sourceDir}/build/win-dbg"
},
{
"name": "windows-x64-vs2022-relwithdebinfo",
Expand All @@ -217,7 +217,7 @@
"windows-x64-vs2022-parent",
"type-relwithdebinfo"
],
"binaryDir": "${sourceDir}/build/win-relwithdebinfo"
"binaryDir": "${sourceDir}/build/win-reld"
},
{
"name": "windows-x64-vs2022-release",
Expand All @@ -226,7 +226,7 @@
"windows-x64-vs2022-parent",
"type-release"
],
"binaryDir": "${sourceDir}/build/win-release"
"binaryDir": "${sourceDir}/build/win-rel"
},
{
"name": "windows-x64-vs2022-liblcf-debug",
Expand All @@ -236,7 +236,7 @@
"windows-x64-vs2022-parent",
"type-debug"
],
"binaryDir": "${sourceDir}/build/win-debug"
"binaryDir": "${sourceDir}/build/win-dbg"
},
{
"name": "windows-x64-vs2022-liblcf-relwithdebinfo",
Expand All @@ -246,7 +246,7 @@
"windows-x64-vs2022-parent",
"type-relwithdebinfo"
],
"binaryDir": "${sourceDir}/build/win-relwithdebinfo"
"binaryDir": "${sourceDir}/build/win-reld"
},
{
"name": "windows-x64-vs2022-liblcf-release",
Expand All @@ -256,7 +256,7 @@
"windows-x64-vs2022-parent",
"type-release"
],
"binaryDir": "${sourceDir}/build/win-release"
"binaryDir": "${sourceDir}/build/win-rel"
},
{
"name": "macos-parent",
Expand Down
Loading
Loading