Open freakboy3742 opened 2 years ago
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.
See #388 for an other issue related to offline operation
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.
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.
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.
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 clearThere is likely not much we can do about Xcode, as it can't be distributed outside the App Store.