Following the instructions to build audacity, the instructions for getting the custom version of wx built worked perfectly. At the point of opening the CMakeLIst file from Open > CMake… the first time things went well until this line, which I don’t follow completely and could perhaps be a tad more verbose. I do not see anything called “Verify Toolset”. Not sure what that means, or what I should have seen but I didn’t see it.
The instructions DID say these were done with 16.8.5, which I think must be a minimum. I suspect my tools were slightly out of date. (16.8.3).
The latest release March 21, is 16.9.2. I’ll be trying that later today…
b) Open the CMake GUI
Open VS 2019 > "continue without code" > File > Open > CMake
Open CMakeLists.txt in root of audacity source folder you cloned
Wait for the CMake Overview Pages tab to appear (be patient)
Click "Open the CMake Settings Editor" in this new tab
Scroll up to the top of the window and settings
In the Configurations window, click the green "+", then select x86-Release
Set Configuration type: Release
Verify Toolset: msvc_86
Keep Build Root: ${projectDir}\out\build\${name} (default, you can
change it) (this corresponds to CMAKE_BINARY_DIR)
Click on "Show advanced settings" (scroll down).
Change CMake generator: VS 16 2019 (was Ninja)
Click "Save and Generate CMake cache to load variables" once, then
Click "Save and Generate CMake cache to load variables" a second time
or select Project > Generate CMake Cache
I continued merily onward and did what I could and then tried to click Project > Generate CMake Cache.
Next time I reopen visual studio, I reopen the cmake project like this:
File > Open > CMake…
And I get this error:
An error occurred in [Unknown]
open Cmake Settings in visual studio 2019:
This is in Visual Studio 16.8.3 which I realize is .2 below the readme notes. My updater is now update to 16.9.2 and I’ll update this thread if that clears it up.
Another error that happens is from the CMake page where you click open open settings editor and this happens:
message dialog:
System.ArgumentException: Value does not fall within the expected range.
I think that is also a CMake-tooling bug in VS2019.
Could the CMake setup thing perhaps itself be scripted to occur from the command line, perhaps as a “visual_studio_bootstrap.py” (python 3.x) or “visual_studio_bootstrap.ps1” (powershell). Since the tooling in Visual Studio is a bit wonkoid, always. Last time I did C++ dev in Visual Studio I don’t think CMake tooling existed so I should be happy this stuff exists.
Let me just give some HUGE kudos to whoever did write the existing build instructions as they are hands down above the usual open source build on windows instructions. Kudos, kind people.
I will update this thread to confirm that VS 2019 windows build 16.9.2 works once I sort that out. Another question is shouldn’t the instructions for building tell the user to build the x64 and x86 Library binaries for the Audacity-fork-of-WX, since most people are going to be building Audacity 64 bit? That would mean that they should check that …\wx…\lib\vc_x64_dll folder exists as well.