I created a venture (cocos2dx v4 cpp) within the desktop folder of my Mac. It really works tremendous and I’m able to construct the Xcode venture utilizing the command line.
But when I copy the folder to a different location it now not builds because it appears to reference the desktop folder.
What file does one have to replace in order that the venture is moveable and might be copied to another listing?
Keep away from copying the folder, however when you do, delete the construct folder, and re-generate it with CMake.
Spot on, it may be a ache. I’ve points the place if I modify the CMAKE file then Xcode moans and I’ve to do some little bit of setup once more.
That’s essentially the most irritating factor about Xcode, particularly the part on auto-signing the output as soon as it’s constructed, as a result of there doesn’t appear to be a solution to deal with it by way of CMake (and never a problem with CMake, however with XCode). Any time the venture is re-created, that part needs to be set manually once more.
Okay, I’ll attempt that.Thanks
Which part? There may be one other submit that describes the best way to edit the CMake so some issues don’t have to be set in Xcode many times…. I’m not testing on gadget at current, however as quickly as I construct with cmake I can run in Xcode with out altering something in Xcode
The part relating to provisioning profiles, as described on this article: https://www.testdevlab.com/weblog/2019/07/24/xcode-provisioning-profile-automation-for-ci/
That article has some good data as effectively that ought to assist you with Xcode and CMake.
I do know proper, alas it’s the builders journey.
I’ve a brand new query now. What occurs if a number of builders are engaged on a venture then?
- One resolution is to simply test within the supply code information (lessons, android, iOS.mac and so forth). However then establishing a brand new setting turns into tedious.
As a result of on every builders machine, the laborious drive title, path to improvement setting and so forth could also be completely different.
Good day I’ve this similar challenge I copied the venture to a distinct path, how would I “re-generate it with CMake” is there directions for this ?
It merely implies that you re-run the identical cmake command you initially used to generate the construct information.
It’s finest to delete the construct folder previous to transferring or copying the venture supply to completely different path, and simply re-create the construct information with cmake.
If for some unusual cause you don’t need to delete the construct information, then the least you could possibly do is delete the
[build folder]CMakeCache.txt file, after which re-run the identical cmake command you initially used to generate the venture.
I don’t bear in mind operating a cmake command I simply used this command once I created my venture
“cocos new MyGame -p com.MyCompany.MyGame -l cpp -d ~/MyCompany” after which constructed it everytime from android studio or xcode
Additionally does the CMakeCache.txt file get regenerated ?
Android Studio routinely runs cmake for you inside the IDE, and generates the related construct information.
Xcode does not generate the construct information for you, so I’m unsure the way you managed to construct the venture with no legitimate Xcode venture file that was generated by cmake.
That file is generated by cmake, and is positioned within the construct folder.
All the knowledge is right here: https://github.com/cocos2d/cocos2d-x/tree/v4/cmake
There ought to be loads of posts on this discussion board about cmake and Cocos2d-x v3/v4 as effectively.
Okay thanks I’ll test it out !