make macos gui work (#412)

This commit is contained in:
Uriel
2023-01-03 14:39:29 -03:00
committed by GitHub
parent 3b75b5168f
commit 8dfeedaf2b
7 changed files with 1681 additions and 2037 deletions

4
Cargo.lock generated
View File

@@ -2560,9 +2560,9 @@ dependencies = [
[[package]]
name = "shadow-rs"
version = "0.18.0"
version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8bf8e33626554dd9027d240a3b91d73be43054c0f9ef645cdf0483b6ebe822fa"
checksum = "6c401e795850edb4e9fdde5940f856364f0fbab573e8dea58f6ee5f85fcf471d"
dependencies = [
"const_format",
"git2",

View File

@@ -7,7 +7,7 @@
"@fluent/react": "^0.14.1",
"@fontsource/poppins": "^4.5.8",
"@formatjs/intl-localematcher": "^0.2.32",
"@tauri-apps/api": "^1.0.2",
"@tauri-apps/api": "^1.2.0",
"@vitejs/plugin-react": "^2.2.0",
"browserslist": "^4.18.1",
"camelcase": "^6.2.1",
@@ -68,7 +68,7 @@
"devDependencies": {
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@tailwindcss/forms": "^0.5.0",
"@tauri-apps/cli": "^1.2.0",
"@tauri-apps/cli": "^1.2.2",
"@types/react": "18.0.25",
"@types/react-dom": "^18.0.5",
"@types/react-modal": "3.13.1",

View File

@@ -23,7 +23,7 @@ custom-protocol = ["tauri/custom-protocol"]
[build-dependencies]
tauri-build = { version = "1.2", features = [] }
cfg_aliases = "0.1"
shadow-rs = "0.18"
shadow-rs = "0.19"
[dependencies]
serde_json = "1"
@@ -38,7 +38,7 @@ rand = "0.8.5"
tempfile = "3"
which = "4.3.0"
open = "3"
shadow-rs = { version = "0.18", default-features = false }
shadow-rs = { version = "0.19", default-features = false }
const_format = "0.2.30"
[target.'cfg(windows)'.dependencies]

View File

@@ -74,18 +74,18 @@ fn get_launch_path(cli: Cli) -> Option<PathBuf> {
return Some(path);
}
let path = PathBuf::from("/usr/share/slimevr/");
if is_valid_path(&path) {
return Some(path);
}
let path = PathBuf::from("/usr/share/slimevr/");
if is_valid_path(&path) {
return Some(path);
}
// This is only for AppImage
if let Some(appimage) = env::var_os("APPDIR") {
let path = PathBuf::from(appimage);
if is_valid_path(&path) {
return Some(path);
}
}
// This is only for AppImage
if let Some(appimage) = env::var_os("APPDIR") {
let path = PathBuf::from(appimage);
if is_valid_path(&path) {
return Some(path);
}
}
None
}
@@ -208,8 +208,10 @@ fn main() {
None
};
tauri::Builder::default()
.plugin(tauri_plugin_window_state::Builder::default().build())
let builder = tauri::Builder::default();
#[cfg(not(target_os = "macos"))]
let builder = builder.plugin(tauri_plugin_window_state::Builder::default().build());
builder
.setup(|app| {
if let Some(mut recv) = stdout_recv {
let app_handle = app.app_handle();

View File

@@ -29,10 +29,11 @@
},
"macOS": {
"frameworks": [],
"exceptionDomain": "",
"exceptionDomain": "localhost",
"signingIdentity": null,
"providerShortName": null,
"entitlements": null
"entitlements": null,
"license": "../../LICENSE-MIT"
},
"windows": {
"certificateThumbprint": null,
@@ -78,7 +79,9 @@
"decorations": false,
"transparent": false,
"fileDropEnabled": false,
"visible": true
"visible": true,
"hiddenTitle": true,
"tabbingIdentifier": "slimevr"
}
],
"security": {

3667
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@
"gui"
],
"scripts": {
"gui": "npm run update-solarxr && cd gui && npm run tauri dev",
"gui": "npm run update-solarxr && cd gui && npm run dev",
"tauri": "cd gui && npm run tauri",
"skipbundler": "cd gui && npm run skipbundler",
"build": "npm run tauri build",