Skip to content

Commit

Permalink
🚧 wip: im going insane,.,.
Browse files Browse the repository at this point in the history
  • Loading branch information
pauliesnug committed Jul 29, 2024
1 parent 95f6bf9 commit a1de70e
Show file tree
Hide file tree
Showing 22 changed files with 398 additions and 117 deletions.
Empty file added .github/workflows/build.yml
Empty file.
Empty file added .github/workflows/ci.yml
Empty file.
6 changes: 3 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"recommendations": [
"tauri-apps.tauri-vscode",
"rust-lang.rust-analyzer",
"bradlc.vscode-tailwindcss",
// "oscarbeaumont.rspc-vscode",
"vadimcn.vscode-lldb",
"antfu.unocss",
"oscarbeaumont.rspc-vscode",
"EditorConfig.EditorConfig",
"prisma.prisma",
"dbaeumer.vscode-eslint"
// "astro-build.astro-vscode"
]
}
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Tauri Development",
"cargo": {
"args": ["build", "--package onelauncher_gui"]
},
"preLaunchTask": "desktop:frontend:dev"
},
{
"type": "lldb",
"request": "launch",
"name": "Tauri Production",
"cargo": {
"args": ["build", "--package onelauncher_gui", "--release"]
},
"preLaunchTask": "desktop:frontend:build"
}
]
}
23 changes: 23 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "desktop:frontend:dev",
"type": "shell",
"isBackground": true,
"command": "pnpm",
"args": ["frontend", "dev"],
// todo: problemMatcher
"group": "build"
},
{
"label": "desktop:frontend:build",
"type": "shell",
"command": "pnpm",
"args": ["frontend", "build"],
"group": "build"
}
]
}
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ members = [
"apps/testing",
"apps/desktop",
"packages/core",
"packages/macros"
"packages/macros",
]

[workspace.package]
Expand All @@ -22,6 +22,8 @@ version = "1.0.0-alpha.1"

[workspace.dependencies]
onelauncher = { path = "./packages/core" }
onelauncher_gui = { path = "./apps/desktop" }
onelauncher_test = { path = "./apps/testing" }
onelauncher_macros = { path = "./packages/macros" }

# tauri uses latest crates.io beta channel (temporarily can use v2 and main branches if necessary)
Expand Down Expand Up @@ -120,6 +122,7 @@ tempfile = { version = "3.10" }
dunce = { version = "1.0.4" }
serde_json = { version = "1.0" }
serde_ini = { version = "0.2" }
strum = { version = "0.23", features = [ "derive" ] }
flate2 = { version = "1.0" }
tar = { version = "0.4" }
zip = { version = "0.6" }
Expand All @@ -145,6 +148,7 @@ sys-info = { version = "0.9" }
whoami = { version = "1.5" }
cocoa = { version = "0.25" }
objc = { version = "0.2" }
once_cell = { version = "1.19" }
webbrowser = { version = "1.0" }
url = { version = "2.5.2" }

Expand Down
14 changes: 11 additions & 3 deletions apps/desktop/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "onelauncher_gui"
description = "Next-generation open source Minecraft launcher"
default-run = "onelauncher_gui"
version = "1.0.0-alpha.1" # todo: make it so tauri works with the ws
license = { workspace = true }
edition = { workspace = true }
Expand Down Expand Up @@ -32,7 +33,8 @@ tauri = { workspace = true, features = [
"macos-private-api",
"image-ico",
"image-png",
"protocol-asset"
"protocol-asset",
"specta"
] }
tauri-utils = { workspace = true }
tauri-build = { workspace = true }
Expand All @@ -59,13 +61,19 @@ thiserror = { workspace = true }
anyhow = { workspace = true }
chrono = { workspace = true }
uuid = { workspace = true }
strum = { workspace = true }
once_cell = { workspace = true }

tracing = { workspace = true }
tracing-error = { workspace = true }

[target.'cfg(target_os = "macos")'.dependencies]
cocoa.workspace = true
objc.workspace = true
cocoa = { workspace = true }
objc = { workspace = true }

[target.'cfg(target_os = "linux")'.dependencies]
# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-beta.17/core/tauri/Cargo.toml#L86
webkit2gtk = { version = "=2.0.1", features = [ "v2_38" ] }

[features]
default = [ "custom-protocol" ]
Expand Down
5 changes: 5 additions & 0 deletions apps/desktop/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ fn main() {
"download_mod",
// Other
"get_program_info",
"reload_webview",
"set_menu_bar_item_state",
// Updater
"check_for_update",
"install_update"
]),
),
)
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/permissions/onelauncher/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ permissions = [

# Other
"allow-get-program-info",
"allow-reload-webview",
"allow-set-menu-bar-item-state",

# Updater
"allow-check-for-update",
"allow-install-update",
]
Loading

0 comments on commit a1de70e

Please sign in to comment.