This repository was archived by the owner on Feb 2, 2021. It is now read-only.
File tree 3 files changed +18
-1
lines changed
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import options = require("../options");
5
5
import hostInfo = require( "../host-info" ) ;
6
6
import util = require( "util" ) ;
7
7
import os = require( "os" ) ;
8
- import HostInfo = require( "host-info " ) ;
8
+ import helpers = require( "../helpers " ) ;
9
9
10
10
export class PostInstallCommand implements ICommand {
11
11
private static SEVEN_ZIP_ERROR_MESSAGE = "It looks like there's a problem with your system configuration. " +
@@ -135,6 +135,12 @@ export class PostInstallCommand implements ICommand {
135
135
+ "described in http://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html (for JDK 8)" + os . EOL
136
136
+ "or http://docs.oracle.com/javase/7/docs/webnotes/install/ (for JDK 7)." + os . EOL ) ;
137
137
}
138
+ if ( hostInfo . isDarwin ( ) && ( ! sysInfo . monoVer || helpers . versionCompare ( sysInfo . monoVer , "3.12.0" ) < 0 ) ) {
139
+ this . $logger . warn ( "WARNING: Mono 3.12 or later is not installed or not configured properly." ) ;
140
+ this . $logger . out ( "You will not be able to work with Android devices in the device simulator or debug on connected Android devices." + os . EOL
141
+ + "To be able to work with Android in the device simulator and debug on connected Android devices," + os . EOL
142
+ + "download and install Mono 3.12 or later from http://www.mono-project.com/download/" + os . EOL ) ;
143
+ }
138
144
}
139
145
}
140
146
$injector . registerCommand ( "dev-post-install" , PostInstallCommand ) ;
Original file line number Diff line number Diff line change @@ -294,6 +294,8 @@ interface ISysInfoData {
294
294
itunesInstalled : boolean ;
295
295
/** Whether `android` executable can be run */
296
296
androidInstalled : boolean ;
297
+ /** mono version, relevant on Mac only **/
298
+ monoVer : string ;
297
299
}
298
300
299
301
interface ISysInfo {
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export class SysInfo implements ISysInfo {
12
12
private $iTunesValidator : Mobile . IiTunesValidator ,
13
13
private $logger : ILogger ) { }
14
14
15
+ private static monoVerRegExp = / v e r s i o n ( \d + [ . ] \d + [ . ] \d + ) / gm;
15
16
private sysInfoCache : ISysInfoData = undefined ;
16
17
17
18
getSysInfo ( ) : ISysInfoData {
@@ -55,6 +56,14 @@ export class SysInfo implements ISysInfo {
55
56
procOutput = this . execAndroidH ( ) ;
56
57
res . androidInstalled = procOutput ? _ . contains ( procOutput , "android" ) : false ;
57
58
59
+ procOutput = this . exec ( "mono --version" ) ;
60
+ if ( ! ! procOutput ) {
61
+ let match = SysInfo . monoVerRegExp . exec ( procOutput ) ;
62
+ res . monoVer = match ? match [ 1 ] : null ;
63
+ } else {
64
+ res . monoVer = null ;
65
+ }
66
+
58
67
this . sysInfoCache = res ;
59
68
}
60
69
You can’t perform that action at this time.
0 commit comments