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

Android export: Add setting for custom source ZIP for custom builds #36728

Closed
akien-mga opened this issue Mar 2, 2020 · 9 comments · Fixed by #50481
Closed

Android export: Add setting for custom source ZIP for custom builds #36728

akien-mga opened this issue Mar 2, 2020 · 9 comments · Fixed by #50481

Comments

@akien-mga
Copy link
Member

akien-mga commented Mar 2, 2020

Godot version:
3.2-stable, master (e2b66ca)

OS/device including version:
Exporting to Android from any device.

Issue description:
The Android export preset has settings for "Custom Templates", both Release and Debug, like other platforms:
Screenshot_20200302_145530

But since 3.2, there's also an android_source.zip source ZIP that is used when "Custom Build" is enabled. There's no way to specify a path to a custom source ZIP currently to used with the custom debug and release templates.

Steps to reproduce:

  • Build custom Android template
  • Try to use it with the Custom Build workflow. You are forced to copy release, debug and source custom templates to ~/.local/share/godot/templates/<version>/ or equivalent.

CC @godotengine/android

@TheMagnat
Copy link

Hello,
My friend and I want to try to take care of this, if no one is already on it.
If anyone has an idea for where to start, don't hesitate!

@m4gr3d
Copy link
Contributor

m4gr3d commented Mar 19, 2020

@TheMagnat feel free to take a crack at it. The menu in the screenshot is populated from the export.cpp file so that would be a good place to get started.

@horneac
Copy link

horneac commented Apr 3, 2020

Hello,
I'm a beginner and I wanted to try my shot at this for my first contribution since I saw there was still no pull request for this.
But, after I managed to add an entry for specifying the path and checking that path besides the default one, I found out that it isn't used anywhere, because for a custom build it already asks to install that build in the project and as I see it the check for the custom template path should be removed as it isn't used (as apposed to adding a way to specify that path as specified in the issue).

I worked on commit b383484 (Merge pull request #37421 from akien-mga/python-format-black )

Is this right? if so, can I delete that check and make a pull request for it?

@SkyLucilfer
Copy link
Contributor

@akien-mga Just to make sure, you want it to be possible to specify the location of an android_source.zip?
Then when we click "Install Android Build Template..." in the Project menu, the specified source ZIP will be used to set up the project for custom Android builds ( by installing the source ZIP to res://android/build )

@akien-mga
Copy link
Member Author

Yeah that's the idea. It would likely be custom_template/source after custom_template/release.

@SkyLucilfer
Copy link
Contributor

SkyLucilfer commented Apr 19, 2020

@akien-mga
It might be better to specify the location of the custom source ZIP when we click "Install Android Build Template..." instead of specifying it in an Android export preset?

If we specify it in an Android export preset, there can be multiple Android export presets, each specifying a different custom source ZIP. "Install Android Build Template..." will not know which custom source ZIP to use then. We could use the first occurence, but I think it's bad.. Eventually all Android export presets will use the custom build template in "res://android/build" too ( after we install it ), so no need to have a custom source ZIP for each.

I might be mistaken. What do you think?

@edoblette
Copy link

Hi, my collegue @TheMagnat and myself are working on this issue, what label should we display for the Android Build Template file picker ?

@TheMagnat
Copy link

We've edited the export.cpp file to now have a field to specify a path to the android_souce.zip file.
If the path is empty it will use the default android_source.zip template file.
This is for export.cpp but now we have to deal with the installation of the template in ress/android/build. I figured out that this is done in the export_template_manager.cpp file,
but in this file, it uses the default template path.
First I would like to know if you think that we are on the right path and if so, if there is a way to access the path filled in one of the parameters of the EditorExportPreset (in the export.cpp file, a new option we added to specify the android_source.zip path).
Here is our fork of the project with the edits we've done for the moment.

@akien-mga
Copy link
Member Author

Fixed by #50481.

@akien-mga akien-mga added this to the 3.4 milestone Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants