From da07d1eef7c0ed16efab2dc55f1617b7133f0679 Mon Sep 17 00:00:00 2001 From: joaoviictorti Date: Wed, 7 May 2025 13:04:32 -0300 Subject: [PATCH] new: Add Justfile --- Justfile | 40 ++++++++++++++++++++++++++++++++++++++++ Makefile.toml | 21 --------------------- 2 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 Justfile delete mode 100644 Makefile.toml diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..7d0438a --- /dev/null +++ b/Justfile @@ -0,0 +1,40 @@ +# Project paths +client := "client" +driver := "driver" + +alias c := clean +set windows-shell := ["powershell.exe", "-NoLogo", "-Command"] + +# Default task: build workspace and update dependencies +default: + just client + just driver + +# Build the entire workspace (includes client + common + shadowx) +client: + cd {{ client }}; cargo build --release + +# Build only client-mapper (if it's a separate feature) +client-mapper: + cd {{ client }}; cargo build --release --features mapper + +# Build the driver (outside workspace) +driver: + @if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { \ + throw "[-] You must run this as Administrator"; \ + } \ + cd {{driver}}; cargo make default --release + +# Build the driver with `mapper` feature +driver-mapper: + cd {{driver}}; cargo make default --release --features mapper + +# Clean everything in the workspace +clean: + cargo clean + cd {{ client }}; cargo clean + cd {{ driver }}; cargo clean + +# Update the entire workspace (client + common + shadowx) +update: + cargo update diff --git a/Makefile.toml b/Makefile.toml deleted file mode 100644 index 5f472aa..0000000 --- a/Makefile.toml +++ /dev/null @@ -1,21 +0,0 @@ -[tasks.build-client] -command = "cargo" -args = ["build", "--release", "--manifest-path", "client/Cargo.toml"] - -[tasks.clean-client] -cwd = "client" -command = "cargo" -args = ["clean"] - -[tasks.clean-common] -cwd = "common" -command = "cargo" -args = ["clean"] - -[tasks.clean] -description = "Clean both client and common directories" -dependencies = ["clean-client", "clean-common"] - -[tasks.default] -description = "Build client and run cargo update in both client and common" -dependencies = ["build-client", "update-client", "update-shared"]