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

Add command-line option to install android template #111

Open
Malcolmnixon opened this issue May 1, 2023 · 4 comments
Open

Add command-line option to install android template #111

Malcolmnixon opened this issue May 1, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Malcolmnixon
Copy link

Currently Godot has no command-line option for installing the Android Build Template other than launching the editor and manually triggering the project menu item; however there have been numerous pull requests (e.g. godotengine/godot#50264, godotengine/godot#63389, and godotengine/godot#63408) to add the option.

The current documented workaround is to manually extract android_source.zip (embedded in the export_templates.tpz) into the projects /android/build folder - this is the only thing the "Install Android Build Template..." menu item actually performs.

Eventually when one of these pull requests goes in (I believe now scheduled for 4.1) the godot-export action will need a command-line option to trigger the installation; however it's possible to implement it now using the same workaround of manually extracting the android sources.

@firebelley
Copy link
Owner

Hello! Thanks for opening this issue. If I understand correctly, it should be possible to do the workaround as a step in your GitHub workflow before running this action. Is that correct?

@firebelley firebelley self-assigned this May 1, 2023
@firebelley firebelley added the enhancement New feature or request label May 1, 2023
@Malcolmnixon
Copy link
Author

I plan on testing the workaround (downloading the same tpz file, then extracting the android_source.zip, then extracting it to the projects android/build folder) as an experiment this evening.

I'm working on GodotVR/godot-xr-template#13 which is adding CI building to the standard VR template project - so that everyone starting from the template gets CI building in their pipeline.

@Malcolmnixon
Copy link
Author

It's not quite as simple as extracting the android_source.zip. There are a few other activities performed by godot, including:

  • adding an android/build/.gdignore file to avoid scanning
  • adding an android/.build_version containing the version of godot used to extract the source

The first file isn't overly important, but may prevent bundling unnecessary files in the installer.
The second file is used to verify the template and godot versions match. If it's not there then the build fails.

@elmajime
Copy link

elmajime commented Apr 13, 2024

Hi @Malcolmnixon, do you have a working prototype for the automation of the export template installation ?
I'm working on the ARCore extension and just lost half a day because I just forgot to update the template that is in the project's android folder...

I have a script that automates all the process in Godot's repository but nothing to update my demo project yet...

But currently you have to:

  • build the godot android template
  • copy them into the \AppData\Roaming\Godot\export_templates\4.2.stable or similar
  • delete the content of your projects' android folder
  • re-open Godot with your project
  • install the android export template

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

No branches or pull requests

3 participants