firebelley / godot-export

Automatically exports your Godot games.
MIT License
459 stars 53 forks source link

Add command-line option to install android template #111

Open Malcolmnixon opened 1 year ago

Malcolmnixon commented 1 year ago

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. https://github.com/godotengine/godot/pull/50264, https://github.com/godotengine/godot/pull/63389, and https://github.com/godotengine/godot/pull/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 commented 1 year ago

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?

Malcolmnixon commented 1 year ago

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 https://github.com/GodotVR/godot-xr-template/issues/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 commented 1 year ago

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

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 commented 2 months ago

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: