Skip to content

Commit db3bd1a

Browse files
committed
remove UPX action, let's do it manually so bundlers get it
1 parent 85e26c1 commit db3bd1a

File tree

7 files changed

+20
-10
lines changed

7 files changed

+20
-10
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ jobs:
3131
env:
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333

34-
- name: Run UPX against portable version
35-
uses: crazy-max/ghaction-upx@v3
36-
with:
37-
version: latest
38-
files: |
39-
./src-tauri/target/release/omp-launcher.exe
40-
args: -9 -fq
41-
4234
- name: Generate artifact name
4335
id: vars
4436
shell: bash

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
"typescript": "^5.3.3",
4242
"vite": "^5.0.12"
4343
}
44-
}
44+
}

src-tauri/tauri.conf.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"build": {
33
"beforeDevCommand": "yarn dev",
44
"beforeBuildCommand": "yarn build",
5+
"beforeBundleCommand": "node src-tauri/upx/upx.js",
56
"devPath": "http://localhost:1420",
67
"distDir": "../dist",
78
"withGlobalTauri": false

src-tauri/upx/linux

549 KB
Binary file not shown.

src-tauri/upx/upx.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { exec } from "child_process";
2+
3+
let cmd = "--best --brute ./src-tauri/target/release/omp-launcher";
4+
if (process.platform === "win32") {
5+
cmd += ".exe";
6+
cmd = "\"./src-tauri/upx/win.exe\" " + cmd;
7+
} else {
8+
cmd = "src-tauri/upx/linux " + cmd;
9+
}
10+
11+
exec(cmd, (err, stdout, stderr) => {
12+
if (err) {
13+
console.error(err);
14+
return;
15+
}
16+
console.log(`stdout: ${stdout}`);
17+
console.error(`stderr: ${stderr}`);
18+
});

src-tauri/upx/win.exe

551 KB
Binary file not shown.

yarn.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4287,7 +4287,6 @@ supports-preserve-symlinks-flag@^1.0.0:
42874287

42884288
"tauri-plugin-upload-api@https://github.com/tauri-apps/tauri-plugin-upload#v1":
42894289
version "0.0.0"
4290-
uid "8e8f120ea7c90a51fb5498f24d42f1884a49ec4d"
42914290
resolved "https://github.com/tauri-apps/tauri-plugin-upload#8e8f120ea7c90a51fb5498f24d42f1884a49ec4d"
42924291
dependencies:
42934292
"@tauri-apps/api" "1.5.3"

0 commit comments

Comments
 (0)