You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Require Ninja as the CMake generator on all platforms; remove the
"Faster builds with Ninja (optional)" sections and the Visual Studio
generator option on Windows.
- Pin vcpkg to commit c2aeddd80357b17592e59ad965d2adf65a19b22f in all
three guides for reproducible dependency builds.
- Document CMakeUserPresets.json as the single way to point CMake at
the local Qt 6.5.3 install; drop the Qt6_DIR env-var and one-off
-DQt6_DIR command-line paths.
- Note that --target package on Windows is slow and recommend a plain
cmake --build build for dev iteration.
- Remove docs/reference/build_guides/developer_tips.md and the link
to it from windows.md.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/reference/build_guides/linux_generic.md
+25-58Lines changed: 25 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,24 @@ xSTUDIO can be built in just a few steps on many Linux distros by employing Micr
4
4
5
5
### Base dependencies
6
6
7
-
We assume that you have some knowledge of development on Linux platforms and have git, gcc & cmake installed on your system.
7
+
We assume that you have some knowledge of development on Linux platforms and have git, gcc and cmake installed on your system. You also need Ninja, which xSTUDIO uses as its CMake generator on all platforms. Install it via your distro's package manager:
8
+
9
+
# Rocky / RHEL / Fedora
10
+
sudo dnf install ninja-build
11
+
12
+
# Ubuntu / Debian
13
+
sudo apt install ninja-build
8
14
9
15
### Download and install Qt 6.5.3 SDK
10
16
11
17
Follow [these instructions](downloading_qt.md) - ensuring that you download the SDK for Linux platforms (rather than the MacOS platform used as an example in the linked guide).
12
18
13
19
### Download the VCPKG repo
14
20
15
-
To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in the Powershell:
21
+
To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in a terminal:
@@ -27,74 +34,34 @@ Download from github in the usual manner. Enter the root folder of the repo and
27
34
28
35
### Tell CMake where Qt is installed
29
36
30
-
CMake needs to know where your Qt 6.5.3 SDK is installed. The simplest way is to set the `Qt6_DIR` environment variable in your shell, before launching the build comman. For example, if user Mary Jane downloaded Qt into her home folder:
Optionally, add this to your `~/.bashrc` (or `~/.zshrc`) so it's set in every new shell.
35
-
36
-
If you prefer not to use an environment variable, alternative options are:
37
-
38
-
-**Per-machine user preset**: create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example:
37
+
CMake needs to know where your Qt 6.5.3 SDK is installed. Create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example, if user Mary Jane downloaded Qt into her home folder:
See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference.
54
-
55
-
-**One-off command-line override**: pass `-DQt6_DIR=/path/to/Qt6` directly to the `cmake` command below.
52
+
See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference.
56
53
57
54
### Build xSTUDIO
58
55
59
56
First, we configure for building. Note that this cmake command ***may take several hours to complete*** the first time it is run, though subsequently it will take a few seconds. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing.
60
57
61
-
- If you are using an environment variable to specify the Qt installation run:
62
-
63
-
cmake -B build --preset LinuxRelease
64
-
65
-
- If you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run instead:
66
-
67
-
cmake -B build --preset LinuxReleaseLocal
68
-
69
-
- Or, to pass the Qt path as a one-off command-line override:
When this has finished, you can build xSTUDIO with this command (in this case, the --parallel flag is set for a machine with 16 cores as an example).
74
-
75
-
cmake --build build --parallel 16
76
-
77
-
### Faster builds with Ninja (optional)
78
-
79
-
To speed up the build, you can use Ninja instead of make. Ninja parallelises the build at the file level and is noticeably faster. Install it via your platform's package manager:
80
-
81
-
# Rocky / RHEL / Fedora
82
-
sudo dnf install ninja-build
83
-
84
-
# Ubuntu / Debian
85
-
sudo apt install ninja-build
86
-
87
-
# macOS (Homebrew)
88
-
brew install ninja
89
-
90
-
On Windows, Ninja is already bundled with Visual Studio's CMake tools, so no separate install is needed.
58
+
cmake -B build --preset LinuxNinjaReleaseLocal
91
59
92
-
Ninja-based presets are provided for Linux, macOS and Windows (Release, RelWithDebInfo and Debug variants for each). For example, to configure a Linux release build:
60
+
When this has finished, you can build xSTUDIO with:
93
61
94
-
cmake -B build --preset LinuxNinjaRelease
95
62
cmake --build build
96
63
97
-
Ninja handles parallelism automatically so there is no need for the `--parallel` flag. See [CMakePresets.json](../../../CMakePresets.json) for the full list of available presets.
64
+
RelWithDebInfo and Debug variants are also available — see [CMakePresets.json](../../../CMakePresets.json) for the full list.
98
65
99
66
### Running xSTUDIO in a dev environment
100
67
@@ -106,4 +73,4 @@ Run this from the xstudio repository root. The `python3.11` segment tracks which
106
73
107
74
### Installing xSTUDIO
108
75
109
-
Correct packaging and installation of xstudio and its dependencies across various Linux distros is a problem we are still working on! For now, it is up to individual developers to do an effective installation on their system. You can try running 'make install' from the 'build' folder. Use -DCMAKE_BUILD_PREFIX={path} to set a test installation location
76
+
Correct packaging and installation of xstudio and its dependencies across various Linux distros is a problem we are still working on! For now, it is up to individual developers to do an effective installation on their system. You can try running `cmake --install build`from the repository root. Use -DCMAKE_BUILD_PREFIX={path} to set a test installation location
We require 6 packages to be installed to proceed. Run these commands in a terminal:
15
+
We require these packages to be installed to proceed. xSTUDIO uses Ninja as its CMake generator on all platforms, so install it here as well. Run these commands in a terminal:
To build xSTUDIO we need a number of other open source software packages. We use the VCPKG package manager to do this. All that we need to do is download the repo and run the bootstrap script before we build xstudio. Run these commands in a terminal:
@@ -41,64 +43,33 @@ Download from github in the usual manner. Enter the root folder of the repo and
41
43
42
44
### Tell CMake where Qt is installed
43
45
44
-
CMake needs to know where your Qt 6.5.3 SDK is installed. The simplest way is to set the `Qt6_DIR` environment variable in your shell, pointing to a directory named 'Qt6' which is in a directory named 'cmake', which is in a directory named 'lib'. For example, on MacOS where user Mary Jane downloaded Qt into her home folder:
Add this to your `~/.zshrc` (or `~/.bash_profile`) so it's set in every new shell.
49
-
50
-
Alternative options if you prefer not to use an environment variable:
51
-
52
-
-**Per-machine user preset**: create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example:
46
+
CMake needs to know where your Qt 6.5.3 SDK is installed. Create a `CMakeUserPresets.json` file alongside `CMakePresets.json` in the repo root. This file is gitignored, so your local path won't be committed. The user preset should have a different name from the tracked preset it inherits from, and add `Qt6_DIR` to `cacheVariables`. For example, if user Mary Jane downloaded Qt into her home folder:
See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference.
68
-
69
-
-**One-off command-line override**: pass `-DQt6_DIR=/path/to/Qt6` directly to the `cmake` command below.
61
+
For an Intel Mac, inherit from `MacOSIntelNinjaRelease` instead. See the [CMake presets documentation](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html) for the full format reference.
70
62
71
63
### Build xSTUDIO
72
64
73
-
Run the appropriate command for your platform (whether you have an older Intel or a newer Apple Silicon machine) to set-up for building. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing.
74
-
75
-
**Apple Silicon (ARM) Machines:**
76
-
77
-
cmake -B build --preset MacOSRelease
78
-
79
-
**Intel Machines:**
80
-
81
-
cmake -B build --preset MacOSIntelRelease
65
+
Run the configure command. Note that this cmake command ***may take several hours to complete***. This is because xSTUDIO's dependencies (particularly ffmpeg) take a long time to download and build from the source code, which is what VCPKG is doing.
82
66
83
-
Or, if you are using a `CMakeUserPresets.json` file to point at your Qt installation (see the previous section), run the matching local preset instead, e.g.:
67
+
cmake -B build --preset MacOSNinjaReleaseLocal
84
68
85
-
cmake -B build --preset MacOSReleaseLocal
69
+
When this has finished, you can build xSTUDIO with:
86
70
87
-
When this has finished, you can build xSTUDIO with this command.
RelWithDebInfo and Debug variants are also available — see [CMakePresets.json](../../../CMakePresets.json) for the full list.
90
74
91
75
If the build is successful, you should have an application bundle in the 'build' folder called 'xSTUDIO.app'. This can be drag & dropped into your applications folder, desktop and dock as for any other application.
92
-
93
-
### Faster builds with Ninja (optional)
94
-
95
-
To speed up the build, you can use Ninja instead of make. Ninja parallelises the build at the file level and is noticeably faster. Install it via Homebrew:
96
-
97
-
brew install ninja
98
-
99
-
Ninja-based presets are provided for macOS (Release, RelWithDebInfo and Debug variants). For example, to configure a macOS release build:
100
-
101
-
cmake -B build --preset MacOSNinjaRelease
102
-
cmake --build build --target install
103
-
104
-
Ninja handles parallelism automatically so there is no need for the `--parallel` flag. See [CMakePresets.json](../../../CMakePresets.json) for the full list of available presets.
0 commit comments