diff --git a/deno.json b/deno.json index 7e1ce52..372c8f9 100644 --- a/deno.json +++ b/deno.json @@ -14,8 +14,21 @@ "cache/", ".vscode/", ".github/", - "profile.json" + "profile.json", + "gui/" + ] + } + }, + "lint": { + "files": { + "exclude": [ + "export/", + "cache/", + ".vscode/", + ".github/", + "profile.json", + "gui/" ] } } -} +} \ No newline at end of file diff --git a/gui/.gitignore b/gui/.gitignore index a547bf3..e002aa5 100644 --- a/gui/.gitignore +++ b/gui/.gitignore @@ -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? \ No newline at end of file diff --git a/gui/scripts/compile.sh b/gui/scripts/compile.sh new file mode 100755 index 0000000..047b8a3 --- /dev/null +++ b/gui/scripts/compile.sh @@ -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 diff --git a/gui/src-tauri/Cargo.lock b/gui/src-tauri/Cargo.lock index d6b24b8..c353fed 100644 --- a/gui/src-tauri/Cargo.lock +++ b/gui/src-tauri/Cargo.lock @@ -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", diff --git a/gui/src-tauri/Cargo.toml b/gui/src-tauri/Cargo.toml index ed7664a..029e010 100644 --- a/gui/src-tauri/Cargo.toml +++ b/gui/src-tauri/Cargo.toml @@ -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" diff --git a/gui/src-tauri/tauri.conf.json b/gui/src-tauri/tauri.conf.json index b3bfd75..16fb8b0 100644 --- a/gui/src-tauri/tauri.conf.json +++ b/gui/src-tauri/tauri.conf.json @@ -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