Build QML Box2D Library: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
m (Wieland moved page Build-QML-Box2D-Library to Build QML Box2D Library: underscores)
m (fixed typo: 'lt;' to '<')
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}
[[Category:Build]]
 
{{LangSwitch}}
# Download QML-Box2d source from this link [https://gitorious.org/qml-box2d Gitorious QML Box2D.]
# Download QML-Box2d source from this link [https://github.com/qml-box2d/qml-box2d Github QML Box2D.]
# Move it to '''<Path to QtSDK><version>lt;gcc(or)mingw>, if you want to build Box2D applications for Desktop. For example this path was like this in my desktop''' /home/<my_user_name>/QtSDK/Desktop/Qt/4.8.1/gcc/imports*. If you want to develop it for other platform, such as Symbian, move it to *<Path to QtSDK><version>.
# Move it to '''<Path to QtSDK><version><gcc(or)mingw>, if you want to build [[Box2D]] applications for Desktop. For example this path was like this in my desktop''' /home/<my_user_name>/QtSDK/Desktop/Qt/4.8.1/gcc/imports*. If you want to develop it for other platform, such as Symbian, move it to *<Path to QtSDK><version>.
# Now extract the compressed file and rename the folder as '''Box2D'''.
# Now extract the compressed file and rename the folder as '''Box2D'''.
'''''' If you look into the imports folder you will notice that the folders are named as we use it in the '''import''' statement. For eg. '''import''' '''Qt.labs.folderlistmodel 1.0'''.
If you look into the imports folder you will notice that the folders are named as we use it in the '''import''' statement. For eg. '''import''' '''Qt.labs.folderlistmodel 1.0'''.
'''''' Look at the appropriate case as in the folder names.
Look at the appropriate case as in the folder names.
'''''' Also notice there is no '''libBox2D.so''' file, that is the file which we are going to build.
Also notice there is no '''libBox2D.so''' file, that is the file which we are going to build.
# Now open Qt creator.
# Now open Qt creator.
# Select File -> Open Project.
# Select File -> Open Project.
Line 18: Line 18:
# This means you can use Box2D in your QML projects like using any other plugin,for e.g. '''FolderListModel'''.
# This means you can use Box2D in your QML projects like using any other plugin,for e.g. '''FolderListModel'''.
# Explore the projects in Box2D '''examples''' folder. You can run the examples using command '''qmlviewer example_folder_name.qml'''.
# Explore the projects in Box2D '''examples''' folder. You can run the examples using command '''qmlviewer example_folder_name.qml'''.
== Side Note: ==

Latest revision as of 10:29, 19 December 2017

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

  1. Download QML-Box2d source from this link Github QML Box2D.
  2. Move it to <Path to QtSDK><version><gcc(or)mingw>, if you want to build Box2D applications for Desktop. For example this path was like this in my desktop /home/<my_user_name>/QtSDK/Desktop/Qt/4.8.1/gcc/imports*. If you want to develop it for other platform, such as Symbian, move it to *<Path to QtSDK><version>.
  3. Now extract the compressed file and rename the folder as Box2D.

If you look into the imports folder you will notice that the folders are named as we use it in the import statement. For eg. import Qt.labs.folderlistmodel 1.0. Look at the appropriate case as in the folder names. Also notice there is no libBox2D.so file, that is the file which we are going to build.

  1. Now open Qt creator.
  2. Select File -> Open Project.
  3. Move to the Box2d in the open project dialogue box and select the box2d.pro file.
  4. Now the Qt creator will open the project, in the same way it opens any other Qt project.
  5. Now select Projects in the left pane and select Build on the top.
  6. Under the Qt Version select appropriate Qt version such as Desktop Qt <version> for GCC (Qt SDK) Release.
  7. Now select Edit on the left pane and select Build.
  8. This will build your Box2D plugin for QML.
  9. Now goto the Box2D source folder (the one you downloaded and building) and look. There will be a libBox2D.so file.
  10. This means you can use Box2D in your QML projects like using any other plugin,for e.g. FolderListModel.
  11. Explore the projects in Box2D examples folder. You can run the examples using command qmlviewer example_folder_name.qml.