Commit 4c31d9c 1 parent b076fc4 commit 4c31d9c Copy full SHA for 4c31d9c
File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,9 @@ use ios as os;
78
78
#[ cfg( target_os = "haiku" ) ]
79
79
use haiku as os;
80
80
81
+ #[ cfg( target_os = "redox" ) ]
82
+ use redox as os;
83
+
81
84
#[ cfg( any(
82
85
target_os = "linux" ,
83
86
target_os = "android" ,
@@ -102,7 +105,8 @@ use unix as os;
102
105
target_os = "ios" ,
103
106
target_os = "macos" ,
104
107
target_os = "windows" ,
105
- target_os = "haiku"
108
+ target_os = "haiku" ,
109
+ target_os = "redox"
106
110
) ) ) ]
107
111
compile_error ! ( "open is not supported on this platform" ) ;
108
112
@@ -270,6 +274,9 @@ mod ios;
270
274
#[ cfg( target_os = "haiku" ) ]
271
275
mod haiku;
272
276
277
+ #[ cfg( target_os = "redox" ) ]
278
+ mod redox;
279
+
273
280
#[ cfg( any(
274
281
target_os = "linux" ,
275
282
target_os = "android" ,
Original file line number Diff line number Diff line change
1
+ use std:: { ffi:: OsStr , process:: Command } ;
2
+
3
+ pub fn commands < T : AsRef < OsStr > > ( path : T ) -> Vec < Command > {
4
+ let mut cmd = Command :: new ( "/ui/bin/launcher" ) ;
5
+ cmd. arg ( path. as_ref ( ) ) ;
6
+ vec ! [ cmd]
7
+ }
8
+
9
+ pub fn with_command < T : AsRef < OsStr > > ( path : T , app : impl Into < String > ) -> Command {
10
+ let mut cmd = Command :: new ( app. into ( ) ) ;
11
+ cmd. arg ( path. as_ref ( ) ) ;
12
+ cmd
13
+ }
You can’t perform that action at this time.
0 commit comments