Skip to content

Commit

Permalink
Merge pull request #2 from fax1ty/develop
Browse files Browse the repository at this point in the history
release: 0.1.1
  • Loading branch information
fax1ty authored Nov 12, 2024
2 parents 4a7b8fe + 2f9d56c commit fad8128
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 70 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down Expand Up @@ -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
Expand Down
Binary file modified bun.lockb
100644 → 100755
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "emu",
"private": true,
"version": "0.1.0",
"version": "0.1.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -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",
Expand Down
80 changes: 79 additions & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
8 changes: 7 additions & 1 deletion src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@
"name": "cmd.exe",
"cmd": "cmd.exe",
"args": true
},
{
"name": "sh",
"cmd": "sh",
"args": true
}
]
},
"process:default"
"process:default",
"os:default"
]
}
1 change: 1 addition & 0 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fn get_android_home() -> Result<String, String> {
#[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])
Expand Down
3 changes: 2 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -10,6 +10,7 @@
"frontendDist": "../dist"
},
"app": {
"macOSPrivateApi": true,
"windows": [
{
"title": "emu",
Expand Down
34 changes: 17 additions & 17 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ function App() {
await window.close();
};

if (!emulators) return null;

return (
<>
<nav
Expand Down Expand Up @@ -62,20 +60,22 @@ function App() {
</nav>

<main className="flex-1 px-4 pb-2 py-1">
<ul>
{Object.values(emulators).map((emulator, i) => (
<EmulatorListItem
key={i}
emulator={emulator}
onOptionsButtonPressed={(event) => {
setSelectedEmulator(emulator.name);
show({
event,
});
}}
/>
))}
</ul>
{emulators && (
<ul>
{Object.values(emulators).map((emulator, i) => (
<EmulatorListItem
key={i}
emulator={emulator}
onOptionsButtonPressed={(event) => {
setSelectedEmulator(emulator.name);
show({
event,
});
}}
/>
))}
</ul>
)}
</main>

<Menu
Expand All @@ -87,7 +87,7 @@ function App() {
<Item
disabled={
!selectedEmulator ||
emulators[selectedEmulator]?.state !== "offline"
emulators?.[selectedEmulator]?.state !== "offline"
}
onClick={async () => {
if (!selectedEmulator) return;
Expand Down
Loading

0 comments on commit fad8128

Please sign in to comment.