Skip to content

Support 'flutter build' for desktop targets #30706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stuartmorgan-g opened this issue Apr 8, 2019 · 5 comments
Closed

Support 'flutter build' for desktop targets #30706

stuartmorgan-g opened this issue Apr 8, 2019 · 5 comments
Assignees
Labels
a: desktop Running on desktop platform-linux Building on or for Linux specifically platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@stuartmorgan-g
Copy link
Contributor

Tracks being able to flutter build for macOS, Windows, and Linux.

In the long term this would use the templates created by create (see #30703, #30704, and #30705), but shorter term—and also longer-term to support use cases other than flutter create, such as Add-to-App—it would be good to support pluggable build steps.

@stuartmorgan-g stuartmorgan-g added tool Affects the "flutter" command-line tool. See also t: labels. platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically platform-linux Building on or for Linux specifically a: desktop Running on desktop labels Apr 8, 2019
@stuartmorgan-g
Copy link
Contributor Author

Any support we can provide for this in the short term is very valuable for the workflow of people trying out early stages of the desktop support, since if it's possible to do one-time setup of a pluggable build step, then once the project is set up manually, the edit-build-run/debug cycle in IDEs that support Flutter will work for free.

@stuartmorgan-g
Copy link
Contributor Author

stuartmorgan-g commented May 9, 2019

For macOS, things I'm aware of remaining within the scope of this bug:

  • Eliminate the need for name_output.sh
  • Finalize the copying of resources (e.g., standardizing on putting things in macos/Flutter/)
  • Finalize the name/location(s) of the script(s)/command(s) that Xcode invokes

stuartmorgan-g added a commit to stuartmorgan-g/flutter that referenced this issue May 14, 2019
Instead of requiring a name_output.sh, expect a file called
.app_filename in the macos/Flutter directory containing just the name of
the application. The expectation is that the Xcode build will create
that file with a script.

This is not intended as a long-term solution, but it's a substantial
improvement over name_output.sh:
- name_output.sh required constructing the full build output path; this
  made sense when it was coupled with build.sh, but now that the
  decision for where build output goes lives in flutter_tool, that logic
  should as well.
- Changing the name of the application required also updating
  name_output.sh, which is error-prone. With .app_filename, it can be
  created using $PRODUCT_NAME, which means that the usual way of setting
  the application name will automatically update this flow as well.

Related to flutter#30706
stuartmorgan-g added a commit to stuartmorgan-g/flutter that referenced this issue May 15, 2019
Allows Windows builds to use the same structure and script as Linux
builds now use, calling into tool_backend to manage copying resources to
the project directory and building the bundle.

Part of flutter#30706
stuartmorgan-g added a commit that referenced this issue May 16, 2019
Instead of requiring a name_output.sh, expect a file called
.app_filename in the macos/Flutter directory containing just the name of
the application. The expectation is that the Xcode build will create
that file with a script.

This is not intended as a long-term solution, but it's a substantial
improvement over name_output.sh:
- name_output.sh required constructing the full build output path; this
  made sense when it was coupled with build.sh, but now that the
  decision for where build output goes lives in flutter_tool, that logic
  should as well.
- Changing the name of the application required also updating
  name_output.sh, which is error-prone. With .app_filename, it can be
  created using $PRODUCT_NAME, which means that the usual way of setting
  the application name will automatically update this flow as well.

Part of #30706
kiku-jw pushed a commit to kiku-jw/flutter that referenced this issue Jun 14, 2019
Instead of requiring a name_output.sh, expect a file called
.app_filename in the macos/Flutter directory containing just the name of
the application. The expectation is that the Xcode build will create
that file with a script.

This is not intended as a long-term solution, but it's a substantial
improvement over name_output.sh:
- name_output.sh required constructing the full build output path; this
  made sense when it was coupled with build.sh, but now that the
  decision for where build output goes lives in flutter_tool, that logic
  should as well.
- Changing the name of the application required also updating
  name_output.sh, which is error-prone. With .app_filename, it can be
  created using $PRODUCT_NAME, which means that the usual way of setting
  the application name will automatically update this flow as well.

Part of flutter#30706
@ammaratef45
Copy link

This is essential, I can't rely on a code that can't be built and delivered.

@stuartmorgan-g stuartmorgan-g added this to the Goals milestone Aug 13, 2019
@stuartmorgan-g
Copy link
Contributor Author

I think given the plans around assemble and other related plans, we can just close this now. Originally I was leaving it open until the interactions were finalized, but the current state is that building works on all desktop platforms in an initial state. We'll be doing a lot of incremental changes/improvements, and it makes more sense to track those in individual bugs (which in fact is already happening) rather than a single large bug.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: desktop Running on desktop platform-linux Building on or for Linux specifically platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

3 participants