Skip to content

Commit

Permalink
Merge branch 'main' into onboarding-usage-step
Browse files Browse the repository at this point in the history
  • Loading branch information
ImUrX committed Dec 12, 2024
2 parents fa74a74 + bc487f8 commit 9c9c552
Show file tree
Hide file tree
Showing 8 changed files with 224 additions and 21 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/gradle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
bundle-linux:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
needs: [build, test]
if: contains(fromJSON('["workflow_dispatch", "create"]'), github.event_name)
steps:
Expand All @@ -160,14 +160,25 @@ jobs:
- name: Set up Linux dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgtk-3-dev webkit2gtk-4.1 libappindicator3-dev librsvg2-dev patchelf libfuse2
packages: |
build-essential curl wget file libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev
# Increment to invalidate the cache
version: 1.0
version: 2.0
# Enables a workaround to attempt to run pre and post install scripts
execute_install_scripts: true
# Disables uploading logs as a build artifact
debug: false

- name: Set up specific Linux versioned dependencies
run: |
sudo apt-get update && sudo apt-get install -y \
libwebkit2gtk-4.1-0=2.44.0-2 \
libwebkit2gtk-4.1-dev=2.44.0-2 \
libjavascriptcoregtk-4.1-0=2.44.0-2 \
libjavascriptcoregtk-4.1-dev=2.44.0-2 \
gir1.2-javascriptcoregtk-4.1=2.44.0-2 \
gir1.2-webkit2-4.1=2.44.0-2;
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
with:
Expand Down
179 changes: 179 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion gui/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ shadow-rs = "0.35"
[dependencies]
serde_json = "1"
serde = { version = "1", features = ["derive"] }
tauri = { version = "2.0", features = ["devtools", "tray-icon", "image-png"] }
tauri = { version = "2.0", features = ["devtools", "tray-icon", "image-png", "rustls-tls"] }
tauri-runtime = "2.0"
tauri-plugin-dialog = "2.0"
tauri-plugin-fs = "2.0"
Expand Down
8 changes: 6 additions & 2 deletions gui/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ fn main() -> Result<()> {
.log_to_file(
FileSpec::default().directory(path.expect("We need a log dir")),
)
.format_for_files(util::logger_format)
.format_for_stderr(util::logger_format)
.format_for_files(|w, now, record| {
util::logger_format(w, now, record, false)
})
.format_for_stderr(|w, now, record| {
util::logger_format(w, now, record, true)
})
.rotate(
Criterion::Age(Age::Day),
Naming::Timestamps,
Expand Down
8 changes: 4 additions & 4 deletions gui/src-tauri/src/tray.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{collections::HashMap, sync::Mutex};

use tauri::{
image::Image,
include_image,
menu::{Menu, MenuBuilder, MenuItemBuilder, MenuItemKind},
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
AppHandle, Emitter, Manager, Runtime, State,
Expand Down Expand Up @@ -107,10 +107,10 @@ pub fn create_tray<R: Runtime>(app: &tauri::AppHandle<R>) -> tauri::Result<()> {
.icon_as_template(true)
.menu_on_left_click(false)
.icon(if cfg!(target_os = "macos") {
Image::from_bytes(include_bytes!("../icons/appleTrayIcon.png"))
include_image!("icons/appleTrayIcon.png")
} else {
Image::from_bytes(include_bytes!("../icons/128x128.png"))
}?)
include_image!("icons/128x128.png")
})
.on_menu_event(move |app, event| match event.id.as_ref() {
"quit" => app.emit("try-close", "tray").unwrap(),
"toggle" => {
Expand Down
Loading

0 comments on commit 9c9c552

Please sign in to comment.