From 2a2faa73ea52b7c15b1f4e6337ac8fea134348ec Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 24 Mar 2020 03:19:38 +0100 Subject: [PATCH] Correct wx/msw/setup.h instructions in the documentation This file doesn't need to be created initially, as it will be done automatically during the build, but it does need to be updated whenever setup0.h changes, so explain this in both the README-GIT.md file and the main build instructions. Closes #18699. --- README-GIT.md | 15 ++++++++------- docs/msw/install.md | 23 ++++++++++++++--------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/README-GIT.md b/README-GIT.md index af30263943..cb7c329c5e 100644 --- a/README-GIT.md +++ b/README-GIT.md @@ -5,13 +5,14 @@ Please use `--recurse-submodules` option with the initial `git clone`. If you had already cloned the repository without this option, please run `git submodule update --init` to also get all 3rd party libraries code. -Before building from Git sources under Windows, you need to copy the -file `include/wx/msw/setup0.h` to `include/wx/msw/setup.h`. This is -necessary in order to allow having local modifications to the latter -file without showing it as modified, as it is not under version -control. +If you get errors about "wxUSE_XXX must be defined" when building, it +probably means that you need to copy the new options added to the file +`include/wx/msw/setup0.h` to `include/wx/msw/setup.h`. If you had never +modified the latter, it's safe to just delete it, as it will be created +by copying `setup0.h` during the next build. -After doing this, please proceed with the build as with any official -release, i.e. follow the instructions in the port-specific files, e.g. +Otherwise, building from Git checkout is not different from building +from the sources include into the releases, so please follow the usual +instructions in the port-specific files, such as [wxMSW](docs/msw/install.md), [wxGTK](docs/gtk/install.md), [wxOSX](docs/osx/install.md) and so on. diff --git a/docs/msw/install.md b/docs/msw/install.md index 0e2129a4e1..67346b1470 100644 --- a/docs/msw/install.md +++ b/docs/msw/install.md @@ -34,16 +34,21 @@ variable containing the full path to this directory. While this is not actually required, this makes using the library more convenient and this environment variable is used in the examples below. -NB: If you checked your sources from version control repository and -didn't obtain them from a release file, you also need to copy -`include/wx/msw/setup0.h` to `include/wx/msw/setup.h` and to remember -to update the latter whenever the former changes, otherwise you -will get compilation errors if any new symbols are added to -setup0.h file in the repository. +Upgrading Existing Git Checkout {#msw_update_setup_h} +------------------------------- -If you have no intention of modifying setup.h, you may avoid this -problem by creating a symbolic link to setup0.h instead of making -a copy of it using mklink, from an admin command prompt: +If you checked your sources from version control repository and didn't +obtain them from a release file, you may need to update your +`include/wx/msw/setup.h` file to add any new options from +`include/wx/msw/setup0.h` to it. If you hadn't edited `setup.h` file +manually, you can just delete it to force recreating it by copying +`setup0.h` to `setup.h` during the next build. If you forget to do it, +you may get errors during the build due to new options being +undefined. + +If you have no intention of ever modifying `setup.h`, you may avoid this +problem entirely by creating a symbolic link to `setup0.h` before +building, e.g. using mklink, from an admin command prompt: cd %WXWIN%\include\wx\msw\ mklink setup.h setup0.h