Skip to content
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

Improve support for bootstrapping a development environment without an active network connection #738

Open
freakboy3742 opened this issue May 11, 2022 · 5 comments
Labels
enhancement New features, or improvements to existing features.

Comments

@freakboy3742
Copy link
Member

freakboy3742 commented May 11, 2022

When you run a briefcase command for the first time, it requires an active network connection, and will download multiple gigabytes of tools. This is particularly bad on macOS/iOS (which require Xcode) and Android (which needs the sdkmanager an associated tools). This is a problem in bandwidth-limited scenarios (like tutorial sessions or conference wifi). It can also be a problem in environments where network access is limited or compromised (e.g., behind aggressive corporate firewalls)

It should be possible to give someone a USB drive populated with files, and bootstrap their briefcase installation.

Describe the solution you'd like

A new command:
briefcase bootstrap <platform> <folder>

will inspect <folder>, and install all the tools needed for <platform>. This may not 100% remove the need for network activity, but it should be possible to dramatically lower the initial bandwidth/time requirement.

A parallel command/option will also be required to create the archive folder in the first place (briefcase bootstrap --create <platform> <folder>?)

Describe alternatives you've considered

No real options, other than requiring an active network connection.

Additional context

Support packages and templates can be copied directly from the source folder; it may be desirable to require them to be stored in zip format.

The Android sdkmanager has support for a --package_file argument that can be used to directly install packages from a zip file. It's not clear

There is likely not much we can do about Xcode, as it can't be distributed outside the App Store.

@freakboy3742 freakboy3742 added enhancement New features, or improvements to existing features. up-for-grabs labels May 11, 2022
@jlgimeno
Copy link

jlgimeno commented Oct 20, 2022

It is possible to download and install the Xcode .xip file if one has an Apple Developer account. I'd say that would be an edge case for the typical briefcase user.

@freakboy3742
Copy link
Member Author

See #388 for an other issue related to offline operation

@mhsmith
Copy link
Member

mhsmith commented Jul 12, 2023

To build offline for Android, as well as sdkmanager packages, you would also need cached copies of all the necessary Gradle plugins and libraries. I think the only feasible way of doing that would be to actually do a build, and then save a copy of the ~/.gradle directory.

@freakboy3742
Copy link
Member Author

The code is open source, so you're of course free to fork if you choose... but is there a reason you've chosen to advertise a fork, rather than contribute a pull request?

I'd be more than happy to review a PR implementing an offline mode, and merge that change if/when it passes review - that's why this is an open feature request on the repo.

@freakboy3742
Copy link
Member Author

For posterity - the fork described here is a non-starter from the perspective of Briefcase as a project. It addresses a very limited subset of bootstrapping, in a way that isn't compatible with the long-term maintenance of Briefcase templates. See the review of the PR for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

3 participants