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
e4a1913e
Unverified
Commit
e4a1913e
authored
Apr 24, 2019
by
Jonah Williams
Committed by
GitHub
Apr 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support local engine and asset sync for macOS (#31515)
parent
15ba3956
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
macos_build_flutter_assets.sh
packages/flutter_tools/bin/macos_build_flutter_assets.sh
+34
-2
No files found.
packages/flutter_tools/bin/macos_build_flutter_assets.sh
View file @
e4a1913e
...
@@ -5,7 +5,6 @@
...
@@ -5,7 +5,6 @@
# TODO(jonahwilliams): refactor this and xcode_backend.sh into one script
# TODO(jonahwilliams): refactor this and xcode_backend.sh into one script
# once macOS supports the same configuration as iOS.
# once macOS supports the same configuration as iOS.
RunCommand
()
{
RunCommand
()
{
if
[[
-n
"
$VERBOSE_SCRIPT_LOGGING
"
]]
;
then
if
[[
-n
"
$VERBOSE_SCRIPT_LOGGING
"
]]
;
then
echo
"♦
$*
"
echo
"♦
$*
"
...
@@ -40,6 +39,37 @@ if [[ -n "$TRACK_WIDGET_CREATION" ]]; then
...
@@ -40,6 +39,37 @@ if [[ -n "$TRACK_WIDGET_CREATION" ]]; then
track_widget_creation_flag
=
"--track-widget-creation"
track_widget_creation_flag
=
"--track-widget-creation"
fi
fi
# Copy the framework and handle local engine builds.
framework_name
=
"FlutterMacOS.framework"
derived_dir
=
"
${
SOURCE_ROOT
}
/../build/macos/Build/Products/flutter_framework"
framework_path
=
"
${
FLUTTER_ROOT
}
/bin/cache/artifacts/engine/darwin-x64"
flutter_framework
=
"
${
framework_path
}
/
${
framework_name
}
"
if
[[
-n
"
$FLUTTER_ENGINE
"
]]
;
then
flutter_engine_flag
=
"--local-engine-src-path=
${
FLUTTER_ENGINE
}
"
fi
if
[[
-n
"
$LOCAL_ENGINE
"
]]
;
then
if
[[
$(
echo
"
$LOCAL_ENGINE
"
|
tr
"[:upper:]"
"[:lower:]"
)
!=
*
"
$build_mode
"
*
]]
;
then
EchoError
"========================================================================"
EchoError
"ERROR: Requested build with Flutter local engine at '
${
LOCAL_ENGINE
}
'"
EchoError
"This engine is not compatible with FLUTTER_BUILD_MODE: '
${
build_mode
}
'."
EchoError
"You can fix this by updating the LOCAL_ENGINE environment variable, or"
EchoError
"by running:"
EchoError
" flutter build macos --local-engine=host_
${
build_mode
}
"
EchoError
"or"
EchoError
" flutter build macos --local-engine=host_
${
build_mode
}
_unopt"
EchoError
"========================================================================"
exit
-1
fi
local_engine_flag
=
"--local-engine=
${
LOCAL_ENGINE
}
"
flutter_framework
=
"
${
FLUTTER_ENGINE
}
/out/
${
LOCAL_ENGINE
}
/
${
framework_name
}
"
fi
RunCommand
mkdir
-p
--
"
$derived_dir
"
RunCommand
rm
-rf
--
"
${
derived_dir
}
/
${
framework_name
}
"
RunCommand
cp
-Rp
--
"
${
flutter_framework
}
"
"
${
derived_dir
}
"
# Set the build mode
# Set the build mode
build_mode
=
"
$(
echo
"
${
FLUTTER_BUILD_MODE
:-${
CONFIGURATION
}}
"
|
tr
"[:upper:]"
"[:lower:]"
)
"
build_mode
=
"
$(
echo
"
${
FLUTTER_BUILD_MODE
:-${
CONFIGURATION
}}
"
|
tr
"[:upper:]"
"[:lower:]"
)
"
...
@@ -49,4 +79,6 @@ RunCommand "${FLUTTER_ROOT}/bin/flutter" --suppress-analytics \
...
@@ -49,4 +79,6 @@ RunCommand "${FLUTTER_ROOT}/bin/flutter" --suppress-analytics \
--target-platform
=
darwin-x64
\
--target-platform
=
darwin-x64
\
--target
=
"
${
target_path
}
"
\
--target
=
"
${
target_path
}
"
\
--
${
build_mode
}
\
--
${
build_mode
}
\
${
track_widget_creation_flag
}
${
track_widget_creation_flag
}
\
${
flutter_engine_flag
}
\
${
local_engine_flag
}
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