Comments (8)
Just tested on axmol 2.1.4 and the problem persists.
from axmol.
I don't know how packages work in Xcode, but if they integrate into your Xcode project, then they will be gone the next time Xcode project is regenerated (e.g. after adding new source files, etc). This is not how Axmol workflow works. You should treat generated Xcode project as "readonly". You'll probably want to look into something that can be integrated from command line like CocoaPods.
from axmol.
Oh...
So it's not like the XCode project Cocos2d-x made where I edited it directly?
from axmol.
So it's not like the XCode project Cocos2d-x made where I edited it directly?
Cocos2d-x v3.17+ and V4 both use cmake, which generate the Xcode project, and Axmol also uses the cmake build system, so nothing has changed in that regard. If you're referring to v2 of Cocos2d-x. then yes, a lot has changed. Anything you want to add to the Xcode project would need to be done via cmake or CocoaPods.
The ASN1Swift
project you linked has an example of how to add it via CocoaPods.
from axmol.
To expand on this: yes, you should not edit Xcode project directly, and do not add it to your source control. Basically, you want to have an easy runnable two steps setup:
- Generate Xcode project -
axmol build -p ios -a arm64 -c
or similar. - Modify Xcode project - your custom automated step that makes the changes to the Xcode project. This could be done using CocoaPods or something else.
I was a bit wrong to say "treat generated Xcode project as "readonly"". You can certainly modify it, but it must be automated, cause you will lose changes the second that you modify CMake files, or CMake runs ZERO_CHECK
task for some reason. It also hardcodes paths, so you would not be able to build that project on another machine, or if you moved your project to another folder.
Also, be aware that if you're running build in Xcode after editing CMake files (or if CMake reruns ZERO_CHECK
task for some other reason), then Xcode project will be regenerated during the build, and Xcode will notice it and it will cancel the build to reload it. Then you need to execute your step 2, since your Xcode project changes will be gone, and then restart the build.
from axmol.
So it's not like the XCode project Cocos2d-x made where I edited it directly?
Cocos2d-x v3.17+ and V4 both use cmake, which generate the Xcode project, and Axmol also uses the cmake build system, so nothing has changed in that regard. If you're referring to v2 of Cocos2d-x. then yes, a lot has changed. Anything you want to add to the Xcode project would need to be done via cmake or CocoaPods.
The
ASN1Swift
project you linked has an example of how to add it via CocoaPods.
I am working with cocos 3.10 which created an XCode project when I created the project and I've been working on it directly all the time and it worked fine. I thought I could do the same with axmol.
from axmol.
To expand on this: yes, you should not edit Xcode project directly, and do not add it to your source control. Basically, you want to have an easy runnable two steps setup:
1. Generate Xcode project - `axmol build -p ios -a arm64 -c` or similar. 2. Modify Xcode project - your custom _automated_ step that makes the changes to the Xcode project. This could be done using CocoaPods or something else.
I was a bit wrong to say "treat generated Xcode project as "readonly"". You can certainly modify it, but it must be automated, cause you will lose changes the second that you modify CMake files, or CMake runs
ZERO_CHECK
task for some reason. It also hardcodes paths, so you would not be able to build that project on another machine, or if you moved your project to another folder.Also, be aware that if you're running build in Xcode after editing CMake files (or if CMake reruns
ZERO_CHECK
task for some other reason), then Xcode project will be regenerated during the build, and Xcode will notice it and it will cancel the build to reload it. Then you need to execute your step 2, since your Xcode project changes will be gone, and then restart the build.
I have never worked directly with CMake. I created my project with cocos 3.10 and it created an XCode project and I've done all my work through XCode and it worked great.
Is there a way to work with axmol the same way?
from axmol.
I am working with cocos 3.10 which created an XCode project when I created the project and I've been working on it directly all the time and it worked fine. I thought I could do the same with axmol.
When the cmake build system was added to Cocos2d-x v3, the intention was never to use it in the way you are describing, and you would not be doing yourself any favors by attempting to continue working in this way. The fact that it worked without issues is purely by chance.
Embracing the cmake build system should make things simpler and less time consuming, especially if you wish to support multiple platforms for your application.
@halx99 I feel that this should be moved to the discussion section, since it's not an issue with Axmol.
from axmol.
Related Issues (20)
- HttpClient释放response指针异常
- FontFreeType performance issues on Android HOT 2
- UITest.json source HOT 3
- Node:getChildren()性能问题 HOT 6
- Unknow function "setTargetFlags" & "ax::RenderTargetFlag" in Live2D extensions
- Font Issue with Emojis & Emoticons HOT 2
- TextureCache::addImage should be return when textures found.
- checkReallySupportsASTC does not work on ios device HOT 6
- 执行csb文件,打开界面慢 HOT 8
- MediaPlayer Video not correctly rendered for Android (Galaxy S22 Ultra)
- Incorrect output when using custom shaders HOT 6
- Incorrect child widget positions when using normalized positioning HOT 6
- `Sprite::setPolygonInfo()` doesn't set content size HOT 4
- The MediaPlayer controller widgets position incorrect after commit 4011 HOT 6
- Android - Wrong FPS/update on high rate devices HOT 10
- Deprecation policy HOT 1
- ZipUtils class - How to use it (need examples) HOT 3
- DrawNode graphical artifacts HOT 16
- MacBook Pro Fullscreen resolution issues
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axmol.