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"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"gdke",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
|
|
Binary file not shown.
|
@ -21,4 +21,4 @@ serde = { version = "1", features = ["derive"] }
|
|||
serde_json = "1"
|
||||
tauri-plugin-dialog = "2.0.0-rc"
|
||||
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
|
||||
#[tauri::command]
|
||||
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(|val| {
|
||||
let mut hex_str = "0x".to_string();
|
||||
|
@ -12,12 +13,13 @@ fn get_secret(program: &Path, sig: &str) -> Result<String, String> {
|
|||
}
|
||||
hex_str
|
||||
})
|
||||
}
|
||||
// String::new()
|
||||
}
|
||||
fn spawn_and_inject_sig<T: AsRef<OsStr>>(proc: T, sig: &str) -> anyhow::Result<[u8; 32]> {
|
||||
Ok([62; 32])
|
||||
// Err(())
|
||||
}
|
||||
// fn spawn_and_inject_sig<T: AsRef<OsStr>>(proc: T, sig: &str) -> anyhow::Result<[u8; 32]> {
|
||||
// Ok([62; 32])
|
||||
// // Err(())
|
||||
// }
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
|
|
|
@ -39,7 +39,7 @@ function App() {
|
|||
set_outcome([true, out as string]);
|
||||
set_loading(false);
|
||||
},
|
||||
(e) => {
|
||||
(_) => {
|
||||
set_loading(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() {
|
||||
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 {
|
||||
wShowWindow: 0,
|
||||
..Default::default()
|
||||
|
|
Loading…
Reference in New Issue