cocos2d / cocos2d-console

cocos2d command line tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prebuilt libs: able to select language(libcocos2d, libjscocos2d, libluacocos2d, libsimulator)

Volodymyr-13 opened this issue · comments

I'm using prebuilt libs with Xcode. Work really fast and easy to use.
But when I'm updating cocos2d-x from git, each time I need to rebuild them using command:

cocos gen-libs -p ios -p mac

And I get on output, counting all files:

  • libcocos2d Mac.a
  • libjscocos2d Mac.a
  • libluacocos2d Mac.a
  • libsimulator Mac.a
  • libcocos2d iOS.a
  • libjscocos2d iOS.a
  • libluacocos2d iOS.a
  • libsimulator iOS.a

Build time for all this libs is really slow...

Instead I need just only 2 libs which I'm using for my game:

  • libcocos2d Mac.a
  • libcocos2d iOS.a

And I want to save a lot of wasted time for building unused libs.

Can some flag be added to achieve this? I don't know.. just specify build only libcocos2d?

Any ideas?

Is there anyone alive?

Back to this. Actually I'm really hope that this can be done.

  • First of all because my target only: iOS, macOS and android.
  • Second, it's should dramatically decrease built time.

It's useless to compile code and libs which I will never use!

@dumganhar @minggo Any ideas?

Also, I don't understand what is libsimulator Mac.a and libsimulator iOS.a?
I'm sucessfully develop and run my game on iOS devices, iOS simulators and macOS with just these two:

screen shot

So, what about something like: cocos gen-libs -p ios -p mac -lang c++ ?

Currently, it is not supported. We may improve it, but it is low priority.

@minggo It’s hard to implement? Can you provide a starting point like a basic example of modification to console how would you make it? I’ll just maybe can do it.. continue

I am not sure, the codes are not implemented by me. I have to look into the codes too.

But where is now who developed this?

The guys left to developing games, i takes over it. But i don't have time to look into all the details. I always look into the codes to fix issues.

@slackmoehrle maybe you can push this here?

Currently @minggo is busy working on v3.17, adding parameters to gen-libs won't be on the top of his list. What I can do is let out superiors know that this feature is being asked for in my next meeting with them. Thank you for reminding us about this.

@KAMIKAZEUA why you need to rebuild all libs every time?

@minggo In first post I described all and said when it’s rebuilt.

Oh, sorry, i misunderstood that you have to rebuild 3rd party libraries.

i will do it after i update 3rd party libraries with clang + libc++ and remove proj.android.

@minggo so I will able to run:

cocos gen-libs -p ios -p mac -lang c++

and get only:

  • libcocos2d Mac.a
  • libcocos2d iOS.a

And compilation time will be significantly decreased, because all that unused code will not be compiled? Unused:

libjscocos2d Mac.a
libluacocos2d Mac.a
libsimulator Mac.a
libjscocos2d iOS.a
libluacocos2d iOS.a
libsimulator iOS.a

Also, what is libsimulator Mac.a and libsimulator iOS.a ? How it suposed to be used? It's like not needed really, I'm using only libcocos2d Mac.a and libcocos2d iOS.a for my development.

libsimulator is used for code editor and cocos studio. I think it is not needed now, but i have to make sure.

Ok, this is answer only for last part of my question. But what about that command to build just for iOS & Mac and don't build for libjs, liblua and libsimulator ?

yep, that's the task for this issue, add an option for language

fixed in #434