fix: build on linux
This commit is contained in:
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@@ -18,10 +18,10 @@ jobs:
|
|||||||
args: "--target x86_64-apple-darwin"
|
args: "--target x86_64-apple-darwin"
|
||||||
- platform: "macos-latest" # for Intel based macs.
|
- platform: "macos-latest" # for Intel based macs.
|
||||||
args: "--target universal-apple-darwin"
|
args: "--target universal-apple-darwin"
|
||||||
#- platform: 'ubuntu-22.04'
|
- platform: 'ubuntu-22.04'
|
||||||
# args: ''
|
args: ''
|
||||||
#- platform: 'windows-latest'
|
- platform: 'windows-latest'
|
||||||
# args: '--target x86_64-pc-windows-msvc'
|
args: '--target x86_64-pc-windows-msvc'
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ pub fn open_window(window: Window, app_handle: tauri::AppHandle) -> Result<(), S
|
|||||||
&window.label,
|
&window.label,
|
||||||
WebviewUrl::App(PathBuf::from(window.url)),
|
WebviewUrl::App(PathBuf::from(window.url)),
|
||||||
)
|
)
|
||||||
.title(title)
|
.title(&window.title)
|
||||||
.min_inner_size(window.width, window.height)
|
.min_inner_size(window.width, window.height)
|
||||||
.inner_size(window.width, window.height)
|
.inner_size(window.width, window.height)
|
||||||
.minimizable(window.minimizable)
|
.minimizable(window.minimizable)
|
||||||
@@ -218,7 +218,7 @@ pub fn open_window(window: Window, app_handle: tauri::AppHandle) -> Result<(), S
|
|||||||
&window.label,
|
&window.label,
|
||||||
WebviewUrl::App(PathBuf::from(window.url)),
|
WebviewUrl::App(PathBuf::from(window.url)),
|
||||||
)
|
)
|
||||||
.title(title)
|
.title(&window.title)
|
||||||
.min_inner_size(window.width, window.height)
|
.min_inner_size(window.width, window.height)
|
||||||
.inner_size(window.width, window.height)
|
.inner_size(window.width, window.height)
|
||||||
.minimizable(window.minimizable)
|
.minimizable(window.minimizable)
|
||||||
@@ -227,6 +227,7 @@ pub fn open_window(window: Window, app_handle: tauri::AppHandle) -> Result<(), S
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// Set decoration
|
// Set decoration
|
||||||
|
#[cfg(not(target_os = "linux"))]
|
||||||
window.create_overlay_titlebar().unwrap();
|
window.create_overlay_titlebar().unwrap();
|
||||||
|
|
||||||
// Restore native border
|
// Restore native border
|
||||||
|
|||||||
@@ -140,7 +140,13 @@ fn main() {
|
|||||||
builder.build().unwrap()
|
builder.build().unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
tauri::Builder::default()
|
#[cfg(target_os = "macos")]
|
||||||
|
let builder = tauri::Builder::default().plugin(tauri_nspanel::init());
|
||||||
|
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
let builder = tauri::Builder::default();
|
||||||
|
|
||||||
|
builder
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
app.handle().plugin(tauri_nspanel::init()).unwrap();
|
app.handle().plugin(tauri_nspanel::init()).unwrap();
|
||||||
@@ -239,8 +245,6 @@ fn main() {
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.enable_macos_default_menu(false)
|
|
||||||
.plugin(tauri_nspanel::init())
|
|
||||||
.plugin(tauri_plugin_theme::init(ctx.config_mut()))
|
.plugin(tauri_plugin_theme::init(ctx.config_mut()))
|
||||||
.plugin(tauri_plugin_decorum::init())
|
.plugin(tauri_plugin_decorum::init())
|
||||||
.plugin(tauri_plugin_clipboard_manager::init())
|
.plugin(tauri_plugin_clipboard_manager::init())
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#[cfg(target_os = "macos")]
|
||||||
use crate::commands::tray::create_tray_panel;
|
use crate::commands::tray::create_tray_panel;
|
||||||
use crate::nostr::event::RichEvent;
|
use crate::nostr::event::RichEvent;
|
||||||
use crate::nostr::internal::{get_user_settings, init_nip65};
|
use crate::nostr::internal::{get_user_settings, init_nip65};
|
||||||
|
|||||||
@@ -66,21 +66,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"dmg": {
|
|
||||||
"appPosition": {
|
|
||||||
"x": 180,
|
|
||||||
"y": 170
|
|
||||||
},
|
|
||||||
"applicationFolderPosition": {
|
|
||||||
"x": 480,
|
|
||||||
"y": 170
|
|
||||||
},
|
|
||||||
"windowSize": {
|
|
||||||
"height": 400,
|
|
||||||
"width": 660
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": {},
|
|
||||||
"minimumSystemVersion": "10.15"
|
"minimumSystemVersion": "10.15"
|
||||||
},
|
},
|
||||||
"windows": {
|
"windows": {
|
||||||
|
|||||||
Reference in New Issue
Block a user