fix: fixed proton builds integration with sandbox

This commit is contained in:
Observer KRypt0n_ 2023-05-22 22:20:14 +02:00
parent 09e883c548
commit 2058196de9
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 21 additions and 21 deletions

View file

@ -171,6 +171,13 @@ pub fn run() -> anyhow::Result<()> {
bash_command = format!("{gamescope} -- {bash_command}"); bash_command = format!("{gamescope} -- {bash_command}");
} }
// Bundle all windows arguments used to run the game into a single file
if features.compact_launch {
std::fs::write(folders.game.join("compact_launch.bat"), format!("start {windows_command}\nexit"))?;
windows_command = String::from("compact_launch.bat");
}
// bwrap <params> -- <command to run> // bwrap <params> -- <command to run>
#[cfg(feature = "sandbox")] #[cfg(feature = "sandbox")]
if config.sandbox.enabled { if config.sandbox.enabled {
@ -197,13 +204,6 @@ pub fn run() -> anyhow::Result<()> {
folders = sandboxed_folders; folders = sandboxed_folders;
} }
// Bundle all windows arguments used to run the game into a single file
if features.compact_launch {
std::fs::write(folders.game.join("compact_launch.bat"), format!("start {windows_command}\nexit"))?;
windows_command = String::from("compact_launch.bat");
}
// Finalize launching command // Finalize launching command
bash_command = match &config.game.command { bash_command = match &config.game.command {
// Use user-given launch command // Use user-given launch command

View file

@ -107,6 +107,13 @@ pub fn run() -> anyhow::Result<()> {
bash_command = format!("{gamescope} -- {bash_command}"); bash_command = format!("{gamescope} -- {bash_command}");
} }
// Bundle all windows arguments used to run the game into a single file
if features.compact_launch {
std::fs::write(folders.game.join("compact_launch.bat"), format!("start {windows_command}\nexit"))?;
windows_command = String::from("compact_launch.bat");
}
// bwrap <params> -- <command to run> // bwrap <params> -- <command to run>
#[cfg(feature = "sandbox")] #[cfg(feature = "sandbox")]
if config.sandbox.enabled { if config.sandbox.enabled {
@ -133,13 +140,6 @@ pub fn run() -> anyhow::Result<()> {
folders = sandboxed_folders; folders = sandboxed_folders;
} }
// Bundle all windows arguments used to run the game into a single file
if features.compact_launch {
std::fs::write(folders.game.join("compact_launch.bat"), format!("start {windows_command}\nexit"))?;
windows_command = String::from("compact_launch.bat");
}
// Finalize launching command // Finalize launching command
bash_command = match &config.game.command { bash_command = match &config.game.command {
// Use user-given launch command // Use user-given launch command

View file

@ -108,6 +108,13 @@ pub fn run() -> anyhow::Result<()> {
bash_command = format!("{gamescope} -- {bash_command}"); bash_command = format!("{gamescope} -- {bash_command}");
} }
// Bundle all windows arguments used to run the game into a single file
if features.compact_launch {
std::fs::write(folders.game.join("compact_launch.bat"), format!("start {windows_command}\nexit"))?;
windows_command = String::from("compact_launch.bat");
}
// bwrap <params> -- <command to run> // bwrap <params> -- <command to run>
#[cfg(feature = "sandbox")] #[cfg(feature = "sandbox")]
if config.sandbox.enabled { if config.sandbox.enabled {
@ -134,13 +141,6 @@ pub fn run() -> anyhow::Result<()> {
folders = sandboxed_folders; folders = sandboxed_folders;
} }
// Bundle all windows arguments used to run the game into a single file
if features.compact_launch {
std::fs::write(folders.game.join("compact_launch.bat"), format!("start {windows_command}\nexit"))?;
windows_command = String::from("compact_launch.bat");
}
// Finalize launching command // Finalize launching command
bash_command = match &config.game.command { bash_command = match &config.game.command {
// Use user-given launch command // Use user-given launch command