Skip to content

Commit a1de70e

Browse files
committed
🚧 wip: im going insane,.,.
1 parent 95f6bf9 commit a1de70e

File tree

22 files changed

+398
-117
lines changed

22 files changed

+398
-117
lines changed

.github/workflows/build.yml

Whitespace-only changes.

.github/workflows/ci.yml

Whitespace-only changes.

.vscode/extensions.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"recommendations": [
33
"tauri-apps.tauri-vscode",
44
"rust-lang.rust-analyzer",
5-
"bradlc.vscode-tailwindcss",
6-
// "oscarbeaumont.rspc-vscode",
5+
"vadimcn.vscode-lldb",
6+
"antfu.unocss",
7+
"oscarbeaumont.rspc-vscode",
78
"EditorConfig.EditorConfig",
89
"prisma.prisma",
910
"dbaeumer.vscode-eslint"
10-
// "astro-build.astro-vscode"
1111
]
1212
}

.vscode/launch.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "lldb",
9+
"request": "launch",
10+
"name": "Tauri Development",
11+
"cargo": {
12+
"args": ["build", "--package onelauncher_gui"]
13+
},
14+
"preLaunchTask": "desktop:frontend:dev"
15+
},
16+
{
17+
"type": "lldb",
18+
"request": "launch",
19+
"name": "Tauri Production",
20+
"cargo": {
21+
"args": ["build", "--package onelauncher_gui", "--release"]
22+
},
23+
"preLaunchTask": "desktop:frontend:build"
24+
}
25+
]
26+
}

.vscode/tasks.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "desktop:frontend:dev",
8+
"type": "shell",
9+
"isBackground": true,
10+
"command": "pnpm",
11+
"args": ["frontend", "dev"],
12+
// todo: problemMatcher
13+
"group": "build"
14+
},
15+
{
16+
"label": "desktop:frontend:build",
17+
"type": "shell",
18+
"command": "pnpm",
19+
"args": ["frontend", "build"],
20+
"group": "build"
21+
}
22+
]
23+
}

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ members = [
44
"apps/testing",
55
"apps/desktop",
66
"packages/core",
7-
"packages/macros"
7+
"packages/macros",
88
]
99

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

2323
[workspace.dependencies]
2424
onelauncher = { path = "./packages/core" }
25+
onelauncher_gui = { path = "./apps/desktop" }
26+
onelauncher_test = { path = "./apps/testing" }
2527
onelauncher_macros = { path = "./packages/macros" }
2628

2729
# tauri uses latest crates.io beta channel (temporarily can use v2 and main branches if necessary)
@@ -120,6 +122,7 @@ tempfile = { version = "3.10" }
120122
dunce = { version = "1.0.4" }
121123
serde_json = { version = "1.0" }
122124
serde_ini = { version = "0.2" }
125+
strum = { version = "0.23", features = [ "derive" ] }
123126
flate2 = { version = "1.0" }
124127
tar = { version = "0.4" }
125128
zip = { version = "0.6" }
@@ -145,6 +148,7 @@ sys-info = { version = "0.9" }
145148
whoami = { version = "1.5" }
146149
cocoa = { version = "0.25" }
147150
objc = { version = "0.2" }
151+
once_cell = { version = "1.19" }
148152
webbrowser = { version = "1.0" }
149153
url = { version = "2.5.2" }
150154

apps/desktop/Cargo.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "onelauncher_gui"
33
description = "Next-generation open source Minecraft launcher"
4+
default-run = "onelauncher_gui"
45
version = "1.0.0-alpha.1" # todo: make it so tauri works with the ws
56
license = { workspace = true }
67
edition = { workspace = true }
@@ -32,7 +33,8 @@ tauri = { workspace = true, features = [
3233
"macos-private-api",
3334
"image-ico",
3435
"image-png",
35-
"protocol-asset"
36+
"protocol-asset",
37+
"specta"
3638
] }
3739
tauri-utils = { workspace = true }
3840
tauri-build = { workspace = true }
@@ -59,13 +61,19 @@ thiserror = { workspace = true }
5961
anyhow = { workspace = true }
6062
chrono = { workspace = true }
6163
uuid = { workspace = true }
64+
strum = { workspace = true }
65+
once_cell = { workspace = true }
6266

6367
tracing = { workspace = true }
6468
tracing-error = { workspace = true }
6569

6670
[target.'cfg(target_os = "macos")'.dependencies]
67-
cocoa.workspace = true
68-
objc.workspace = true
71+
cocoa = { workspace = true }
72+
objc = { workspace = true }
73+
74+
[target.'cfg(target_os = "linux")'.dependencies]
75+
# https://github.com/tauri-apps/tauri/blob/tauri-v2.0.0-beta.17/core/tauri/Cargo.toml#L86
76+
webkit2gtk = { version = "=2.0.1", features = [ "v2_38" ] }
6977

7078
[features]
7179
default = [ "custom-protocol" ]

apps/desktop/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ fn main() {
3333
"download_mod",
3434
// Other
3535
"get_program_info",
36+
"reload_webview",
37+
"set_menu_bar_item_state",
38+
// Updater
39+
"check_for_update",
40+
"install_update"
3641
]),
3742
),
3843
)

apps/desktop/permissions/onelauncher/default.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@ permissions = [
3535

3636
# Other
3737
"allow-get-program-info",
38+
"allow-reload-webview",
39+
"allow-set-menu-bar-item-state",
40+
41+
# Updater
42+
"allow-check-for-update",
43+
"allow-install-update",
3844
]

0 commit comments

Comments
 (0)