You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/build_instructions/windows_msvc.md
+68-56Lines changed: 68 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,100 +17,112 @@ __NOTE:__ You need to manually make sure and doublecheck if the system you are b
17
17
-->
18
18
19
19
## Setting up the build environment
20
-
You will need to download and install the following manually.
21
-
Those who already have the latest stable versions of these programs can skip this:
22
-
-[Visual Studio Buildtools](https://aka.ms/vs/17/release/vs_BuildTools.exe)
23
-
- With the "Visual C++ Buildtools" workload.
20
+
You will need to download and install the following manually.
21
+
Those who already have the latest stable versions of these programs can skip this:
24
22
25
-
_NOTE:_ If you are searching for an IDE for development you can get an overview [here](https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#C/C++).
26
-
We've also written some [instructions for developing with different IDEs](/doc/ide/README.md).
23
+
-[Visual Studio Buildtools](https://aka.ms/vs/17/release/vs_BuildTools.exe)
24
+
- With the "Visual C++ Buildtools" workload.
25
+
_NOTE:_ If you are searching for an IDE for development you can get an overview [here](https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#C/C++). We've also written some [instructions for developing with different IDEs](/doc/ide/README.md).
If you also want Vulkan graphics support, you should also run this command:
54
+
55
+
```ps
56
+
vcpkg install vulkan
57
+
```
49
58
50
-
_Note:_ The `qt6` port in vcpkg has been split into multiple packages, build times are acceptable now.
51
-
If you want, you can still use [the prebuilt version](https://www.qt.io/download-open-source/) instead.
52
-
If you do so, include `-DCMAKE_PREFIX_PATH=<QT6 directory>` in the cmake configure command.
59
+
_Note:_ The `qt` port in vcpkg has been split into multiple packages, build times are acceptable now. If you want, you can still use [the prebuilt version](https://www.qt.io/download-open-source/) instead. If you do so, include `-DCMAKE_PREFIX_PATH=<QT6 directory>` in the cmake configure command.
53
60
54
-
_Note:_ If you are planning to build the 64-bit version of openage, you are going to need 64-bit libraries.
55
-
Add command line option `--triplet x64-windows` to the above command or add the environment variable `VCPKG_DEFAULT_TRIPLET=x64-windows` to build x64 libraries. [See here](https://github.com/Microsoft/vcpkg/issues/1254)
61
+
_Note:_ If you are planning to build the 64-bit version of openage, you are going to need 64-bit libraries. Add command line option `--triplet x64-windows` to the above command or add the environment variable `VCPKG_DEFAULT_TRIPLET=x64-windows` to build x64 libraries. [See here](https://github.com/Microsoft/vcpkg/issues/1254)
56
62
57
63
<!---
58
64
__NOTE:__ You can also download the pre-built vcpkg dependencies (without Qt) [from this repository](https://github.com/simonsan/openage-win-dependencies/releases).
59
65
-->
60
66
61
67
## Building openage
62
-
Note that openage doesn't support completely out-of-source-tree builds yet.
63
-
We will, however, use a separate `build` directory to build the binaries.
68
+
Note that openage doesn't support completely out-of-source-tree builds yet. We will, however, use a separate `build` directory to build the binaries.
64
69
65
-
_Note:_ You will also need to set up [the dependencies for Nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md#windows), which is mainly [flex](https://sourceforge.net/projects/winflexbison/)
70
+
_Note:_ You will also need to set up [the dependencies for nyan](https://github.com/SFTtech/nyan/blob/master/doc/building.md#windows), which is mainly [flex](https://sourceforge.net/projects/winflexbison/).
_Note:_ If you want to build the x64 version, please add `-G "Visual Studio 17 2022" -A x64` (for VS2022) to the first cmake command.
75
82
76
83
_Note:_ If you want to download and build Nyan automatically add `-DDOWNLOAD_NYAN=YES -DFLEX_EXECUTABLE=<path to win_flex.exe>` to the first cmake command.
77
84
78
85
## Running openage (in devmode)
79
-
While this is straightforward on other platforms, there is still stuff to do to run openage on Windows:
80
-
- Install the [DejaVu Book Font](https://dejavu-fonts.github.io/Download.html).
81
-
- Download and extract the latest `dejavu-fonts-ttf` tarball/zip file.
82
-
- Select all `ttf\DejaVuSerif*.ttf` files, right click and click `Install for all users`.
83
-
84
-
_Note:_ This will require administrator rights.
85
-
- Set the `FONTCONFIG_PATH` environment variable to `<vcpkg directory>\installed\<relevant config>\tools\fontconfig\fonts\` or `<vcpkg directory>\installed\<relevant config>\etc\fonts\`.
86
-
- Copy `fontconfig\57-dejavu-serif.conf` to `%FONTCONFIG_PATH%\conf.d`.
87
-
-[Optional] Set the `AGE2DIR` environment variable to the AoE 2 installation directory.
88
-
- Set `QML2_IMPORT_PATH` to `<vcpkg directory>\installed\<relevant config>\qml` or for prebuilt Qt `<qt directory>\<qt-version>\<compiler-version>\qml`
89
-
- openage needs these DLL files to run:
90
-
-`openage.dll` (Usually in `<openage directory>\build\libopenage\<config built>`.)
91
-
-`nyan.dll` (The location depends on the procedure chosen to get nyan.)
92
-
- DLLs from vcpkg-installed dependencies. Normally, these DLLs should be copied to `<openage directory>\build\libopenage\<config built>` during the build process. If they are not, you can find them in `<vcpkg directory>\installed\<relevant config>\bin`.
93
-
- If prebuilt QT6 was installed, the original location of QT6 DLLs is `<QT6 directory>\bin`.
94
-
95
-
- Now, to run the openage:
96
-
- Open a CMD window in `<openage directory>\build\` and run `python -m openage main`
97
-
- Execute`<openage directory>\build\run.exe` every time after that and enjoy!
86
+
While this is straightforward on other platforms, there is still stuff to do to run openage on Windows:
87
+
88
+
- Install the [DejaVu Book Font](https://dejavu-fonts.github.io/Download.html).
89
+
- Download and extract the latest `dejavu-fonts-ttf` tarball/zip file.
90
+
- Select all `ttf\DejaVuSerif*.ttf` files, right click and click `Install for all users`.
91
+
_Note:_ This will require administrator rights.
92
+
93
+
- Set the `FONTCONFIG_PATH` environment variable to `<vcpkg directory>\installed\<relevant config>\tools\fontconfig\fonts\` or `<vcpkg directory>\installed\<relevant config>\etc\fonts\`.
94
+
- Copy `fontconfig\57-dejavu-serif.conf` to `%FONTCONFIG_PATH%\conf.d`.
95
+
-[Optional] Set the `AGE2DIR` environment variable to the AoE 2 installation directory.
96
+
- Set `QML2_IMPORT_PATH` to `<vcpkg directory>\installed\<relevant config>\qml` or for prebuilt Qt `<qt directory>\<qt-version>\<compiler-version>\qml`
97
+
- openage needs these DLL files to run:
98
+
-`openage.dll` (Usually in `<openage directory>\build\libopenage\<config built>`.)
99
+
-`nyan.dll` (The location depends on the procedure chosen to get nyan.)
100
+
- DLLs from vcpkg-installed dependencies. Normally, these DLLs should be copied to `<openage directory>\build\libopenage\<config built>` during the build process. If they are not, you can find them in `<vcpkg directory>\installed\<relevant config>\bin`.
101
+
- If prebuilt QT6 was installed, the original location of QT6 DLLs is `<QT6 directory>\bin`.
102
+
103
+
Now, to run openage:
104
+
105
+
- Open a CMD window in `<openage directory>\build\` and run `python -m openage main`
106
+
- Execute`<openage directory>\build\run.exe` every time after that and enjoy!
- Depending on the way you installed Qt (vcpkg/pre-built) you need to edit the following line in `<openage-repo-dir>\buildsystem\templates\ForwardVariables.cmake.in`:
- Depending on the way you installed Qt (vcpkg/pre-built) you need to edit the following line in `<openage-repo-dir>\buildsystem\templates\ForwardVariables.cmake.in`:
112
+
103
113
```
104
-
# Use windeploy for packaging qt-prebuilt, standard value '1' for windeploy, '0' for vcpkg
105
-
set(use_windeployqt 1)
114
+
# Use windeploy for packaging qt-prebuilt, standard value '1' for windeploy, '0' for vcpkg
115
+
set(use_windeployqt 1)
106
116
```
107
117
108
-
Open a command prompt at `<openage directory>\build` (or use the one from the building step):
118
+
Open a command prompt at `<openage directory>\build` (or use the one from the building step):
109
119
120
+
```ps
110
121
cpack -C RelWithDebInfo
122
+
```
111
123
112
-
The installer (`openage-<version>-<arch>.exe`) will be generated in the same directory.<br>
124
+
The installer (`openage-<version>-<arch>.exe`) will be generated in the same directory.<br>
113
125
114
-
_Hint:_ Append `-V` to the `cpack` command for verbose output (it takes time to package all dependencies).
126
+
_Note:_ Append `-V` to the `cpack` command for verbose output (it takes time to package all dependencies).
115
127
116
-
_Hint:_ <arch> you can set with the environment variable `TARGET_PLATFORM` (e.g. amd64, x86).
128
+
_Note:_ <arch> you can set with the environment variable `TARGET_PLATFORM` (e.g. amd64, x86).
0 commit comments