-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #404 from Zagrios/bugfix/bs-crash-when-steam-run-a…
…s-admin [bugfix] Start BS as Admin when Steam is running as admin but BSM is not
- Loading branch information
Showing
15 changed files
with
725 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,6 @@ npm-debug.log.* | |
*.css.d.ts | ||
*.sass.d.ts | ||
*.scss.d.ts | ||
|
||
# externals | ||
externals/bs-admin-start/target/* |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[target.x86_64-pc-windows-msvc] | ||
rustflags = ["-C", "target-feature=+crt-static"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "start_beat_saber_admin" | ||
version = "0.1.0" | ||
edition = "2021" | ||
build = "build.rs" | ||
|
||
[build-dependencies] | ||
winres = "0.1.12" | ||
|
||
[profile.release] | ||
codegen-units = 1 | ||
lto = true | ||
opt-level = "z" | ||
|
||
[package.metadata.winres] | ||
FileDescription = "Start Beat Saber as Admin" | ||
LegalCopyright = "Copyright © 2024 Zagrios" | ||
CompanyName = "Zagrios" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
extern crate winres; | ||
|
||
fn main() { | ||
if cfg!(target_os = "windows") { | ||
let mut res = winres::WindowsResource::new(); | ||
res.set_manifest(r#" | ||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | ||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
<security> | ||
<requestedPrivileges> | ||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> | ||
</requestedPrivileges> | ||
</security> | ||
</trustInfo> | ||
</assembly> | ||
"#); | ||
res.set_icon("./icon.ico"); | ||
res.compile().unwrap(); | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
use std::{process::Command, path::Path}; | ||
|
||
fn main() { | ||
let args: Vec<String> = std::env::args().collect(); | ||
|
||
let mut command = Command::new(args.get(1).unwrap()); | ||
command.current_dir(Path::new(args.get(1).unwrap()).parent().unwrap()); | ||
|
||
for arg in args.iter().skip(1) { | ||
command.arg(arg); | ||
} | ||
|
||
command.env("SteamAppId", "620980"); | ||
|
||
let _ = command.spawn(); | ||
} |
Oops, something went wrong.