From acd32ea10b724c869aaf72855c258eea09e0c2e5 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Mon, 24 Nov 2025 12:32:13 +0100 Subject: [PATCH 1/4] Windows: Add Qt6 and Editor install script --- windows/README.md | 39 +++++++++++++++---- windows/build_editor.cmd | 10 +++++ windows/build_qt5.cmd | 12 ------ windows/download_qt6.cmd | 7 ++++ windows/helper/prepare.cmd | 3 ++ .../x64-windows-static-easyrpgeditor.cmake | 8 ++++ 6 files changed, 60 insertions(+), 19 deletions(-) create mode 100644 windows/build_editor.cmd delete mode 100644 windows/build_qt5.cmd create mode 100644 windows/download_qt6.cmd create mode 100644 windows/helper/x64-windows-static-easyrpgeditor.cmake diff --git a/windows/README.md b/windows/README.md index ebd2919e..580df581 100644 --- a/windows/README.md +++ b/windows/README.md @@ -11,8 +11,8 @@ The ARM architecture is not supported. ## Compiling - - For EasyRPG Player: Run build.cmd - - For EasyRPG Editor: (currently unsupported) + - For EasyRPG Player: Run `build.cmd` + - For EasyRPG Editor: Run `download_qt6.cmd` and `build_editor.cmd` This bootstraps vcpkg and builds all required libraries. @@ -26,14 +26,14 @@ prebuilt version. Run ``download_prebuilt.cmd`` to obtain them. This precompiled version will only work on the latest version of Visual Studio 2022. If you are using a different version, please compile it yourself. -## After compiling - -### Environment setup +## Environment setup Run ``setup_env.cmd`` once to configure the necessary environment variables. Then log out of Windows to ensure that the changes take effect. +## Compile instructions for EasyRPG Player + ### Configuring Open the "Developer Command Prompt for Visual Studio 2022" from the Start menu @@ -71,5 +71,30 @@ Player. Open the ``EasyRPG_Player.sln`` file created in ``build\[PRESET]`` in Visual Studio (``[PRESET]`` is equal to the value after ``--preset`` above). -When the build type is different to Debug, you must set the correct build type -manually in Visual Studio, otherwise you will get strange build errors. +## Compile instructions for EasyRPG Editor + +### Configuring + +Open the "Developer Command Prompt for Visual Studio 2022" from the Start menu +and navigate to your _EasyRPG Editor_ directory. + +To configure the editor run: + +``` +cmake --preset windows-x64-vs2022-[BUILD_TYPE] +``` + +liblcf is not provided by the buildscript. Either compile it yourself or use +the triplet `windows-x64-vs2022-liblcf-[BUILD_TYPE]` to build it as part of +the Editor. + +Options for ``[BUILD_TYPE]``: + +- ``debug``: Debug build +- ``relwithdebinfo``: Release build with debug symbols +- ``release``: Release build without debug symbols + +### Building + +Open the ``EasyRPG_Editor.sln`` file created in ``build\[PRESET]`` in Visual +Studio (``[PRESET]`` is equal to the value after ``--preset`` above). diff --git a/windows/build_editor.cmd b/windows/build_editor.cmd new file mode 100644 index 00000000..d3d2afa7 --- /dev/null +++ b/windows/build_editor.cmd @@ -0,0 +1,10 @@ +:: Builds the dependencies for EasyRPG Editor + +call helper\prepare.cmd + +:: Build 64-bit libraries +vcpkg install --triplet x64-windows-static-easyrpgeditor --recurse^ + zlib[core] expat[core] inih[cpp] nlohmann-json[core] + +:: Other dependencies such as Kirigami are built via vcpkg.json and a custom +:: overlay in the editor repository. This makes updating them easier. diff --git a/windows/build_qt5.cmd b/windows/build_qt5.cmd deleted file mode 100644 index 96bca033..00000000 --- a/windows/build_qt5.cmd +++ /dev/null @@ -1,12 +0,0 @@ -:: Builds the dependencies for EasyRPG Editor Qt - -call helper\prepare.cmd - -:: Depend on icu-easyrpg -:: FIXME: Delete this when vcpkg implements "Provides:" -powershell -Command "(Get-Content ports\qt5-base\CONTROL) -replace 'icu', 'icu-easyrpg' | Out-File -encoding ASCII 'ports\qt5-base\CONTROL'" - -:: Build 64-bit libraries -vcpkg install --triplet x64-windows-static --recurse^ - expat[core]^ - qt5[core,multimedia,svg,declarative,extras] diff --git a/windows/download_qt6.cmd b/windows/download_qt6.cmd new file mode 100644 index 00000000..dc03c6bc --- /dev/null +++ b/windows/download_qt6.cmd @@ -0,0 +1,7 @@ +:: Builds the dependencies for EasyRPG Editor Qt + +:: call helper\prepare.cmd + +curl -LO "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0/aqt.exe" + +aqt install-qt -O qt windows desktop 6.10.1 win64_msvc2022_64 -m all diff --git a/windows/helper/prepare.cmd b/windows/helper/prepare.cmd index 9f7d0ef0..9087d14f 100644 --- a/windows/helper/prepare.cmd +++ b/windows/helper/prepare.cmd @@ -18,6 +18,9 @@ git restore -s 50ca16008cebab427e90a98f8ffc34208b215dba ports/fmt :: Optimize the debug libraries copy ..\helper\windows.cmake scripts\toolchains\windows.cmake +:: add custom editor triplet +copy ..\helper\x64-windows-static-easyrpgeditor.cmake triplets\x64-windows-static-easyrpgeditor.cmake + :: Copy custom portfiles :: ICU static data file xcopy /Y /I /E ..\icu-easyrpg ports\icu-easyrpg diff --git a/windows/helper/x64-windows-static-easyrpgeditor.cmake b/windows/helper/x64-windows-static-easyrpgeditor.cmake new file mode 100644 index 00000000..a75de6db --- /dev/null +++ b/windows/helper/x64-windows-static-easyrpgeditor.cmake @@ -0,0 +1,8 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +# Qt6 uses the dynamic CRT (/MD) +# The CRT must match for all linked libraries +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE static) +# Use our downloaded Qt6 prebuild +# Compiling Qt6 manually takes hours +set(VCPKG_ENV_PASSTHROUGH Qt6_Path) From 4f1e09c68c8be48da7005b6bab6ecbf3d342eb42 Mon Sep 17 00:00:00 2001 From: Ghabry Date: Mon, 24 Nov 2025 12:38:09 +0100 Subject: [PATCH 2/4] Windows: Update qt6 comment --- windows/download_qt6.cmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/windows/download_qt6.cmd b/windows/download_qt6.cmd index dc03c6bc..0fb57c11 100644 --- a/windows/download_qt6.cmd +++ b/windows/download_qt6.cmd @@ -1,6 +1,6 @@ -:: Builds the dependencies for EasyRPG Editor Qt - -:: call helper\prepare.cmd +:: Downloads the Qt6 precompiled libraries +:: These are the official ones from the Qt Project +:: Compiling Qt6 is not feasible as it takes hours curl -LO "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0/aqt.exe" From 67be3e93cacdae622a2fa4bdb49022d91f0a594f Mon Sep 17 00:00:00 2001 From: Ghabry Date: Wed, 18 Feb 2026 15:43:26 +0100 Subject: [PATCH 3/4] Windows: Document long path support and add glaze dependency --- windows/README.md | 14 ++++++++++++++ windows/build_editor.cmd | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/windows/README.md b/windows/README.md index 580df581..4804f6ff 100644 --- a/windows/README.md +++ b/windows/README.md @@ -73,6 +73,20 @@ Studio (``[PRESET]`` is equal to the value after ``--preset`` above). ## Compile instructions for EasyRPG Editor +### Enabling Long Path Support + +Compiling the editor fails because the path length of the Kirigami dependency +exceeds the legacy Windows limit of 260 characters. + +To resolve this issue, either enable long path support in the Windows 11 +Developer Settings, or run the following command in PowerShell as an +administrator: + +```psh +New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" ` + -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force +``` + ### Configuring Open the "Developer Command Prompt for Visual Studio 2022" from the Start menu diff --git a/windows/build_editor.cmd b/windows/build_editor.cmd index d3d2afa7..20241ca5 100644 --- a/windows/build_editor.cmd +++ b/windows/build_editor.cmd @@ -4,7 +4,7 @@ call helper\prepare.cmd :: Build 64-bit libraries vcpkg install --triplet x64-windows-static-easyrpgeditor --recurse^ - zlib[core] expat[core] inih[cpp] nlohmann-json[core] + zlib[core] expat[core] inih[cpp] nlohmann-json[core] glaze[core] :: Other dependencies such as Kirigami are built via vcpkg.json and a custom :: overlay in the editor repository. This makes updating them easier. From b5b451443f94dbb9ffa10ad1146590e35197dc5d Mon Sep 17 00:00:00 2001 From: Ghabry Date: Fri, 20 Feb 2026 15:56:28 +0100 Subject: [PATCH 4/4] macOS: Add qt6 downloader --- macos/download_qt6.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 macos/download_qt6.sh diff --git a/macos/download_qt6.sh b/macos/download_qt6.sh new file mode 100755 index 00000000..11bd4845 --- /dev/null +++ b/macos/download_qt6.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Downloads the Qt6 precompiled libraries +# These are the official ones from the Qt Project +# Compiling Qt6 is not feasible as it takes hours + +curl -LO "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0/aqt-macos" + +chmod +x aqt-macos + +./aqt-macos install-qt -O qt mac desktop 6.10.1 clang_64 -m all