Build Help
Once the script has successfully configured the platform you can execute the help switch to see how it works and what options you have available to you.
./qbt.bash -h
Order of preference
Section titled “Order of preference”The script will use the following order of preference when configuring the build environment:
- Command line flags provided to the script
.qbt_env
file in the same directory as the script- Exported
env
variables, these will overridden by.qbt_env
ENV settings
Section titled “ENV settings”The script has some env
settings that can trigger certain behavior without the need to pass flags to the script.
Build variable | Default if unset | Options | example usage |
---|---|---|---|
qbt_zlib_type | zlib | zlib zlib-ng | qbt_zlib_type="zlib" |
qbt_skip_icu | yes | yes no | qbt_skip_icu="yes" |
qbt_boost_tag | boost-1.89.0 | Any valid git tag | qbt_boost_tag="boost-1.89.0" |
qbt_libtorrent_version | 2.0 | 1.2 2.0 | qbt_libtorrent_version="2.0" |
qbt_libtorrent_tag | v2.0.11 | Any valid git tag | qbt_libtorrent_tag="v2.0.11" |
qbt_libtorrent_master_jamfile | no | yes no | qbt_libtorrent_master_jamfile="no" |
qbt_qt_version | 6 | 5.12 5.15 6.3 6.3.1 | qbt_qt_version="6" |
qbt_qt_tag | v6.9.1 | Any valid git tag | qbt_qt_tag="v6.9.1" |
qbt_qbittorrent_tag | release-5.1.2 | Any valid git tag | qbt_qbittorrent_tag="release-5.1.2" |
qbt_build_dir | qbt-build | qbt-build | qbt_build_dir="~/custom" |
qbt_build_tool | cmake | cmake qmake | qbt_build_tool="cmake" |
qbt_cross_name | default (default to OS gcc) | See Cross arch options below | qbt_cross_name="aarch64" |
qbt_mcm_url | userdocs/qbt-musl-cross-make | n/a for general use | qbt_mcm_url="userdocs/qbt-musl-cross-make" |
qbt_patches_url | userdocs/qbittorrent-nox-static | n/a for general use | qbt_patches_url="userdocs/qbittorrent-nox-static" |
qbt_workflow_files | no | yes no | qbt_workflow_files="no" |
qbt_cache_dir | empty = unset | relative folder name or full path path | qbt_cache_dir="cache" |
qbt_optimise_strip | yes | yes no | qbt_optimise_strip="yes" |
qbt_build_debug | no | yes no | qbt_build_debug="no" |
qbt_standard | 20 | 14 17 20 23 | qbt_standard="20" |
qbt_static_ish | no | yes no | qbt_static_ish="no" |
qbt_optimise | no | yes no | qbt_optimise="yes" |
qbt_with_qemu | yes | yes no | qbt_with_qemu="yes" |
qbt_host_deps | yes | yes no | qbt_host_deps="no" |
qbt_host_deps_repo | userdocs/qbt-host-deps | n/a for general use | qbt_host_deps_repo=userdocs/qbt-host-deps |
qbt_legacy_mode | yes | yes no | qbt_legacy_mode="no" |
qbt_advanced_view | yes | yes no | qbt_advanced_view="no" |
Build flags
Section titled “Build flags”The script build is already optimised but if you really want to experiment you can use the following flags in the host env
or .qbt_env
and they will be appended to the current build flags:
export CFLAGS=""export CPPFLAGS=""export CXXFLAGS=""export LDFLAGS=""
See the _custom_flags
function in the script for more information.
Cross arch options
armel
armhf
armv7
aarch64
x86
x86_64
s390x
powerpc
ppc64el
mips
mipsel
mips64
mips64el
loongarch64
riscv64
Switches and flags summarised
Section titled “Switches and flags summarised”All switches and flags have a supporting help option that will provide dynamic content where applicable.
For example, taking the -h-bs
switch as an example, it will show different results based on the preceding switches provided:
Here is the help description for this flag:
Creates dirs in this structure: ~/qbt-build/patches/APPNAME/TAG/patch
Add your patches there, for example.
~/qbt-build/patches/libtorrent/1.2.18/patch
~/qbt-build/patches/qbittorrent/4.5.0/patch
Here is the help description for this flag:
Creates dirs in this structure: ~/qbt-build/patches/APPNAME/TAG/patch
Add your patches there, for example.
~/qbt-build/patches/libtorrent/RC_1_2/patch
~/qbt-build/patches/qbittorrent/master/patch
Here is the help description for this flag:
Creates dirs in this structure: ~/qbt-build/patches/APPNAME/TAG/patch
Add your patches there, for example.
~/qbt-build/patches/libtorrent/2.0.3/patch
~/qbt-build/patches/qbittorrent/4.2.5/patch
Build - default profile
Section titled “Build - default profile”Install all default modules (ICU is skipped) and build qbittorrent-nox
to the default build directory qbt-build/completed
.
./qbt.bash all
Build - modules (optional and mostly for debugging and testing)
Section titled “Build - modules (optional and mostly for debugging and testing)”You can build modules individually, subject to this warning.
./qbt.bash module
Here are the list of supported modules:
glibc (Debian based only)zlib (default)iconv (default libtorrent v1.2 only)icu (optional)openssl (default)boost (default)qtbase (default)qttools (default)libtorrent (default)qbittorrent (default)
Build - paths
Section titled “Build - paths”By default the script will built to a hard coded path defined by the scripts $install_dir
variable as to avoid installing files to a server and causing conflicts.
qbt-build
You can modify this dynamically with the -b
argument
./qbt.bash all -b "/opt"