Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SonnyX committed Jan 3, 2022
1 parent 503bb18 commit b79ae14
Show file tree
Hide file tree
Showing 10 changed files with 263 additions and 88 deletions.
241 changes: 227 additions & 14 deletions RenegadeX-folder-permissions/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions RenegadeX-folder-permissions/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
cargo-features = ["strip"]
#cargo-features = ["strip"]
[package]
name = "RenegadeX-folder-permissions"
name = "renegadex-folder-permissions"
version = "1.0.0"
authors = ["SonnyX <[email protected]>"]
edition = "2018"
edition = "2021"
build = "windows.rs"

[dependencies]
powershell_script = "0.1.5"
powershell_script = "0.2"
clap = { version="3.0", features = ["derive"] }

[build-dependencies]
embed-resource = "1.3.0"
embed-resource = "1.3"

[profile.release]
opt-level = 'z'
strip = "symbols"
#strip = "symbols"
lto=true
18 changes: 13 additions & 5 deletions RenegadeX-folder-permissions/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
use powershell_script;
use clap::Parser;

fn main() {
let args: Vec<String> = std::env::args().collect();
/// Used for setting folder permissions
#[derive(Parser, Debug)]
#[clap(about)]
struct Args {
/// Directory of which to set the permissions
#[clap(short, long)]
directory: String,
}

let script = &args[1];
fn main() {
let args = Args::parse();

match powershell_script::run(script, true) {
match powershell_script::run(&format!("($acl = Get-ACL {directory}).AddAccessRule((New-Object System.Security.AccessControl.FileSystemAccessRule([System.Security.Principal.WindowsIdentity]::GetCurrent().Name,\"FullControl\",\"Allow\"))); $acl | Set-ACL {directory}", directory=args.directory), true) {
Ok(output) => {
println!("{}", output);
}
Err(e) => {
println!("Error: {}", e);
println!("Could not set Access Rule for RenegadeX directory: {}", e);
}
}}
4 changes: 2 additions & 2 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "RenegadeX-Launcher"
name = "renegade-x-launcher"
version = "0.9.31"
authors = ["SonnyX"]
edition = "2021"
Expand All @@ -22,7 +22,7 @@ runas = { git = "https://github.com/SonnyX/rust-runas" }
sha2 = "0.10"
hex = "0.4"
log = "0.4"
flexi_logger = "0.20"
flexi_logger = "0.22"
download-async = "0.10"
async-trait = "0.1"
json = "0.12"
Expand Down
1 change: 0 additions & 1 deletion backend/src/functions/mod.rs

This file was deleted.

Loading

0 comments on commit b79ae14

Please sign in to comment.