[Quick-COCOS2D-X 3.3 How to bind a custom class to Lua II] Create a project in the preparation environment, quick-cocos2d-xlua
See [How to bind a custom class to one of Lua in Quick-COCOS2D-X 3.3] environment setup, presumably your environment is ready.
In [How to bind a custom class to one of Lua in Quick-COCOS2D-X 3.3] environment setup, why the last step is to complete the binding C ++ to Lua script in the Quick engine?
The reason is that the engine helped us set up a series of environments for binding existing class files to the engine, but we cannot develop our project in the source template of the engine, instead, we use engine templates to create our own independent new projects. When we create our own new projects, we know that new projects will be from the source template engine, copy some of the engine components that may be used to a new project (such as the engine source code and some lib libraries), but some components won't be copied. We will encounter this problem later.
Next, we need to create a Quick-COCOS2D-X 3.3 project. You need to find the relevant information to create the project (in fact, this is very easy ). As you can see, I create a Quick project in the "F: \ Cocos2dx-Lua \ Garfield" directory. And go to F: \ Cocos2dx-Lua \ Garfield \ frameworks \ cocos2d-x \ tools \ tolua ". We also see the binding script "genbindings. py. Let's take a look."Dos2unix is not an internal or external command...".
If you have encountered the following problem, which exactly explains what I mentioned above,"The new project will copy some of the engine components that may be used to the new project (such as the engine source code and some lib libraries), but some components will not be copied."When creating a new project, mongodos2unix.exe" is not copied to our new project. Don't worry, there is a solution! The path from quicksource engine to the created Project is similar to that of dos2unix.exe.
This is the location of the engine.
This is the target project (currently we have not found dos2unix.exe ")
After the copy is complete, Run "genbindings. py" again ". Execute the binding script perfectly! You have completed the second important step. Make sure that the environment for binding scripts is correct for your new project!
Next, let's take the third step!