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

Effekseer service on Android (precompiled libraries) #589

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PTz0uAH
Copy link

@PTz0uAH PTz0uAH commented Mar 29, 2024

just got Effekseer for Android working so here my non-official integrated service for the build-tool.. now the Example from Kagamma (https://github.com/Kagamma/cge-effekseer) works OOTB :-)

just got Effekseer for Android working so here my non-official integrated service for the build-tool.. now the Example from Kagamma (https://github.com/Kagamma/cge-effekseer) works OOTB :-)
@michaliskambi michaliskambi changed the title Add files via upload Effekseer service on Android (precompiled libraries) Mar 31, 2024
Copy link
Member

@michaliskambi michaliskambi left a comment

Choose a reason for hiding this comment

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

Thank you for contributing!

I'm adding some comments below about things that need addressing before we can merge this. The most important one is "We need to extend these instructions, to make them trivial to repeat and allow everyone to recompile all SO files for Android...". Let me know if my guides there are not enough, I can extend about what is required and how to go about this.

@@ -0,0 +1,43 @@
## libeffekseer (special effects library) for Android

This service adds the `Eeffekseer` library to the Android project, which allows CGE to use particle based eyecandy in effekseer enabled projects.
Copy link
Member

Choose a reason for hiding this comment

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

Typo Eefferseer :)

</project>
----

Or you can request the equivalent on all platforms using `dependencies`:
Copy link
Member

Choose a reason for hiding this comment

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

This section is not true -- <dependency name="effekseer" /> will not work.

We have a few <dependency name="xxx" /> possibilities manually coded to imply some things, like <dependency name="Sound" /> that implies also sound Android service, https://github.com/castle-engine/castle-engine/tree/master/tools/build-tool/data/android/integrated-services/sound . But this is not automatic.

Effekseer for CGE is based on the official libeffekseer code: https://github.com/effekseer/Effekseer
and has its own fork at: https://github.com/castle-engine/Effekseer

To build Effekseer for CGE please read the instructions at: https://github.com/Kagamma/cge-effekseer
Copy link
Member

Choose a reason for hiding this comment

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

  1. We need to extend these instructions, to make them trivial to repeat and allow everyone to recompile all SO files for Android. The reason is that SO libraries need to be recompiled whenever we do some changes in Android integration, bumping platform versions, minimal versions, NDK version -- so it has to be as-straightforward-as-possible to update these libraries.

    Please see how https://github.com/castle-engine/castle-engine/tree/master/tools/build-tool/data/android/integrated-services/freetype describes it:

    Update the library files (SO) like this:
    git clone https://github.com/castle-engine/android-freetype
    cd android-freetype/
    make build

    This is accompanied by https://github.com/castle-engine/android-freetype , our freetype fork, and https://github.com/castle-engine/android-freetype/blob/master/Makefile that automates this process: builds and copies the libraries.

  2. We need libraries also for x86 and x86_64 Android versions, useful in particular with Android emulators that often have x86 / x86_64 CPU (to make them run fast on regular PCs). See all 4 platforms of freetype: https://github.com/castle-engine/castle-engine/tree/master/tools/build-tool/data/android/integrated-services/freetype/app/src/main/jniLibs

Copy link
Author

Choose a reason for hiding this comment

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

I prepped an android dev environment (WSL Debian 12) and the Freetype build procedure is now clear to me..

It produced the binaries for the 4 Android targets in no time..

Compiling Effekseer is somewhat a different league..

It looks a bit more complex.. and the build process differs hugely from the Freetype-build-procedure..

but I'll give it a shot..

Copy link
Author

Choose a reason for hiding this comment

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

Some progress on building libeffekseer on WSL/Debian12..

Yesterday I installed cmake, cloned https://github.com/castle-engine/Effekseer followed the steps from Effekseer- HowToBuild.. created the Makefile with cmake -S . -B . and performed an oldschool make (all) which resulted in a wrapper/libeffekseer.so binary.. I guess the same result would be achieved with a cmake --build .

Next step.. crosscompiling for Android should be a "piece of cake" right?.. (as the Android sdk functions well with the freetype build procedure).. hmm.. missing some cmake files needed for crossbuilding..

Clearly now I have to create 4 cmake toolchain files for the 4 Android targets.. or maybe 1 to suit all..

Have to do some studying now and take notes on behalf of a short android-libeffekseer-cge-howto-help file.. and figure out how cmake works with the Android sdk..

I'll get back to you when that particular information has been processed/ assimilated.. lets hope there aren't any caveats or oddities..

Copy link
Member

Choose a reason for hiding this comment

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

Thank you!!

fixing typo and removed wrong section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants