Soomla Project in JS Binding

Is possible use this project http://project.soom.la/ for inapp in JS Projects?
If yes i should use cxx-generator to generate js wrapper?
My doubt is that android-store project in Soomla is written in Java :confused:

Or i can i use inapp in my JS Games?

Thank you.

Antonio

If yes i should use cxx-generator to generate js wrapper?

Yes, you should use cxx-generator(we renamed it to bindings-generator in the latest code on github).

My doubt is that android-store project in Soomla is written in Java :confused:

You should know how to bind java interface to CPP by using JNI, then use cxx-generator to expose it to js.

In theory the ios module and android module is called by a sample project of cocos2d-x in c*+ and exploring the code there are some interfaces written in c*+ that already use JNI.
I think i should generate the JS Code only for these interfaces and add to classpath the source code of the ios module and android module and the others c++ support classes?
Now i don’t work to this because the game is in initial phases but if i have news on this i’ll write here.
For now thank you :slight_smile:

PS: i think that cocos2d with js bindings is awesome but it’s necessary write API exposed to JS to interact with social network, implement inapp etc. in order to offer a very powerful game engine!

Did you finish the js-binding of soomla?

Works fine?

Soomla created solution for JS-bindings in cocos2d-x. You can find details here: http://blog.soom.la/2014/02/cocos2dx-js-is-here.html and the code here: https://github.com/soomla/cocos2dx-store

1 Like

Hi guys!
Thanks a lot for your great work!

Today I was trying to integrate Soomla to my Cocos2dx JSB project. I did steps from this tutorial: https://github.com/soomla/cocos2dx-store
I did first 5 steps from JS part and then I was trying to compile project and run on my device, but I got following error:

Compile++ thumb  : cocos2djs_shared <= AppDelegate.cpp
jni/../../Classes/AppDelegate.cpp:18:24: fatal error: jsb_soomla.h: No such file or directory compilation terminated.
make: Leaving directory `/Users/tobiasz/Downloads/SOOMLA2/cocos2d-x-2.2.1/projects/SmlTest/proj.android'
make: *** [obj/local/armeabi/objs/cocos2djs_shared/__/__/Classes/AppDelegate.o] Error 1

I use MacBook Air and Cocos2dx 2.2.1. Project was compiled with Eclipse. Project was created with tools/project_creator/create_project.py script with -language javascript flag.

Could you tell me please what I do wrong?
Thanks in advance!
Regards.