File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,8 @@ impl<'a> Launcher<'a> {
303303 if instances. len ( ) == 1 {
304304 let mut cmd = if cfg ! ( target_os = "windows" ) {
305305 super :: platforms:: windows ( & self . arma3 , & self . executable , & instances[ 0 ] )
306+ } else if cfg ! ( target_os = "macos" ) {
307+ super :: platforms:: macos ( & instances[ 0 ] )
306308 } else {
307309 super :: platforms:: linux ( & instances[ 0 ] )
308310 } ?;
@@ -319,6 +321,8 @@ impl<'a> Launcher<'a> {
319321 children. push (
320322 if cfg ! ( target_os = "windows" ) {
321323 super :: platforms:: windows ( & self . arma3 , & self . executable , & instance) ?
324+ } else if cfg ! ( target_os = "macos" ) {
325+ super :: platforms:: macos ( & instance) ?
322326 } else {
323327 super :: platforms:: linux ( & instance) ?
324328 }
Original file line number Diff line number Diff line change @@ -90,3 +90,16 @@ pub fn linux(args: &[String]) -> Result<Command, Error> {
9090 } ;
9191 Ok ( cmd)
9292}
93+
94+ #[ allow( clippy:: unnecessary_wraps) ]
95+ pub fn macos ( args : & [ String ] ) -> Result < Command , Error > {
96+ info ! ( "Launching with:\n {}" , args. join( "\n " ) ) ;
97+ let mut cmd = std:: process:: Command :: new ( "/Applications/Steam.app/Contents/MacOS/steam_osx" ) ;
98+ cmd. arg ( "-applaunch" )
99+ . arg ( "107410" )
100+ . arg ( "-nolauncher" )
101+ . args ( args)
102+ . stdout ( std:: process:: Stdio :: null ( ) )
103+ . stderr ( std:: process:: Stdio :: null ( ) ) ;
104+ Ok ( cmd)
105+ }
You can’t perform that action at this time.
0 commit comments