diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 005ae12..eb9dc47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,9 @@ jobs: - cross_os: linux cross_arch: amd64 go_version: "1.24.4" + - cross_os: linux + cross_arch: arm64 + go_version: "1.24.4" - cross_os: darwin cross_arch: amd64 go_version: "1.24.4" @@ -82,6 +85,9 @@ jobs: - platform: ubuntu-22.04 qt_version: "6.9.1" target: amd64 + - platform: ubuntu-24.04-arm + qt_version: "6.9.1" + target: arm64 - platform: macos-latest qt_version: "6.9.1" target: x86_64 @@ -100,9 +106,6 @@ jobs: - name: Install mingw if: matrix.platform == 'windows-latest' uses: bwoodsend/setup-winlibs-action@v1.15 - - name: Install ninja-build tool - uses: seanmiddleditch/gha-setup-ninja@v6 - - name: Download Artifacts uses: actions/download-artifact@v4.3.0 with: @@ -142,14 +145,11 @@ jobs: - name: Windows - Generate MakeFile and Build shell: bash if: matrix.platform == 'windows-latest' - env: - CC: gcc.exe - CXX: g++.exe run: | export CMAKE_PREFIX_PATH=$PWD/qt6/build/lib/cmake mkdir build cd build - cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_CXX_FLAGS="-static -DNDEBUG -s" .. + cmake -GNinja -DCMAKE_CXX_FLAGS="-static -DNDEBUG -s" .. ninja -j2 cd .. ./script/deploy_windows64.sh @@ -162,12 +162,12 @@ jobs: cp NekoraySetup.exe deployment/ - name: Linux - Generate MakeFile and Build shell: bash - if: matrix.platform == 'ubuntu-22.04' + if: contains( matrix.platform, 'ubuntu' ) run: | sudo apt update && sudo apt upgrade -y mkdir build cd build - cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release .. + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" .. ninja cd .. ./script/deploy_linux64.sh @@ -177,7 +177,7 @@ jobs: run: | mkdir build cd build - cmake -GNinja -DQT_VERSION_MAJOR=6 -DCMAKE_BUILD_TYPE=Release -DNKR_PACKAGE_MACOS=1 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=${{ matrix.target }} .. + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DNKR_PACKAGE_MACOS=1 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_ARCHITECTURES=${{ matrix.target }} .. ninja cd .. ./script/deploy_macos.sh ${{ matrix.target }} @@ -219,8 +219,12 @@ jobs: mv nekoray.deb $version_standalone-debian-x64.deb rm -rf nekoray #### - mv linux64 nekoray - zip -9 -r $version_standalone-linux64.zip nekoray + mv linux-amd64 nekoray + zip -9 -r $version_standalone-linux-amd64.zip nekoray + rm -rf nekoray + #### + mv linux-arm64 nekoray + zip -9 -r $version_standalone-linux-arm64.zip nekoray rm -rf nekoray #### mv NekoraySetup.exe $version_standalone-windows64-installer.exe @@ -244,7 +248,7 @@ jobs: cd deployment rm -rf windows-arm64 rm -rf linux-arm64 - rm -rf linux64 + rm -rf linux-amd64 rm -rf windows64 rm -rf macos-amd64 rm -rf macos-arm64 diff --git a/script/build_go.sh b/script/build_go.sh index 38c5b0d..4d51e97 100755 --- a/script/build_go.sh +++ b/script/build_go.sh @@ -4,7 +4,7 @@ set -e source script/env_deploy.sh [ "$GOOS" == "windows" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/windows64 || true [ "$GOOS" == "windows" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/windows-arm64 || true -[ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux64 || true +[ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux-amd64 || true [ "$GOOS" == "linux" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/linux-arm64 || true [ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/macos-amd64 || true [ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/macos-arm64 || true diff --git a/script/deploy_linux64.sh b/script/deploy_linux64.sh index 7dc058f..31af513 100755 --- a/script/deploy_linux64.sh +++ b/script/deploy_linux64.sh @@ -3,12 +3,14 @@ set -e if [[ $(uname -m) == 'aarch64' || $(uname -m) == 'arm64' ]]; then ARCH="arm64" + ARCH1="aarch64" else ARCH="amd64" + ARCH1="x86_64" fi source script/env_deploy.sh -DEST=$DEPLOYMENT/linux64 +DEST=$DEPLOYMENT/linux-$ARCH rm -rf $DEST mkdir -p $DEST @@ -28,14 +30,14 @@ mv $DEPLOYMENT/public_res/* $DEST sudo add-apt-repository universe sudo apt install libfuse2 sudo apt install patchelf -wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage -wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1/linuxdeploy-plugin-qt-x86_64.AppImage -chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage +wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20250213-2/linuxdeploy-$ARCH1.AppImage +wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-$ARCH1.AppImage +chmod +x linuxdeploy-$ARCH1.AppImage linuxdeploy-plugin-qt-$ARCH1.AppImage export EXTRA_QT_PLUGINS="iconengines;wayland-shell-integration;wayland-decoration-client;" export EXTRA_PLATFORM_PLUGINS="libqwayland-generic.so;" -./linuxdeploy-x86_64.AppImage --appdir $DEST --executable $DEST/nekoray --plugin qt -rm linuxdeploy-x86_64.AppImage linuxdeploy-plugin-qt-x86_64.AppImage +./linuxdeploy-$ARCH1.AppImage --appdir $DEST --executable $DEST/nekoray --plugin qt +rm linuxdeploy-$ARCH1.AppImage linuxdeploy-plugin-qt-$ARCH1.AppImage cd $DEST rm -r ./usr/translations ./usr/bin ./usr/share ./apprun-hooks diff --git a/script/pack_debian.sh b/script/pack_debian.sh index 101f348..ce7a979 100755 --- a/script/pack_debian.sh +++ b/script/pack_debian.sh @@ -5,8 +5,8 @@ version="$1" mkdir -p nekoray/DEBIAN mkdir -p nekoray/opt -cp -r linux64 nekoray/opt -mv nekoray/opt/linux64 nekoray/opt/nekoray +cp -r linux-amd64 nekoray/opt +mv nekoray/opt/linux-amd64 nekoray/opt/nekoray # basic cat >nekoray/DEBIAN/control <<-EOF @@ -37,4 +37,4 @@ sudo chmod 0755 nekoray/DEBIAN/postinst # desktop && PATH -sudo dpkg-deb --build nekoray \ No newline at end of file +sudo dpkg-deb --build nekoray diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 9308aca..d27a31d 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -2267,8 +2267,12 @@ void MainWindow::CheckUpdate() { search = "windows32"; # endif #endif -#if defined(Q_OS_LINUX) && defined(Q_PROCESSOR_X86_64) - search = "linux64"; +#ifdef Q_OS_LINUX +# ifdef Q_PROCESSOR_X86_64 + search = "linux-amd64"; +# else + search = "linux-arm64"; +# endif #endif #ifdef Q_OS_MACOS # ifdef Q_PROCESSOR_X86_64