Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
16f9e387
Commit
16f9e387
authored
Feb 21, 2016
by
Devon Carew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check to see if the xcode eula has been signed
parent
4ec96084
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
11 deletions
+31
-11
ios_workflow.dart
packages/flutter_tools/lib/src/ios/ios_workflow.dart
+14
-11
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+17
-0
No files found.
packages/flutter_tools/lib/src/ios/ios_workflow.dart
View file @
16f9e387
...
...
@@ -28,15 +28,7 @@ class IOSWorkflow extends Workflow {
);
Function
_xcodeExists
=
()
{
if
(
xcode
.
isInstalledAndMeetsVersionCheck
)
{
return
ValidationType
.
installed
;
}
if
(
xcode
.
isInstalled
)
{
return
ValidationType
.
partial
;
}
return
ValidationType
.
missing
;
return
xcode
.
isInstalled
?
ValidationType
.
installed
:
ValidationType
.
missing
;
};
Function
_xcodeVersionSatisfactory
=
()
{
...
...
@@ -47,6 +39,10 @@ class IOSWorkflow extends Workflow {
return
ValidationType
.
missing
;
};
Function
_xcodeEulaSigned
=
()
{
return
xcode
.
eulaSigned
?
ValidationType
.
installed
:
ValidationType
.
missing
;
};
Function
_brewExists
=
()
{
return
exitsHappy
(<
String
>[
'brew'
,
'-v'
])
?
ValidationType
.
installed
:
ValidationType
.
missing
;
...
...
@@ -71,12 +67,19 @@ class IOSWorkflow extends Workflow {
iosValidator
.
addValidator
(
xcodeValidator
);
xcodeValidator
.
addValidator
(
new
Validator
(
'
Version Check
'
,
description:
'Xcode
version is at least
$kXcodeRequiredVersionMajor
.
$kXcodeRequiredVersionMinor
'
,
'
version
'
,
description:
'Xcode
minimum version of
$kXcodeRequiredVersionMajor
.
$kXcodeRequiredVersionMinor
.0
'
,
resolution:
'Download the latest version or update via the Mac App Store'
,
validatorFunction:
_xcodeVersionSatisfactory
));
xcodeValidator
.
addValidator
(
new
Validator
(
'EULA'
,
description:
'XCode end user license agreement'
,
resolution:
"Open XCode or run the command 'sudo xcodebuild -license'"
,
validatorFunction:
_xcodeEulaSigned
));
Validator
brewValidator
=
new
Validator
(
'brew'
,
description:
'install additional development packages'
,
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
16f9e387
...
...
@@ -40,6 +40,23 @@ class XCode {
return
_isInstalled
;
}
/// Has the EULA been signed?
bool
get
eulaSigned
{
if
(!
isInstalled
)
return
false
;
try
{
ProcessResult
result
=
Process
.
runSync
(
'/usr/bin/xcrun'
,
<
String
>[
'clang'
]);
if
(
result
.
stdout
!=
null
&&
result
.
stdout
.
contains
(
'license'
))
return
false
;
if
(
result
.
stderr
!=
null
&&
result
.
stderr
.
contains
(
'license'
))
return
false
;
return
true
;
}
catch
(
error
)
{
return
false
;
}
}
bool
_xcodeVersionSatisfactory
;
bool
get
xcodeVersionSatisfactory
{
if
(
_xcodeVersionSatisfactory
!=
null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment