Skip to content

ios and android support #298

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

Closed
wants to merge 11 commits into from

Conversation

piiertho
Copy link
Contributor

@piiertho piiertho commented May 25, 2019

This enable to build on android and ios.
I was using Arguments on my side instead of the opts variable. Maybe you'd like to change this.
This is focus on arm and arm64 on android.
I did not added iphone sdk version as parameter, this can be an improvement.

Pierre-Thomas Meisels added 5 commits May 25, 2019 08:26
This add android build support in scons and travis.
This is focused on arm and arm64.
This solves godotengine#149.
This adds iOS support in scons and travis.yml
Fix travis build for android.
@piiertho piiertho changed the title I os and android support ios and android support May 25, 2019
@piiertho
Copy link
Contributor Author

Errors in travis-ci for android, I correct this soon.

@piiertho piiertho force-pushed the iOSAndAndroidSupport branch from b190047 to 47665dc Compare May 27, 2019 13:11
@piiertho piiertho mentioned this pull request May 28, 2019
@piiertho piiertho force-pushed the iOSAndAndroidSupport branch from 9a9baca to 9b988d6 Compare May 28, 2019 15:35
@piiertho piiertho force-pushed the iOSAndAndroidSupport branch from 9b988d6 to 21c3670 Compare May 28, 2019 15:37
Copy link
Contributor

@karroffel karroffel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! 💙 I have no idea about Android or iOS stuff, but I left a comment on the CI setup.

@piiertho
Copy link
Contributor Author

piiertho commented May 30, 2019

Hi ! You're right for ci. And my last commit does not speed up Travis. I'll revert it tomorrow.
I also should unify arch and android_abi arguments I think.

Pierre-Thomas Meisels added 3 commits May 31, 2019 18:19
…is build takes less time."

This reverts commit e33177d.
…ents

abi is selected with arch and bits
arch is included into generated binary name, so that we can have binary for arm linux in future (as example)
Copy link
Contributor Author

@piiertho piiertho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there, ready for review, I moved android_abi parameter to a composition of arch and bits.
Travis CI is ok. Maybe it should be a good idea to deploy godot-cpp binaries automatically using travis deploy ? This would avoid long ci build time for GDNative like we can have here.

@karroffel
Copy link
Contributor

cc @BastiaanOlij

@undeton
Copy link

undeton commented Jun 5, 2019

Hi! I saw you added android support but how i can build it. Can you make a tutorial ?

@piiertho
Copy link
Contributor Author

piiertho commented Jun 6, 2019

Hi @undeton ,
There is few lines in the README on how to compile for android.
Do you mean a tutorial including building your own gdnative ?
I would probably write one as soon as I have time. For the moment you can get inspired of my team's fmod gdnative repo. The redme explain how to build on android and ios. Just be aware that for now, this repo is still using android-abi, you should use a composition of bits and arch to get the desired abi.

@BastiaanOlij
Copy link
Collaborator

@karroffel it would be good if we could entice endragor to have a look at iOS. I haven't used GDNative at all on iOS yet and he's got experience with it.

I need to find time to do some testing on Android. I'll ask Fredia if he can have a glance at this as well. He just moved a lot of the work to CMAKE for our Oculus Go/Quest module

@BastiaanOlij BastiaanOlij added the enhancement This is an enhancement on the current functionality label Jun 15, 2019
@piiertho
Copy link
Contributor Author

piiertho commented Jun 15, 2019

On iOS, I had to manually add dependencies of gdnative in xcode project after exporting, I will post a screenshot as soon as I get back to my computer.

EDIT :

Here is a screenshot for ios:
image
I had to add statics libraries to xcode project to make it working.
Don't know if it would be difficult to modulate ios export template so that it takes care of loaded GDNatives, and add statics libraries to xcode project.

@piiertho
Copy link
Contributor Author

piiertho commented Jul 11, 2019

I guess we have a problem with the generated ios binairies, I got a 180 Mo static library, what is not compatible with app store.

Edit : Since 3.1.1 I cannot run app on iOS as soon as there is a gdnative. I opened an issue on engine repo : godotengine/godot#30518

@piiertho
Copy link
Contributor Author

piiertho commented Sep 19, 2019

Hi ! What about the merge of this request ? We have no news for iOS, but pr is ok on Android and travis ci is ok. I'd like it to be merged so that I can use main repo for my projects, like this one. @BastiaanOlij said it is ok for android but we have no news of iOS. It seems 3.1.1 is causing bugs when linking that was not present in 3.1, si I think it is not related to gdnative repo but to Godot itself.

@ryancheung
Copy link

This PR is great. GDNative should support compiling to static libraries for some platforms that not allowed to use dynamic libs, like iOS and game console platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archived enhancement This is an enhancement on the current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants