Updated Building for Windows (markdown)
parent
5780323f4e
commit
1d6e23e682
|
@ -1,6 +1,5 @@
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
- Windows 7 SP1 or higher, 64-bit version
|
- [Visual Studio 2022](https://www.visualstudio.com/downloads/)
|
||||||
- [Visual Studio 2019](https://www.visualstudio.com/downloads/)
|
|
||||||
- You can use any edition of VS (Community Edition is free)
|
- You can use any edition of VS (Community Edition is free)
|
||||||
- Easiest to just choose "Desktop development with C++" workload
|
- Easiest to just choose "Desktop development with C++" workload
|
||||||
- However, minimum required to get source and build are:
|
- However, minimum required to get source and build are:
|
||||||
|
@ -8,7 +7,7 @@
|
||||||
- C++ core features
|
- C++ core features
|
||||||
- Latest MSVC C++ build tools (x64/x86 and/or ARM64)
|
- Latest MSVC C++ build tools (x64/x86 and/or ARM64)
|
||||||
- Latest Windows SDK
|
- Latest Windows SDK
|
||||||
- C++ CMake tools for Windows
|
- C++ CMake tools for Windows (if using cmake)
|
||||||
- Recommended for development / debugging (included in workload)
|
- Recommended for development / debugging (included in workload)
|
||||||
- Just-In-Time debugger
|
- Just-In-Time debugger
|
||||||
- C++ profiling tools (pulls in graphics debugging features)
|
- C++ profiling tools (pulls in graphics debugging features)
|
||||||
|
@ -17,17 +16,43 @@
|
||||||
To install all of the above on the command line, you can use something like:
|
To install all of the above on the command line, you can use something like:
|
||||||
`vs_Community.exe --passive --add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended --add Microsoft.VisualStudio.Component.Git --add Microsoft.VisualStudio.Component.VC.Tools.ARM64`
|
`vs_Community.exe --passive --add Microsoft.VisualStudio.Workload.NativeDesktop;includeRecommended --add Microsoft.VisualStudio.Component.Git --add Microsoft.VisualStudio.Component.VC.Tools.ARM64`
|
||||||
|
|
||||||
## Get and Build Dolphin
|
## Clone Dolphin
|
||||||
### Clone
|
* Building on Windows requires pulling in some submodules, so use `git clone --recursive` to clone dolphin from the main repo or your fork.
|
||||||
* Windows requires pulling in some submodules, so use `git clone --recursive` to clone dolphin from the main repo or your fork.
|
|
||||||
* If you have already cloned the directory *without* pulling in the submodules run ``git submodule update --init`` to initialize the submodules.
|
* If you have already cloned the directory *without* pulling in the submodules run ``git submodule update --init`` to initialize the submodules.
|
||||||
|
|
||||||
### Building
|
## Building
|
||||||
1. Open the folder you cloned Dolphin into.
|
Dolphin can be built with msbuild or cmake. Both msbuild and cmake are supported from Visual Studio (or other IDEs, like VS Code) as well as command line. The following assume Dolphin was cloned into `c:\src\dolphin`.
|
||||||
![Open Folder](https://i.imgur.com/qkpG1sV.png)
|
|
||||||
![Folder](https://i.imgur.com/iz9KUSH.png)
|
### Build in Visual Studio from GUI with msbuild (recommended)
|
||||||
2. Select the target you'd like to build:
|
1. Open `Source\dolphin-emu.sln` with Visual Studio
|
||||||
![Target Example](https://i.imgur.com/KRW6XJQ.png)
|
1. Configure build target (e.g. x64 / Release)
|
||||||
3. Select ``Dolphin.exe`` as a startup item
|
1. Press F7 or choose `Build > Build Solution` from the menu bar
|
||||||
![Select Startup Item](https://i.imgur.com/TsHeHvt.png)
|
|
||||||
4. Press F7 or choose Build > Build Solution from the menu bar.
|
### Build in Visual Studio from GUI with cmake
|
||||||
|
1. Open the folder Dolphin was cloned into with Visual Studio
|
||||||
|
* From the cmdline: `c:\src\dolphin>devenv .`
|
||||||
|
1. Configure build target (e.g. Release)
|
||||||
|
1. Select ``Dolphin.exe`` as startup item
|
||||||
|
1. Press F7 or choose `Build > Build Solution` from the menu bar
|
||||||
|
|
||||||
|
### Build in VS Code with cmake
|
||||||
|
1. Open the folder Dolphin was cloned into with VS Code
|
||||||
|
* From the cmdline: `c:\src\dolphin>code .`
|
||||||
|
1. Install and use the [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) extension.
|
||||||
|
|
||||||
|
### Command line
|
||||||
|
First, bring msvc tools into your environment.
|
||||||
|
* For example: `c:\src\dolphin>"c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64`
|
||||||
|
|
||||||
|
#### Build with msbuild
|
||||||
|
```
|
||||||
|
c:\src\dolphin>msbuild -v:m -m -p:Platform=x64,Configuration=Release Source\dolphin-emu.sln
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Build with cmake
|
||||||
|
```
|
||||||
|
cd c:\src\dolphin
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -GNinja
|
||||||
|
ninja
|
||||||
|
```
|
Loading…
Reference in New Issue