Skip to content

Instantly share code, notes, and snippets.

@movalex
Last active September 20, 2024 22:25
Show Gist options
  • Save movalex/311954ef5a7ee2e6ede0adb0bb7128c1 to your computer and use it in GitHub Desktop.
Save movalex/311954ef5a7ee2e6ede0adb0bb7128c1 to your computer and use it in GitHub Desktop.
Install qbittorrent-nox on macos 12+

Requirements

  • zlib >= 1.2.11
  • Qt 6.5.0
    • Despite building headless application, the QT library should be installed
  • CMake >= 3.16
  • Boost >= 1.76
  • libtorrent-rasterbar 1.2.19
  • Python >= 3.7.0

Installation

  1. Install dependencies

brew install python3 qt zlib boost libtorrent-rasterbar cmake

  1. Run setup for building headless (webUI only) application.

cmake -B build -DCMAKE_BUILD_TYPE=Release -DGUI=OFF

If you want to install 4.6 version insttead of 5.0 alpha, the QT6 option should be provided

cmake -B build -DCMAKE_BUILD_TYPE=Release -DGUI=OFF -DQT6=ON

  1. Build
cmake --build build
  1. Install, optionally provide installation (prefix) path.
cmake --install build --prefix $HOME/bin
  1. Create a symlink to the executable:
cd $HOME/bin/qbittorrent-nox.app/Contents/MacOS/
ln -s $PWD/qbittorrent-nox /usr/local/bin/qbittorrent-nox
  1. Create autostart plist:
cd ~/Library/LaunchAgents/
vim com.qbittorrent-nox.plist

add plist conntents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>com.qbittorrent-nox</string>
        <key>LimitLoadToSessionType</key>
        <array>
                <string>Aqua</string>
                <string>Background</string>
                <string>LoginWindow</string>
                <string>StandardIO</string>
                <string>System</string>
        </array>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/bin/qbittorrent-nox</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
</dict>
</plist>
  1. Start the autostart:
launchctl bootstrap gui/501 $HOME/Library/LaunchAgents/com.qbittorrent-nox.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment