Adds a CMake function `fn__required_program()` that can be used to
ensure that a program is installed and present in PATH. If the program
is found then it is run with a test argument to check that it works.
If it doesn't work, or if it wasn't found, then the build is stopped
and a useful error message is displayed on the console. The message can
include a URL that points to a webpage where help is available.
Demonstrates use of this function by running `qmake --version` at build
time to print the Qt version, or failing with an appropriate message.
Old permissions: rwxr--r-- (Owner can execute)
New permissions: rwxr-xr-x (Owner, Group and World can execute)
Owner execute is not enough because the files are owned by root at runtime
(the AppImage is mounted this way by FUSE). Normally the permissions are
ignored, but they matter when trying to run the AppImage inside a sandbox
with an application like Firejail.
The “CMakeLists.txt” CMake configuration file for MuseScore applies the following default settings to generated Microsoft Visual Studio projects:
1. Force the “install” and “package” targets not to depend on the “all” target.
2. Set the startup project to “mscore”.
These settings are fine. However, the second setting was applied using incorrect syntax, causing the startup project to end up not getting set at all. (It's possible that this syntax used to work in previous versions of Visual Studio, but it doesn't work in either Visual Studio 2017 or Visual Studio 2019). This is now fixed.
Additionally, the following settings are now applied:
3. Set “Debugging” | “Command” to the full path of the built executable installed by the “INSTALL” project.
4. Set “Debugging” | “Command Arguments” to “--debug” so that MuseScore is run in debug mode while being debugged. (Note: This setting requires CMake 3.13.0 or later, so it won't work in Visual Studio 2017, which comes with CMake 3.12.x.)
5. Set “Debugging” | “Working Directory” to the full path of the location of the built executable installed by the “INSTALL” project.
Prior to this fix, the developer had to manually apply the above settings each and every time the Visual Studio projects were generated or regenerated by CMake. Otherwise, any attempt to debug failed with a series of very confusing error messages (e.g., “MuseScore3.exe - Entry Point Not Found: The procedure entry point ?isNCName@QXmlUtils@@SA_NAEBVQString@@@Z could not be located in the dynamic link library C:\Qt\5.9.9\msvc2017_64\bin\Qt5XmlPatterns.dll.”).
These problems are now fixed, making it possible to start debugging MuseScore in Visual Studio immediately after building.
Finally, in the “CMakeSettings.json” schema file, the “buildCommandArgs” property of the “x64-RelWithDebInfo” configuration was set to “-v”. This is a setting for the Ninja generator, but the schema isn't set up for that generator. Instead, it specifies the “Visual Studio 15 2017 Win64” generator, which uses the Microsoft Build Engine (MSBuild). Consequently, building inside Visual Studio using the “CMake” | “Build All” command failed with the following error message: “error MSB1016: Specify the verbosity level.”
In Ninja, the “-v” option is used to show all command lines while building. Since MSBuild already shows the command lines by default, the incorrect “-v” setting has simply been removed.
New files bundled in AppImage:
- libcupsprintersupport.so - Qt printsupport plugin
- libnss3.so - a fallback for Chromebook devices
- findlibs - tiny C program to check system libraries