Skip to content

Commit 1bbeeb2

Browse files
committed
Windows: Add Qt6 and Editor install script
1 parent 4678800 commit 1bbeeb2

File tree

6 files changed

+60
-19
lines changed

6 files changed

+60
-19
lines changed

windows/README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ The ARM architecture is not supported.
1111

1212
## Compiling
1313

14-
- For EasyRPG Player: Run build.cmd
15-
- For EasyRPG Editor: (currently unsupported)
14+
- For EasyRPG Player: Run `build.cmd`
15+
- For EasyRPG Editor: Run `download_qt6.cmd` and `build_editor.cmd`
1616

1717
This bootstraps vcpkg and builds all required libraries.
1818

@@ -26,14 +26,14 @@ prebuilt version. Run ``download_prebuilt.cmd`` to obtain them.
2626
This precompiled version will only work on the latest version of Visual Studio
2727
2022. If you are using a different version, please compile it yourself.
2828

29-
## After compiling
30-
31-
### Environment setup
29+
## Environment setup
3230

3331
Run ``setup_env.cmd`` once to configure the necessary environment variables.
3432

3533
Then log out of Windows to ensure that the changes take effect.
3634

35+
## Compile instructions for EasyRPG Player
36+
3737
### Configuring
3838

3939
Open the "Developer Command Prompt for Visual Studio 2022" from the Start menu
@@ -71,5 +71,30 @@ Player.
7171
Open the ``EasyRPG_Player.sln`` file created in ``build\[PRESET]`` in Visual
7272
Studio (``[PRESET]`` is equal to the value after ``--preset`` above).
7373

74-
When the build type is different to Debug, you must set the correct build type
75-
manually in Visual Studio, otherwise you will get strange build errors.
74+
## Compile instructions for EasyRPG Editor
75+
76+
### Configuring
77+
78+
Open the "Developer Command Prompt for Visual Studio 2022" from the Start menu
79+
and navigate to your _EasyRPG Editor_ directory.
80+
81+
To configure the editor run:
82+
83+
```
84+
cmake --preset windows-x64-vs2022-[BUILD_TYPE]
85+
```
86+
87+
liblcf is not provided by the buildscript. Either compile it yourself or use
88+
the triplet `windows-x64-vs2022-liblcf-[BUILD_TYPE]` to build it as part of
89+
the Editor.
90+
91+
Options for ``[BUILD_TYPE]``:
92+
93+
- ``debug``: Debug build
94+
- ``relwithdebinfo``: Release build with debug symbols
95+
- ``release``: Release build without debug symbols
96+
97+
### Building
98+
99+
Open the ``EasyRPG_Editor.sln`` file created in ``build\[PRESET]`` in Visual
100+
Studio (``[PRESET]`` is equal to the value after ``--preset`` above).

windows/build_editor.cmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
:: Builds the dependencies for EasyRPG Editor
2+
3+
call helper\prepare.cmd
4+
5+
:: Build 64-bit libraries
6+
vcpkg install --triplet x64-windows-static-easyrpgeditor --recurse^
7+
zlib[core] expat[core] inih[cpp] nlohmann-json[core]
8+
9+
:: Other dependencies such as Kirigami are built via vcpkg.json and a custom
10+
:: overlay in the editor repository. This makes updating them easier.

windows/build_qt5.cmd

Lines changed: 0 additions & 12 deletions
This file was deleted.

windows/download_qt6.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:: Builds the dependencies for EasyRPG Editor Qt
2+
3+
:: call helper\prepare.cmd
4+
5+
curl -LO "https://github.com/miurahr/aqtinstall/releases/download/v3.3.0/aqt.exe"
6+
7+
aqt install-qt -O qt windows desktop 6.10.1 win64_msvc2022_64 -m all

windows/helper/prepare.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ git restore -s 50ca16008cebab427e90a98f8ffc34208b215dba ports/fmt
1818
:: Optimize the debug libraries
1919
copy ..\helper\windows.cmake scripts\toolchains\windows.cmake
2020

21+
:: add custom editor triplet
22+
copy ..\helper\x64-windows-static-easyrpgeditor.cmake triplets\x64-windows-static-easyrpgeditor.cmake
23+
2124
:: Copy custom portfiles
2225
:: ICU static data file
2326
xcopy /Y /I /E ..\icu-easyrpg ports\icu-easyrpg
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set(VCPKG_TARGET_ARCHITECTURE x64)
2+
# Qt6 uses the dynamic CRT (/MD)
3+
# The CRT must match for all linked libraries
4+
set(VCPKG_CRT_LINKAGE dynamic)
5+
set(VCPKG_LIBRARY_LINKAGE static)
6+
# Use our downloaded Qt6 prebuild
7+
# Compiling Qt6 manually takes hours
8+
set(VCPKG_ENV_PASSTHROUGH Qt6_Path)

0 commit comments

Comments
 (0)