## Building ### Tools * Qt * gcc on linux, msvc on windows * qbs ### Configuration * Set up Qbs ``` qbs setup-toolchains --detect qbs setup-qt /usr/bin/qmake-qt5 qt5 ``` For more information on qbs, refer to the [Qbs manual][1], sections Configuring and Managing Qt versions. ### Steps * Create a build folder ``` [smolbote repo]$ mkdir build ``` * Run qbs ``` [smolbote repo]$ qbs build --build-directory build profile:qt5 release ``` Shortened: ``` [smolbote repo]$ qbs build -d build profile:qt5 release ``` This installs the files to build/release/install-root. * Test run using the specified Qt profile (optional) ``` [smolbote repo]$ qbs run --build-directory build --file src/smolbote.qbs --products poi profile:qt5 release ``` Shortened: ``` [smolbote repo]$ qbs run -d build -f src/smolbote.qbs -p poi profile:qt5 release ``` ### Notes * Windows: MSVC compiler is required because of QtWebEngine dependency * Windows: Passing the -v or -h parameters creates a dialog box instead of writing the output to stdout. This is Qt behaviour. * grsecurity: You may need to exception qbs. ## Packaging ### Tarball Creating a tarball: ``` tar -I "lzip -9" -cf build.tar.lz release-folder/* ``` Signing a tarball: ``` gpg -u $FINGERPRINT -b $FILENAME ``` -u, --local-user name > Use name as the user ID to sign. This option is silently ignored for the list commands, so that it can be used in an options file. -b, --detach-sign > Make a detached signature. Creating checksum: ``` sha512sum --binary build.tar.lz > checksum.sha512 ``` Verifying checksum: ``` sha512sum --check checksum.sha512 ``` ### Windows Collect the required libraries using ``` QT_DIR\QT_VER\msvc2015_64\windeployqt.exe build-PROFILE\release\qtbrowser.exe ``` [1]: https://doc.qt.io/qbs/index.html