mirror of https://github.com/pozm/gdke.git
push work on version detection
This commit is contained in:
parent
6e5f96fd72
commit
a2349d7491
|
@ -2,6 +2,12 @@
|
|||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.79"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.1.0"
|
||||
|
@ -237,9 +243,11 @@ dependencies = [
|
|||
name = "gdke"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"crossbeam",
|
||||
"dll-syringe",
|
||||
"poggers",
|
||||
"semver",
|
||||
"windows",
|
||||
]
|
||||
|
||||
|
@ -615,6 +623,12 @@ dependencies = [
|
|||
"syn 2.0.48",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.196"
|
||||
|
|
|
@ -19,6 +19,8 @@ strip = false
|
|||
# members = ["gdke-gui"]
|
||||
|
||||
[dependencies]
|
||||
semver = "*"
|
||||
anyhow = "*"
|
||||
windows = { features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System",
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
use std::{net::UdpSocket, time::Duration};
|
||||
|
||||
#[poggers_derive::create_entry(no_free)]
|
||||
use poggers::structures::process::{implement::utils::ProcessUtils, Process};
|
||||
|
||||
#[poggers_derive::create_entry(no_console)]
|
||||
pub fn main() {
|
||||
let sock = UdpSocket::bind("127.0.0.1:29849").unwrap();
|
||||
let mut buf = [1; 1];
|
||||
sock.connect("127.0.0.1:28713").expect("uanble to connect");
|
||||
|
||||
let proc = Process::this_process();
|
||||
let modd = proc.get_base_module().unwrap();
|
||||
|
||||
println!("sending data");
|
||||
std::thread::sleep(Duration::from_secs(2));
|
||||
sock.send(&buf);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#![feature(offset_of)]
|
||||
pub mod versioning;
|
||||
use std::{
|
||||
error::Error,
|
||||
ffi::{c_void, CStr, CString},
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
use std::{
|
||||
io::{Stdin, Stdout},
|
||||
path::Path,
|
||||
process::{Command, Stdio},
|
||||
};
|
||||
fn check_gd_ver(exe: Path) -> anyhow::Result<semver::Version> {
|
||||
assert!(exe.exists());
|
||||
let stdo = Command::new(exe)
|
||||
.arg("-V")
|
||||
.arg("-s")
|
||||
.arg("random-no-way-a-game-has-this-btw")
|
||||
.stdout(Stdio::null())
|
||||
.output()?;
|
||||
stdo.stdout
|
||||
}
|
Loading…
Reference in New Issue