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/iOS build, Scons boilerplate for building projects. #636

Merged
merged 3 commits into from
Feb 10, 2022

Conversation

Faless
Copy link
Contributor

@Faless Faless commented Oct 1, 2021

In this PR:

  • Add SCons support for building library on Android/iOS.
  • Projects can now be built by including the library and using its env so you don't have to worry about platform and toolchain setup.

Convert the project test file to work use the env from the libary.

Build the test with:

scons

Or, if you prefer building the library separately:

scons build_library=no

Follow up on what I proposed in #635

@Faless Faless added enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup topic:gdextension This relates to the new Godot 4 extension implementation labels Oct 1, 2021
@Faless Faless marked this pull request as draft October 1, 2021 16:38
@Faless Faless requested a review from BastiaanOlij October 1, 2021 16:39
@Faless Faless marked this pull request as ready for review October 27, 2021 06:35
@akien-mga akien-mga added this to the 4.0 milestone Oct 27, 2021
@akien-mga
Copy link
Member

akien-mga commented Oct 27, 2021

Looks good to me overall, it's a good cleanup.

We discussed the new build_projects system on Rocket.Chat, here's some feedback (screenshot because copy-paste from RC is terrible :| grmbl modern chat systems, you mean closed silos...)

Screenshot_20211027_154405

I think we can think some more about how we want to do things to support both tests and the usual godot-cpp as submodule in the nicest way possible.

But AFAICT this PR doesn't break existing projects, it just provides a new option to use godot-cpp's SConstruct as the main entry point (needs testing/confirmation though). So this could still be merged and improved later on.

@Faless
Copy link
Contributor Author

Faless commented Feb 10, 2022

Updated based on feedback so projects now can include the library SConstruct (e.g. when it's a submodule) and use the produced env to build sources without having to worry too much about toolchain configuration.

Works by executing project `SConstruct`s file in a cloned env (a bit
like Godot does for modules) so you don't have to worry about platform
and toolchain setup.

Convert the project test file to work as submodule, add it to CI

Run with:

```
scons build_projects=test,/path/to/other/project
```
Copy link
Collaborator

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

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

While I'm not 100% sure if the way the compilation of the test project works is the way around I would like I don't think that issue is important enough or will get in the way of people using the library the way they are now. Being able to compile all platforms and having this code cleaned up far outweighs that concern and we can always improve on it.

So I'm very happy to see these changes finally merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality platform:android platform:ios topic:buildsystem Related to the buildsystem or CI setup topic:gdextension This relates to the new Godot 4 extension implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants