From cf816152033add991578777f1bad3b901651b769 Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Sun, 9 Feb 2020 20:32:21 +0100 Subject: [PATCH] Reorganize project to a workspace --- .gitignore | 5 +++++ Cargo.toml | 7 +++++++ notcuda/.gitignore | 2 -- notcuda_inject/.gitignore | 2 -- notcuda_inject/Cargo.toml | 3 ++- notcuda_inject/src/bin.rs | 4 ++-- notcuda_redirect/.gitignore | 2 -- 7 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 .gitignore create mode 100644 Cargo.toml delete mode 100644 notcuda/.gitignore delete mode 100644 notcuda_inject/.gitignore delete mode 100644 notcuda_redirect/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..76550e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +target/ +Cargo.lock + +.vscode/ +.idea/ \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4d850ff --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,7 @@ +[workspace] + +members = [ + "notcuda", + "notcuda_inject", + "notcuda_redirect", +] \ No newline at end of file diff --git a/notcuda/.gitignore b/notcuda/.gitignore deleted file mode 100644 index 96ef6c0..0000000 --- a/notcuda/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -Cargo.lock diff --git a/notcuda_inject/.gitignore b/notcuda_inject/.gitignore deleted file mode 100644 index 96ef6c0..0000000 --- a/notcuda_inject/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -Cargo.lock diff --git a/notcuda_inject/Cargo.toml b/notcuda_inject/Cargo.toml index 814f83c..fd9997f 100644 --- a/notcuda_inject/Cargo.toml +++ b/notcuda_inject/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "notcuda" +name = "notcuda_inject" version = "0.0.0" authors = ["Andrzej Janik "] edition = "2018" @@ -9,6 +9,7 @@ name = "notcuda" path = "src/bin.rs" [dependencies] +notcuda_redirect = { path = "../notcuda_redirect" } detours-sys = "0.1" clap = "2.33" diff --git a/notcuda_inject/src/bin.rs b/notcuda_inject/src/bin.rs index b7314c0..4f7cf70 100644 --- a/notcuda_inject/src/bin.rs +++ b/notcuda_inject/src/bin.rs @@ -65,10 +65,10 @@ fn main() -> Result<(), Box> { ptr::null(), &mut startup_info as *mut _, &mut proc_info as *mut _, - "nvcuda_redirect.dll".as_ptr() as *const i8, + "notcuda_redirect.dll\0".as_ptr() as *const i8, Option::None ), - |x| x == 0 + |x| x != 0 ); os_call!(ResumeThread(proc_info.hThread), |x| x as i32 != -1); os_call!(WaitForSingleObject(proc_info.hProcess, INFINITE), |x| x != WAIT_FAILED); diff --git a/notcuda_redirect/.gitignore b/notcuda_redirect/.gitignore deleted file mode 100644 index 96ef6c0..0000000 --- a/notcuda_redirect/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -Cargo.lock