cocos2d / cocos2d-console

cocos2d command line tool
152 stars 190 forks source link

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

Closed Volodymyr-13 closed 6 years ago

Volodymyr-13 commented 7 years ago

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:

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

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

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?

Volodymyr-13 commented 7 years ago

Any ideas?

Volodymyr-13 commented 7 years ago

Is there anyone alive?

Volodymyr-13 commented 7 years ago

😟

Volodymyr-13 commented 6 years ago

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

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++ ?

minggo commented 6 years ago

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

Volodymyr-13 commented 6 years ago

@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

minggo commented 6 years ago

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

Volodymyr-13 commented 6 years ago

But where is now who developed this?

minggo commented 6 years ago

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.

Volodymyr-13 commented 6 years ago

@slackmoehrle maybe you can push this here?

slackmoehrle commented 6 years ago

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.

minggo commented 6 years ago

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

Volodymyr-13 commented 6 years ago

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

minggo commented 6 years ago

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

minggo commented 6 years ago

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

Volodymyr-13 commented 6 years ago

@minggo so I will able to run:

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

and get only:

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.

minggo commented 6 years ago

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

Volodymyr-13 commented 6 years ago

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 ?

minggo commented 6 years ago

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

minggo commented 6 years ago

fixed in https://github.com/cocos2d/cocos2d-console/pull/434