mirror of https://github.com/pozm/gdke.git
chore: prep release
This commit is contained in:
parent
397f2cc149
commit
a250c653d7
|
@ -1382,6 +1382,7 @@ name = "gdke-gui"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
"gdke",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri",
|
"tauri",
|
||||||
|
|
Binary file not shown.
|
@ -21,4 +21,4 @@ serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
tauri-plugin-dialog = "2.0.0-rc"
|
tauri-plugin-dialog = "2.0.0-rc"
|
||||||
anyhow = "*"
|
anyhow = "*"
|
||||||
# gdke = { path = "../.." }
|
gdke = { path = "../.." }
|
||||||
|
|
|
@ -3,7 +3,8 @@ use std::{ffi::OsStr, path::Path};
|
||||||
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
fn get_secret(program: &Path, sig: &str) -> Result<String, String> {
|
fn get_secret(program: &Path, sig: &str) -> Result<String, String> {
|
||||||
spawn_and_inject_sig(program, sig)
|
unsafe {
|
||||||
|
gdke::spawn_and_inject(program, sig)
|
||||||
.map_err(|e| e.to_string())
|
.map_err(|e| e.to_string())
|
||||||
.map(|val| {
|
.map(|val| {
|
||||||
let mut hex_str = "0x".to_string();
|
let mut hex_str = "0x".to_string();
|
||||||
|
@ -12,12 +13,13 @@ fn get_secret(program: &Path, sig: &str) -> Result<String, String> {
|
||||||
}
|
}
|
||||||
hex_str
|
hex_str
|
||||||
})
|
})
|
||||||
|
}
|
||||||
// String::new()
|
// String::new()
|
||||||
}
|
}
|
||||||
fn spawn_and_inject_sig<T: AsRef<OsStr>>(proc: T, sig: &str) -> anyhow::Result<[u8; 32]> {
|
// fn spawn_and_inject_sig<T: AsRef<OsStr>>(proc: T, sig: &str) -> anyhow::Result<[u8; 32]> {
|
||||||
Ok([62; 32])
|
// Ok([62; 32])
|
||||||
// Err(())
|
// // Err(())
|
||||||
}
|
// }
|
||||||
|
|
||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
|
|
|
@ -39,7 +39,7 @@ function App() {
|
||||||
set_outcome([true, out as string]);
|
set_outcome([true, out as string]);
|
||||||
set_loading(false);
|
set_loading(false);
|
||||||
},
|
},
|
||||||
(e) => {
|
(_) => {
|
||||||
set_loading(false);
|
set_loading(false);
|
||||||
set_outcome([false]);
|
set_outcome([false]);
|
||||||
},
|
},
|
||||||
|
|
|
@ -66,7 +66,7 @@ pub unsafe fn spawn_and_inject<T: AsRef<OsStr>>(proc: T, sig: &str) -> anyhow::R
|
||||||
if !pth.is_file() {
|
if !pth.is_file() {
|
||||||
panic!("file does not exist");
|
panic!("file does not exist");
|
||||||
}
|
}
|
||||||
let cmd_line_c = CString::new(proc).expect("invalid cstr");
|
let cmd_line_c = CString::new(proc.as_ref().as_encoded_bytes()).expect("invalid cstr");
|
||||||
let start_up_info = STARTUPINFOA {
|
let start_up_info = STARTUPINFOA {
|
||||||
wShowWindow: 0,
|
wShowWindow: 0,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
Loading…
Reference in New Issue