Skip to content
qbittorrent-nox-static

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

The script will use the following order of preference when configuring the build environment:

  1. Command line flags provided to the script
  2. .qbt_env file in the same directory as the script
  3. Exported env variables, these will be overridden by .qbt_env

The script has some env settings that can trigger certain behavior without the need to pass flags to the script.

Build variableDefault if unsetOptionsexample usage
qbt_zlib_typezlibzlib zlib-ngqbt_zlib_type="zlib"
qbt_skip_icuyesyes noqbt_skip_icu="yes"
qbt_boost_tagboost-1.92.0Any valid git tagqbt_boost_tag="boost-1.92.0"
qbt_libtorrent_version2.01.2 2.0qbt_libtorrent_version="2.0"
qbt_libtorrent_tagv2.0.14Any valid git tagqbt_libtorrent_tag="v2.0.14"
qbt_libtorrent_master_jamfilenoyes noqbt_libtorrent_master_jamfile="no"
qbt_qt_version65.12 5.15 6.3 6.3.1qbt_qt_version="6"
qbt_qt_tagv6.11.2Any valid git tagqbt_qt_tag="v6.11.2"
qbt_openssl_tagopenssl-4.0.2Any valid git tagqbt_openssl_tag="openssl-4.0.2"
qbt_qbittorrent_tagrelease-5.2.3Any valid git tagqbt_qbittorrent_tag="release-5.2.3"
qbt_build_dirqbt-buildqbt-buildqbt_build_dir="~/custom"
qbt_build_toolcmakecmake qmakeqbt_build_tool="cmake"
qbt_cross_namedefault (default to OS gcc)See Cross arch options belowqbt_cross_name="aarch64"
qbt_mcm_urluserdocs/qbt-musl-cross-makeuserdocs/qbt-musl-cross-make userdocs/musl-cross-makeqbt_mcm_url="userdocs/qbt-musl-cross-make"
qbt_patches_urluserdocs/qbittorrent-nox-staticn/a for general useqbt_patches_url="userdocs/qbittorrent-nox-static"
qbt_workflow_filesnoyes noqbt_workflow_files="no"
qbt_cache_dirempty = unsetrelative folder name or full path pathqbt_cache_dir="cache"
qbt_optimise_stripyesyes noqbt_optimise_strip="yes"
qbt_build_debugnoyes noqbt_build_debug="no"
qbt_standard2014 17 20 23qbt_standard="20"
qbt_static_ishnoyes noqbt_static_ish="no"
qbt_optimisenoyes noqbt_optimise="yes"
qbt_use_ltonoyes noqbt_use_lto="yes"
qbt_with_qemuyesyes noqbt_with_qemu="yes"
qbt_host_depsnoyes noqbt_host_deps="no"
qbt_host_deps_repouserdocs/qbt-host-depsn/a for general useqbt_host_deps_repo=userdocs/qbt-host-deps
qbt_legacy_modenoyes noqbt_legacy_mode="yes"
qbt_advanced_viewyesyes noqbt_advanced_view="no"

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

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

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)

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"