Skip to content

Commit

Permalink
✨ windows icon higher resolution update
Browse files Browse the repository at this point in the history
🐛 windows terminal disable
⌚ temp directory remove (temp solution)
  • Loading branch information
GalaxyShad committed Jun 26, 2024
1 parent afc098a commit 31c310a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
Binary file modified src-tauri/icons/icon.ico
Binary file not shown.
22 changes: 19 additions & 3 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#![windows_subsystem = "windows"]

use rodio::Source;

use std::vec;
use tauri::Manager;
use std::{fs, vec};
use tauri::{Manager, State, WindowEvent};

mod editor_commands;
mod squarewave;
Expand All @@ -22,6 +24,20 @@ use crate::umpk80_commands::{

fn main() {
tauri::Builder::default()
.enable_macos_default_menu(false)
.on_window_event(move |event| match event.event() {
WindowEvent::Destroyed => {
let mut am: State<TempDirState> = event.window().state();

let path = {
let state = am.0.lock().unwrap();
state.path().to_owned()
};

fs::remove_dir_all(path).unwrap();
}
_ => { }
})
.manage(TempDirState::new())
.manage(Umpk80State::new())
.invoke_handler(tauri::generate_handler![
Expand Down Expand Up @@ -49,4 +65,4 @@ fn main() {
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
}
2 changes: 1 addition & 1 deletion src-tauri/src/translator_commands.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::path::Path;
use std::sync::{Arc, Mutex};
use std::sync::{Arc, Mutex, MutexGuard};

use serde::{Deserialize, Serialize};
use tauri::State;
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "UMPK-80-IDE",
"version": "0.1.0"
"version": "1.0.0"
},
"tauri": {
"allowlist": {
Expand Down

0 comments on commit 31c310a

Please sign in to comment.