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
abbb66ad
Unverified
Commit
abbb66ad
authored
Apr 23, 2019
by
Jonah Williams
Committed by
GitHub
Apr 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set SYMROOT as absolute in Generated.xcconfig for macOS (#31451)
parent
ac7f8757
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
xcodeproj.dart
packages/flutter_tools/lib/src/ios/xcodeproj.dart
+9
-1
build_macos.dart
packages/flutter_tools/lib/src/macos/build_macos.dart
+7
-5
No files found.
packages/flutter_tools/lib/src/ios/xcodeproj.dart
View file @
abbb66ad
...
...
@@ -37,6 +37,9 @@ String flutterMacOSFrameworkDir(BuildMode mode) {
/// useMacOSConfig: Optional parameter that controls whether we use the macOS
/// project file instead. Defaults to false.
///
/// symrootOverride: Optional parameter to specifify the symroot instead of
/// the default relative path.
///
/// targetOverride: Optional parameter, if null or unspecified the default value
/// from xcode_backend.sh is used 'lib/main.dart'.
Future
<
void
>
updateGeneratedXcodeProperties
({
...
...
@@ -44,6 +47,7 @@ Future<void> updateGeneratedXcodeProperties({
@required
BuildInfo
buildInfo
,
String
targetOverride
,
bool
useMacOSConfig
=
false
,
String
symrootOverride
,
})
async
{
final
StringBuffer
localsBuffer
=
StringBuffer
();
...
...
@@ -65,7 +69,11 @@ Future<void> updateGeneratedXcodeProperties({
final
String
buildDirectory
=
useMacOSConfig
?
getMacOSBuildDirectory
()
:
getIosBuildDirectory
();
localsBuffer
.
writeln
(
'SYMROOT=
\
${SOURCE_ROOT}
/../
$buildDirectory
'
);
if
(
symrootOverride
!=
null
)
{
localsBuffer
.
writeln
(
'SYMROOT=
$symrootOverride
'
);
}
else
{
localsBuffer
.
writeln
(
'SYMROOT=
\
${SOURCE_ROOT}
/../
$buildDirectory
'
);
}
if
(!
project
.
isModule
)
{
// For module projects we do not want to write the FLUTTER_FRAMEWORK_DIR
...
...
packages/flutter_tools/lib/src/macos/build_macos.dart
View file @
abbb66ad
...
...
@@ -17,21 +17,23 @@ import '../project.dart';
// TODO(jonahwilliams): support target option.
// TODO(jonahwilliams): refactor to share code with the existing iOS code.
Future
<
void
>
buildMacOS
(
FlutterProject
flutterProject
,
BuildInfo
buildInfo
)
async
{
final
Directory
flutterBuildDir
=
fs
.
directory
(
getMacOSBuildDirectory
());
final
String
symrootOverride
=
fs
.
path
.
join
(
flutterBuildDir
.
absolute
.
path
,
'Build'
,
'Products'
);
if
(!
flutterBuildDir
.
existsSync
())
{
flutterBuildDir
.
createSync
(
recursive:
true
);
}
// Write configuration to an xconfig file in a standard location.
await
updateGeneratedXcodeProperties
(
project:
flutterProject
,
buildInfo:
buildInfo
,
useMacOSConfig:
true
,
symrootOverride:
symrootOverride
,
);
// Set debug or release mode.
String
config
=
'Debug'
;
if
(
buildInfo
.
isRelease
)
{
config
=
'Release'
;
}
final
Directory
flutterBuildDir
=
fs
.
directory
(
getMacOSBuildDirectory
());
if
(!
flutterBuildDir
.
existsSync
())
{
flutterBuildDir
.
createSync
(
recursive:
true
);
}
// Run build script provided by application.
final
Process
process
=
await
processManager
.
start
(<
String
>[
'/usr/bin/env'
,
...
...
@@ -42,7 +44,7 @@ Future<void> buildMacOS(FlutterProject flutterProject, BuildInfo buildInfo) asyn
'-scheme'
,
'Runner'
,
'-derivedDataPath'
,
flutterBuildDir
.
absolute
.
path
,
'OBJROOT=
${fs.path.join(flutterBuildDir.absolute.path, 'Build', 'Intermediates.noindex')}
'
,
'SYMROOT=
$
{fs.path.join(flutterBuildDir.absolute.path, 'Build', 'Products')}
'
,
'SYMROOT=
$
symrootOverride
'
,
],
runInShell:
true
);
final
Status
status
=
logger
.
startProgress
(
'Building macOS application...'
,
...
...
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