build: bundle deno executable

main
spacemeowx2 2023-03-03 21:11:16 +08:00 committed by imspace
parent 73eeb73680
commit bafec72d37
6 changed files with 61 additions and 5 deletions

View File

@ -14,8 +14,21 @@
"cache/",
".vscode/",
".github/",
"profile.json"
"profile.json",
"gui/"
]
}
},
"lint": {
"files": {
"exclude": [
"export/",
"cache/",
".vscode/",
".github/",
"profile.json",
"gui/"
]
}
}
}
}

3
gui/.gitignore vendored
View File

@ -11,6 +11,7 @@ node_modules
dist
dist-ssr
*.local
binaries/
# Editor directories and files
.vscode/*
@ -21,4 +22,4 @@ dist-ssr
*.ntvs*
*.njsproj
*.sln
*.sw?
*.sw?

7
gui/scripts/compile.sh Executable file
View File

@ -0,0 +1,7 @@
TARGETS="x86_64-unknown-linux-gnu,x86_64-pc-windows-msvc,x86_64-apple-darwin,aarch64-apple-darwin"
# compile for every target in bash
for target in $(echo $TARGETS | sed "s/,/ /g")
do
deno compile --target=$target -o ./binaries/s3si-$target ../s3si.ts
done

View File

@ -1504,6 +1504,16 @@ dependencies = [
"windows-sys 0.42.0",
]
[[package]]
name = "os_pipe"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a53dbb20faf34b16087a931834cba2d7a73cc74af2b7ef345a4c8324e2409a12"
dependencies = [
"libc",
"windows-sys 0.45.0",
]
[[package]]
name = "overload"
version = "0.1.1"
@ -2187,6 +2197,16 @@ dependencies = [
"lazy_static",
]
[[package]]
name = "shared_child"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "siphasher"
version = "0.3.10"
@ -2399,6 +2419,7 @@ dependencies = [
"objc",
"once_cell",
"open",
"os_pipe",
"percent-encoding",
"rand 0.8.5",
"raw-window-handle",
@ -2408,6 +2429,7 @@ dependencies = [
"serde_json",
"serde_repr",
"serialize-to-javascript",
"shared_child",
"state",
"tar",
"tauri-macros",

View File

@ -13,7 +13,7 @@ edition = "2021"
tauri-build = { version = "1.2", features = [] }
[dependencies]
tauri = { version = "1.2", features = ["shell-open"] }
tauri = { version = "1.2", features = ["shell-open", "shell-sidecar"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

View File

@ -14,6 +14,16 @@
"allowlist": {
"all": false,
"shell": {
"sidecar": true,
"scope": [
{
"name": "../binaries/s3si",
"sidecar": true,
"args": [
"--daemon"
]
}
],
"all": false,
"open": true
}
@ -28,7 +38,10 @@
"icons/icon.ico"
],
"identifier": "cn.imspace.s3si.ts",
"targets": "all"
"targets": "all",
"externalBin": [
"../binaries/s3si"
]
},
"security": {
"csp": null