Skip to content

Commit c26e4cf

Browse files
author
MasterSelects
committed
Release native helper v0.3.12
1 parent f772688 commit c26e4cf

7 files changed

Lines changed: 22 additions & 6 deletions

File tree

.github/workflows/native-helper-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Version tag (e.g. v0.3.11)'
7+
description: 'Version tag (e.g. v0.3.12)'
88
required: true
9-
default: 'v0.3.11'
9+
default: 'v0.3.12'
1010

1111
jobs:
1212
build:

src/services/nativeHelper/releases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const NATIVE_HELPER_TARGET_VERSION = '0.3.11';
1+
export const NATIVE_HELPER_TARGET_VERSION = '0.3.12';
22
export const NATIVE_HELPER_RELEASES_URL = 'https://github.com/Sportinger/MasterSelects/releases';
33

44
const GITHUB_RELEASES_API_URL = 'https://api.github.com/repos/Sportinger/MasterSelects/releases?per_page=20';

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const FEATURED_VIDEO: {
4040
// Build/Platform notice shown at top of changelog (set to null to hide)
4141
export const BUILD_NOTICE: ChangelogNotice | null = {
4242
type: 'success',
43-
title: 'Native Helper v0.3.11 available',
43+
title: 'Native Helper v0.3.12 available',
4444
message: 'Adds masterselects.com helper detection while keeping the hardened localhost bridge checks and helper update flow in place.',
4545
animated: true,
4646
};

tools/native-helper/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/native-helper/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "masterselects-helper"
3-
version = "0.3.11"
3+
version = "0.3.12"
44
edition = "2021"
55
authors = ["MasterSelects Team"]
66
description = "Local control, storage, and download helper for MasterSelects"

tools/native-helper/src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,21 @@ fn run_with_tray(config: server::ServerConfig, _args: &Args) {
261261
let port = config.port;
262262
let state = Arc::new(tray::TrayState::new());
263263
let state_for_server = state.clone();
264+
let state_for_error = state.clone();
264265

265266
// Spawn server on a worker thread (with its own tokio runtime)
266267
let server_thread = std::thread::spawn(move || {
267268
let rt = tokio::runtime::Runtime::new().expect("Failed to create Tokio runtime");
268269
if let Err(e) = rt.block_on(server::run_with_shutdown(config, state_for_server)) {
270+
if let Ok(mut slot) = state_for_error.server_error.lock() {
271+
*slot = Some(e.to_string());
272+
}
273+
state_for_error
274+
.running
275+
.store(false, std::sync::atomic::Ordering::Relaxed);
276+
state_for_error
277+
.quit_requested
278+
.store(true, std::sync::atomic::Ordering::Relaxed);
269279
eprintln!("Server error: {}", e);
270280
}
271281
});

tools/native-helper/src/tray.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pub struct TrayState {
4141
pub running: AtomicBool,
4242
pub quit_requested: AtomicBool,
4343
pub connection_count: AtomicU32,
44+
pub server_error: Mutex<Option<String>>,
4445
pub update_status: Mutex<UpdateStatus>,
4546
}
4647

@@ -50,6 +51,7 @@ impl TrayState {
5051
running: AtomicBool::new(false),
5152
quit_requested: AtomicBool::new(false),
5253
connection_count: AtomicU32::new(0),
54+
server_error: Mutex::new(None),
5355
update_status: Mutex::new(UpdateStatus::Idle),
5456
}
5557
}
@@ -134,6 +136,10 @@ pub fn run_tray(state: Arc<TrayState>, port: u16) -> Result<()> {
134136
let mut last_update_menu_text = String::new();
135137

136138
loop {
139+
if state.quit_requested.load(Ordering::Relaxed) {
140+
return Ok(());
141+
}
142+
137143
// Pump Win32 messages (keeps tray icon responsive)
138144
unsafe {
139145
let mut msg: MSG = std::mem::zeroed();

0 commit comments

Comments
 (0)