Refactor project to remove need for build.sh#336
Refactor project to remove need for build.sh#336jonahwilliams merged 16 commits intogoogle:masterfrom
Conversation
| runOnlyForDeploymentPostprocessing = 0; | ||
| shellPath = /bin/sh; | ||
| shellScript = "\"$FDE_ROOT\"/tools/build_flutter_assets \"$PROJECT_DIR\"/..\n"; | ||
| shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_build_flutter_assets.sh"; |
There was a problem hiding this comment.
This creates a new requirement that flutter build must be run before the Xcode project will work; that's not an issue for a long-term flutter created version of this, but would be potentially breaking for this project. I think we should check in a Generated.xcconfig with this change that defaults to ../../../flutter to make it work in a clean checkout that uses the suggested layout. (Not perfect, since it won't handle .flutter_location_config, but better than nothing.)
There was a problem hiding this comment.
Putting it together this way it doesn't quite work when i run from Xcode - possibly due to the lack of the OBJROOT, SYMROOT, and derivedData overrides? I might have my setup configured wrong.
There was a problem hiding this comment.
I'll take a look tomorrow and see what's broken. The build output will go somewhere else if you build from Xcode, but I wouldn't expect that to break anything (it's what happens right now with build.sh vs Xcode UI).
There was a problem hiding this comment.
I realized while doing the Windows version that we shouldn't check in a copy of the generated settings, since it needs to be in the .gitignore, so I think we'll just live with needing to use 'fluter build' or 'flutter run' at least once. I can add a note about that to the docs.
stuartmorgan-g
left a comment
There was a problem hiding this comment.
testbed/ should get the same changes—except that we can't switch away from tools/build_fluter_assets until there's local engine support in macos_build_flutter_assets.sh—since the flutter_tools side stops using build.sh.
| runOnlyForDeploymentPostprocessing = 0; | ||
| shellPath = /bin/sh; | ||
| shellScript = "\"$FDE_ROOT\"/tools/build_flutter_assets \"$PROJECT_DIR\"/..\n"; | ||
| shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_build_flutter_assets.sh"; |
There was a problem hiding this comment.
I'll take a look tomorrow and see what's broken. The build output will go somewhere else if you build from Xcode, but I wouldn't expect that to break anything (it's what happens right now with build.sh vs Xcode UI).
…into add_track_widget_creation_flag
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Looks good modulo the comment below, removing Generated.xcconfig and adding it to .gitignore instead, and then duplicating most of this to testbed/
| name = Frameworks; | ||
| sourceTree = "<group>"; | ||
| }; | ||
| D76E93BA226BCA8F00F7932B /* Recovered References */ = { |
There was a problem hiding this comment.
The configs should be referenced in the project, rather than being considered recovered files. Please rename this group in the file tree "Configs", move it up between Resources and Frameworks, and (for ease of inspection) add Generated.xcconfig to that group as well (make sure to uncheck the option to add it to any of the targets)
There was a problem hiding this comment.
We don't reference the Generated.xcconfig in our iOS projects, should this be changed in the templates for those as well?
There was a problem hiding this comment.
It doesn't affect the build in any way, it just means that if you have the project open you can easily inspect all the configs. I find it helpful in general, but if nobody has ever complained it's up to you whether it's worth changing iOS.
…into add_track_widget_creation_flag
…iams/flutter-desktop-embedding into add_track_widget_creation_flag
|
Looks like travis will be red until it uses the latest flutter |
It clones from master; it's red because your other PR hasn't landed... |
example/.gitignore
Outdated
| pubspec.lock | ||
|
|
||
| # Generated by flutter run and flutter build | ||
| Generated.xcconfig |
There was a problem hiding this comment.
This should be in a .gitignore in example/macos (especially since the goal is to make those folders relocatable shortly)
testbed/.gitignore
Outdated
| pubspec.lock | ||
|
|
||
| # generated by flutter run/build | ||
| Generated.xcconfig |
| runOnlyForDeploymentPostprocessing = 0; | ||
| shellPath = /bin/sh; | ||
| shellScript = "\"$FDE_ROOT\"/tools/build_flutter_assets \"$PROJECT_DIR\"/..\n"; | ||
| shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_build_flutter_assets.sh"; |
There was a problem hiding this comment.
Don't change this yet for testbed; that would break the documented (and heavily used by me) local engine workflow.
Later we can make the Flutter scripts support local engine and migrate the workflow and docs to that.
…iams/flutter-desktop-embedding into add_track_widget_creation_flag
stuartmorgan-g
left a comment
There was a problem hiding this comment.
testbed/macos/build.sh should be removed too; otherwise LGTM
Removes indirection by moving the macOS build script to flutter_tools. This still uses the FDE asset syncing. This uses almost the same scheme/flag passing setup as the existing iOS build.
Currently the track-widget-creation flag is still broken though, it seems like some part of the process is using the regular .dill instead of the .track.dill - still investigating.Fixed, need to make sure I referenced config file
See also: flutter/flutter#31329