diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0009151..57a991e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,11 +12,11 @@ jobs: fail-fast: false matrix: include: - # - platform: "macos-latest" # for Arm based macs (M1 and above). - # args: "--target aarch64-apple-darwin" - # - platform: "macos-latest" # for Intel based macs. - # args: "--target x86_64-apple-darwin" - # - platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04. + - platform: "macos-latest" # for Arm based macs (M1 and above). + args: "--target aarch64-apple-darwin" + - platform: "macos-latest" # for Intel based macs. + args: "--target x86_64-apple-darwin" + # - platform: "ubuntu-22.04" # args: "" - platform: "windows-latest" args: "" @@ -50,7 +50,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tagName: dogit-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version + tagName: emu-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version releaseName: "Emu v__VERSION__" releaseBody: "See the assets to download this version and install." releaseDraft: true diff --git a/bun.lockb b/bun.lockb old mode 100644 new mode 100755 index c54980e..9a9be59 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 4f44e17..5c207b6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "emu", "private": true, - "version": "0.1.0", + "version": "0.1.1", "type": "module", "scripts": { "dev": "vite", @@ -14,6 +14,7 @@ "@radix-ui/react-alert-dialog": "^1.1.2", "@radix-ui/react-slot": "^1.1.0", "@tauri-apps/api": "^2", + "@tauri-apps/plugin-os": "~2", "@tauri-apps/plugin-process": "~2", "@tauri-apps/plugin-shell": "~2", "class-variance-authority": "^0.7.0", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 9886ce7..9000708 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -696,12 +696,13 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "emu" -version = "0.1.0" +version = "0.1.1" dependencies = [ "serde", "serde_json", "tauri", "tauri-build", + "tauri-plugin-os", "tauri-plugin-positioner", "tauri-plugin-process", "tauri-plugin-shell", @@ -732,6 +733,16 @@ dependencies = [ "typeid", ] +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "fdeflate" version = "0.3.6" @@ -1003,6 +1014,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30" +dependencies = [ + "rustix", + "windows-targets 0.52.6", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -1718,6 +1739,12 @@ dependencies = [ "libc", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + [[package]] name = "litemap" version = "0.7.3" @@ -2175,6 +2202,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "os_info" +version = "3.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae99c7fa6dd38c7cafe1ec085e804f8f555a2f8659b0dbe03f1f9963a9b51092" +dependencies = [ + "log", + "serde", + "windows-sys 0.52.0", +] + [[package]] name = "os_pipe" version = "1.2.1" @@ -2709,6 +2747,19 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "ryu" version = "1.0.18" @@ -3137,6 +3188,15 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "sys-locale" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" +dependencies = [ + "libc", +] + [[package]] name = "system-deps" version = "6.2.2" @@ -3336,6 +3396,24 @@ dependencies = [ "walkdir", ] +[[package]] +name = "tauri-plugin-os" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc5f23a86f37687c7f4fecfdc706b279087bc44f7a46702f7307ff1551ee03a" +dependencies = [ + "gethostname", + "log", + "os_info", + "serde", + "serde_json", + "serialize-to-javascript", + "sys-locale", + "tauri", + "tauri-plugin", + "thiserror 1.0.69", +] + [[package]] name = "tauri-plugin-positioner" version = "2.0.2" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 5eaeae5..d02f0e8 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "emu" -version = "0.1.0" -description = "A Tauri App" -authors = ["you"] +version = "0.1.1" +description = "Manage emulators with ease" +authors = ["fax1ty"] edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -18,9 +18,10 @@ crate-type = ["staticlib", "cdylib", "rlib"] tauri-build = { version = "2", features = [] } [dependencies] -tauri = { version = "2", features = [] } +tauri = { version = "2", features = ["macos-private-api"] } tauri-plugin-shell = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" tauri-plugin-process = "2" tauri-plugin-positioner = "2" +tauri-plugin-os = "2" diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 4ce5d4e..0acb282 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -16,9 +16,15 @@ "name": "cmd.exe", "cmd": "cmd.exe", "args": true + }, + { + "name": "sh", + "cmd": "sh", + "args": true } ] }, - "process:default" + "process:default", + "os:default" ] } diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index c4c7164..2f80615 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -13,6 +13,7 @@ fn get_android_home() -> Result { #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() + .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_process::init()) .plugin(tauri_plugin_shell::init()) .invoke_handler(tauri::generate_handler![get_android_home]) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 80312c5..21d7c14 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "emu", - "version": "0.1.0", + "version": "0.1.1", "identifier": "emu.app", "build": { "beforeDevCommand": "bun run dev", @@ -10,6 +10,7 @@ "frontendDist": "../dist" }, "app": { + "macOSPrivateApi": true, "windows": [ { "title": "emu", diff --git a/src/app.tsx b/src/app.tsx index 60cb8dc..f5906ce 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -31,8 +31,6 @@ function App() { await window.close(); }; - if (!emulators) return null; - return ( <>