This commit is contained in:
c0re100 2022-12-03 03:22:33 +08:00
commit 5455d14144
No known key found for this signature in database
GPG Key ID: 7C3B3004FE745AAF
5 changed files with 35 additions and 66 deletions

View File

@ -45,7 +45,7 @@ jobs:
# cross compile for some other platforms, like arm, mips, etc.
cross-compile:
runs-on: ubuntu-latest
container: "ubuntu:20.04"
container: "abcfy2/muslcc-toolchain-ubuntu:${{ matrix.cross_host }}"
strategy:
fail-fast: false
matrix:

View File

@ -197,7 +197,6 @@ rm -fr CMakeCache.txt CMakeFiles
-feature-optimize_full \
-nomake examples \
-nomake tests
cat config.summary
cmake --build . --parallel
cmake --install .
export QT_BASE_DIR="$(ls -rd /usr/local/Qt-* | head -1)"
@ -227,17 +226,17 @@ cmake --install .
# Remove qt-wayland until next release: https://bugreports.qt.io/browse/QTBUG-104318
# qt-wayland
# if [ ! -f "/usr/src/qtwayland-${qt_ver}/.unpack_ok" ]; then
# qtwayland_url="https://download.qt.io/official_releases/qt/${qt_major_ver}/${qt_ver}/submodules/qtwayland-everywhere-src-${qt_ver}.tar.xz"
# retry curl -kSL --compressed "${qtwayland_url}" \| tar Jxf - -C "/usr/src/qtwayland-${qt_ver}" --strip-components 1
# touch "/usr/src/qtwayland-${qt_ver}/.unpack_ok"
# fi
# cd "/usr/src/qtwayland-${qt_ver}"
# rm -fr CMakeCache.txt
# "${QT_BASE_DIR}/bin/qt-configure-module" .
# cat config.summary
# cmake --build . --parallel
# cmake --install .
if [ ! -f "/usr/src/qtwayland-${qt_ver}/.unpack_ok" ]; then
qtwayland_url="https://download.qt.io/official_releases/qt/${qt_major_ver}/${qt_ver}/submodules/qtwayland-everywhere-src-${qt_ver}.tar.xz"
retry curl -kSL --compressed "${qtwayland_url}" \| tar Jxf - -C "/usr/src/qtwayland-${qt_ver}" --strip-components 1
touch "/usr/src/qtwayland-${qt_ver}/.unpack_ok"
fi
cd "/usr/src/qtwayland-${qt_ver}"
rm -fr CMakeCache.txt
"${QT_BASE_DIR}/bin/qt-configure-module" .
cat config.summary
cmake --build . --parallel
cmake --install .
# install qt6gtk2 for better look
if [ ! -d "/usr/src/qt6gtk2/" ]; then
@ -372,10 +371,10 @@ extra_plugins=(
sqldrivers
styles
tls
# wayland-decoration-client
# wayland-graphics-integration-client
# wayland-graphics-integration-server
# wayland-shell-integration
wayland-decoration-client
wayland-graphics-integration-client
wayland-graphics-integration-server
wayland-shell-integration
xcbglintegrations
)
exclude_libs=(

View File

@ -1,11 +1,11 @@
#!/bin/bash -e
# This scrip is for static cross compiling
# Please run this scrip in docker image: ubuntu:20.04
# E.g: docker run --rm -v `git rev-parse --show-toplevel`:/build ubuntu:20.04 /build/.github/workflows/cross_build.sh
# Please run this scrip in docker image: abcfy2/muslcc-toolchain-ubuntu:${CROSS_HOST}
# E.g: docker run --rm -v `git rev-parse --show-toplevel`:/build abcfy2/muslcc-toolchain-ubuntu:arm-linux-musleabi /build/.github/workflows/cross_build.sh
# If you need keep store build cache in docker volume, just like:
# $ docker volume create qbee-nox-cache
# $ docker run --rm -v `git rev-parse --show-toplevel`:/build -v qbee-nox-cache:/var/cache/apt -v qbee-nox-cache:/usr/src ubuntu:20.04 /build/.github/workflows/cross_build.sh
# $ docker run --rm -v `git rev-parse --show-toplevel`:/build -v qbee-nox-cache:/var/cache/apt -v qbee-nox-cache:/usr/src abcfy2/muslcc-toolchain-ubuntu:arm-linux-musleabi /build/.github/workflows/cross_build.sh
# Artifacts will copy to the same directory.
set -o pipefail
@ -49,8 +49,6 @@ apt install -y \
python3-lxml \
python3-pip
# value from: https://musl.cc/ (without -cross or -native)
export CROSS_HOST="${CROSS_HOST:-arm-linux-musleabi}"
# use zlib-ng instead of zlib by default
USE_ZLIB_NG=${USE_ZLIB_NG:-1}
@ -83,9 +81,6 @@ i686-*-mingw*)
;;
esac
export QT_VER_PREFIX="6"
export LIBTORRENT_BRANCH="RC_2_0"
export CROSS_ROOT="${CROSS_ROOT:-/cross_root}"
# strip all compiled files by default
export CFLAGS='-s'
export CXXFLAGS='-s'
@ -106,12 +101,10 @@ case "${TARGET_HOST}" in
;;
esac
export PATH="${CROSS_ROOT}/bin:${PATH}"
export CROSS_PREFIX="${CROSS_ROOT}/${CROSS_HOST}"
export PKG_CONFIG_PATH="${CROSS_PREFIX}/opt/qt/lib/pkgconfig:${CROSS_PREFIX}/lib/pkgconfig:${CROSS_PREFIX}/share/pkgconfig:${PKG_CONFIG_PATH}"
SELF_DIR="$(dirname "$(readlink -f "${0}")")"
mkdir -p "${CROSS_ROOT}" "/usr/src"
mkdir -p "/usr/src"
retry() {
# max retry 5 times
@ -171,41 +164,6 @@ prepare_ninja() {
echo "Ninja version $(ninja --version)"
}
prepare_toolchain() {
if [ -f "/usr/src/${CROSS_HOST}-cross.tgz" ]; then
cd /usr/src/
cached_file_ts="$(stat -c '%Y' "/usr/src/${CROSS_HOST}-cross.tgz")"
current_ts="$(date +%s)"
if [ "$((${current_ts} - "${cached_file_ts}"))" -gt 2592000 ]; then
SHA512SUMS="$(retry curl -ksSL --compressed https://musl.cc/SHA512SUMS)"
if echo "${SHA512SUMS}" | grep "${CROSS_HOST}-cross.tgz" | head -1 | sha512sum -c; then
touch "/usr/src/${CROSS_HOST}-cross.tgz"
else
rm -f "/usr/src/${CROSS_HOST}-cross.tgz"
fi
fi
fi
if [ ! -f "/usr/src/${CROSS_HOST}-cross.tgz" ]; then
retry curl -kLC- -o "/usr/src/${CROSS_HOST}-cross.tgz" "https://musl.cc/${CROSS_HOST}-cross.tgz"
fi
tar -zxf "/usr/src/${CROSS_HOST}-cross.tgz" --transform='s|^\./||S' --strip-components=1 -C "${CROSS_ROOT}"
# mingw does not contains posix thread support: https://github.com/meganz/mingw-std-threads
# libtorrent need this feature, see issue: https://github.com/arvidn/libtorrent/issues/5330
if [ x"${TARGET_HOST}" = xWindows ]; then
if [ ! -d "/usr/src/mingw-std-threads" ]; then
mingw_std_threads_git_url="https://github.com/meganz/mingw-std-threads.git"
if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
mingw_std_threads_git_url="https://ghproxy.com/${mingw_std_threads_git_url}"
fi
git clone --depth 1 "${mingw_std_threads_git_url}" "/usr/src/mingw-std-threads"
fi
cd "/usr/src/mingw-std-threads"
git pull
cp -fv /usr/src/mingw-std-threads/*.h "${CROSS_PREFIX}/include"
fi
}
prepare_zlib() {
if [ x"${USE_ZLIB_NG}" = x"1" ]; then
zlib_ng_latest_tag="$(retry curl -ksSL --compressed https://api.github.com/repos/zlib-ng/zlib-ng/releases \| jq -r "'.[0].tag_name'")"
@ -338,7 +296,6 @@ prepare_qt() {
-DCMAKE_C_COMPILER="${CROSS_HOST}-gcc" \
-DCMAKE_SYSROOT="${CROSS_PREFIX}" \
-DCMAKE_CXX_COMPILER="${CROSS_HOST}-g++"
cat config.summary
cmake --build . --parallel
cmake --install .
export QT_BASE_DIR="${CROSS_PREFIX}/opt/qt"
@ -430,7 +387,6 @@ build_qbittorrent() {
prepare_cmake
prepare_ninja
prepare_toolchain
prepare_zlib
prepare_ssl
prepare_boost

View File

@ -6,8 +6,16 @@ jobs:
publish:
runs-on: windows-latest # action can only be run on windows
steps:
- uses: vedantmgoyal2009/winget-releaser@latest
- name: Get version
id: get-version
run: |
# Finding the version from release name
$VERSION = "${{ github.event.release.tag_name }}".TrimStart('release-')
echo "::set-output name=version::$VERSION"
shell: pwsh
- uses: vedantmgoyal2009/winget-releaser@v1
with:
identifier: c0re100.qBittorrent-Enhanced-Edition
version: ${{ steps.get-version.outputs.version }}
installers-regex: 'qbittorrent_enhanced_[0-9.]+(_x64)?_setup.exe$'
token: ${{ secrets.WINGET_TOKEN }}

View File

@ -77,6 +77,12 @@ brew install c0re100-qbittorrent
#### Windows
Windows 10 & 11 (Maintainer: [c0re100](https://github.com/c0re100))
```
winget install c0re100.qBittorrent-Enhanced-Edition
```
Chocolatey (Maintainer: [iYato](https://github.com/iYato))
```