From 02f2545a3ee184d64aee43a6acd69b3e1b55f26b Mon Sep 17 00:00:00 2001 From: parhelia512 <0011d3@gmail.com> Date: Thu, 14 Aug 2025 22:12:56 +0800 Subject: [PATCH] fix build --- .github/workflows/build.yml | 10 +--------- script/deploy_linux64.sh | 5 ----- script/deploy_macos.sh | 8 ++------ script/deploy_windows.sh | 5 ----- src/ui/mainwindow.cpp | 5 +++-- src/ui/setting/dialog_manage_routes.cpp | 2 +- 6 files changed, 7 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71750a0..8a3240a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,9 +15,6 @@ jobs: strategy: matrix: include: - - cross_os: public_res - cross_arch: public_res - go_version: "1.25.0" - cross_os: windows cross_arch: amd64 go_version: "1.25.0" @@ -64,14 +61,12 @@ jobs: curl -L -o go.7z https://github.com/throneproj/env_windows_legacy/releases/download/latest/go.7z 7z x go.7z - name: Install Protoc - if: matrix.cross_os != 'public_res' run: | curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-linux-x86_64.zip" unzip "protoc-31.1-linux-x86_64.zip" -d protoc_install cp ./protoc_install/bin/protoc /usr/local/bin protoc --version - name: Installing protoc-gen-go - if: matrix.cross_os != 'public_res' run: | go install github.com/golang/protobuf/protoc-gen-go@latest go install github.com/chai2010/protorpc/protoc-gen-protorpc@latest @@ -79,9 +74,7 @@ jobs: if: steps.cache-common.outputs.cache-hit != 'true' shell: bash run: | - [ ${{ matrix.cross_os }} == public_res ] || GOOS=${{ matrix.cross_os }} GOARCH=${{ matrix.cross_arch }} ./script/build_go.sh - [ ${{ matrix.cross_os }} == public_res ] || exit 0 - ./script/build_public_res.sh + GOOS=${{ matrix.cross_os }} GOARCH=${{ matrix.cross_arch }} ./script/build_go.sh - name: Tar files if: steps.cache-common.outputs.cache-hit != 'true' run: tar czvf artifacts.tgz ./deployment @@ -296,7 +289,6 @@ jobs: rm -rf windowslegacy64 rm -rf macos-amd64 rm -rf macos-arm64 - rm -rf public_res rm -rf *.pdb - name: Uploading Artifact uses: actions/upload-artifact@v4.6.2 diff --git a/script/deploy_linux64.sh b/script/deploy_linux64.sh index b937b1d..3256fa0 100755 --- a/script/deploy_linux64.sh +++ b/script/deploy_linux64.sh @@ -23,13 +23,8 @@ cp ./res/public/Throne.png $DEST cd download-artifact cd *linux-$ARCH tar xvzf artifacts.tgz -C ../../ -cd .. -cd *public_res -tar xvzf artifacts.tgz -C ../../ cd ../.. -mv $DEPLOYMENT/public_res/* $DEST - sudo add-apt-repository universe sudo apt install libfuse2 sudo apt install patchelf diff --git a/script/deploy_macos.sh b/script/deploy_macos.sh index a086f36..03805dc 100755 --- a/script/deploy_macos.sh +++ b/script/deploy_macos.sh @@ -12,16 +12,12 @@ DEST=$DEPLOYMENT/macos-$ARCH rm -rf $DEST mkdir -p $DEST -#### copy golang & public_res => .app #### +#### copy golang => .app #### cd download-artifact cd *darwin-$ARCH tar xvzf artifacts.tgz -C ../../ -cd .. -cd *public_res -tar xvzf artifacts.tgz -C ../../ cd ../.. -mv deployment/public_res/* deployment/macos-$ARCH mv deployment/macos-$ARCH/* $BUILD/Throne.app/Contents/MacOS #### deploy qt & DLL runtime => .app #### @@ -31,4 +27,4 @@ popd codesign --force --deep --sign - $BUILD/Throne.app -mv $BUILD/Throne.app $DEST \ No newline at end of file +mv $BUILD/Throne.app $DEST diff --git a/script/deploy_windows.sh b/script/deploy_windows.sh index 7533954..554cb41 100755 --- a/script/deploy_windows.sh +++ b/script/deploy_windows.sh @@ -34,9 +34,4 @@ cp $BUILD/Throne.exe $DEST cd download-artifact cd *$ARCH tar xvzf artifacts.tgz -C ../../ -cd .. -cd *public_res -tar xvzf artifacts.tgz -C ../../ cd ../.. - -mv $DEPLOYMENT/public_res/* $DEST diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 114ca0e..05c79f1 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -141,7 +141,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi QStringList args; args.push_back("-port"); args.push_back(Int2String(Configs::dataStore->core_port)); - if (Configs::dataStore->log_level == "debug") args.push_back("-debug"); + if (Configs::dataStore->flag_debug) args.push_back("-debug"); // Start core runOnThread( @@ -420,7 +420,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi auto getRuleSet = [=,this] { QString err; - for(int retry = 0; retry < 3; retry++) { + for(int retry = 0; retry < 5; retry++) { auto resp = NetworkRequestHelper::HttpGet("https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/list"); if (resp.error.isEmpty()) { std::vector respvec; @@ -431,6 +431,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi } else err = resp.error; + QThread::sleep(1); } MW_show_log(QObject::tr("Requesting rule-set error: %1").arg(err)); }; diff --git a/src/ui/setting/dialog_manage_routes.cpp b/src/ui/setting/dialog_manage_routes.cpp index fea2574..c7b615d 100644 --- a/src/ui/setting/dialog_manage_routes.cpp +++ b/src/ui/setting/dialog_manage_routes.cpp @@ -276,7 +276,7 @@ void DialogManageRoutes::on_edit_route_clicked() { auto idx = ui->route_profiles->currentRow(); if (idx < 0) return; - routeChainWidget = new RouteItem(this, chainList[idx]); + routeChainWidget = new RouteItem(this, chainList[idx], ruleSetMap); routeChainWidget->setWindowModality(Qt::ApplicationModal); routeChainWidget->show(); connect(routeChainWidget, &RouteItem::settingsChanged, this, [=,this](const std::shared_ptr& chain) {