Skip to content

Commit

Permalink
Update doc/COMPILING-VS-VCPKG.md (CleverRaven#56704)
Browse files Browse the repository at this point in the history
  • Loading branch information
alef authored Apr 16, 2022
1 parent 62a0535 commit 70d71a7
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions doc/COMPILING/COMPILING-VS-VCPKG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ cd Cataclysm-DDA

Even if you do not need languages other than English, you may still want to execute `lang/compile_mo.sh` to compile the language files if you're planning to run the unit tests, since those rely on the language files existing.

### Debugging
### Running and debugging Cataclysm

1. Ensure that the Cataclysm project (`Cataclysm-vcpkg-static`) is the selected startup project.

Expand All @@ -79,19 +79,26 @@ Even if you do not need languages other than English, you may still want to exec
2. Configure the working directory in the project settings to `$(ProjectDir)..`

- Right click the project in the Solution Explorer pane, select `Properties`
- Select Configuration to `All Configurations` and Platform to `All Platforms`
- Under `Configuration Properties > Debugging`, change `Working Directory` to `$(ProjectDir)..`
- **Note:** If you change configurations (eg from `Release` to `Debug`), you will have to repeat this step. You only have to do it once per configuration, the setting will persist.

If you discover that after pressing the debug button in Visual Studio, Cataclysm just exits after launch with return code 1, that is because of the wrong working directory.

When debugging, it is not strictly necessary to use a `Debug` build; `Release` builds run significantly faster, can still be run in the debugger, and most of the time will have most of the information you need.

### Running unit tests

Ensure that the Cataclysm test project (`Cataclysm-test-vcpkg-static`) is the selected startup project, configure the working directory in the project settings to `$(ProjectDir)..`, and then press the debug button (or use the appropriate shortcut, e.g. F5). This will run all of the unit tests.
1. Ensure that the Cataclysm test project (`Cataclysm-test-vcpkg-static`) is the selected startup project.

2. Configure the working directory in the project settings to `$(ProjectDir)..`

3. Configure any extra command line arguments for the tests.

- Under `Configuration Properties > Debugging`, change `Command Arguments` to the needed arguments.
- `--wait-for-keypress exit` can be helpful by keeping the test window open at the end until you press Enter.

Additional command line arguments may be configured in the project's command line arguments setting, or if you are using a compatible unit test runner (e.g. Resharper) you can run or debug individual tests from the unit test sessions.
You can also start the test runner library manually from windows console. Run it with `--help` for an overview of the arguments.
You can also start the test runner library manually from Windows console. Run it with `--help` for an overview of the arguments.

### Make a distribution

Expand Down

0 comments on commit 70d71a7

Please sign in to comment.