fix build

This commit is contained in:
parhelia512 2025-08-14 22:12:56 +08:00
parent 003ffc8566
commit 02f2545a3e
6 changed files with 7 additions and 28 deletions

View File

@ -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

View File

@ -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

View File

@ -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 ####

View File

@ -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

View File

@ -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<uint8_t> 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));
};

View File

@ -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<Configs::RoutingChain>& chain) {