https://wiki.archlinux.org/api.php?action=feedcontributions&user=Zropein&feedformat=atomArchWiki - User contributions [en]2024-03-28T16:58:33ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Cocos2D-X&diff=439997Cocos2D-X2016-07-05T17:26:21Z<p>Zropein: Added 'Disable sending usage data' setting.</p>
<hr />
<div>[[Category:Gaming]]<br />
[[ja:Cocos2D-X]]<br />
Cocos2D-X is a high-performance cross platform 2D/3D game engine that supports multiple platforms such as iOS, Android, WinXP/7/8, WP8, BlackBerry, MeeGo, Marmelade, WebOS, Mac OS X. This page will focus entirely on properly configuring this package for initial usage. For other documentation, click [[#See also|here]].<br />
<br />
==Installation==<br />
<br />
Install {{AUR|cocos2d-x-src}} from the [[Arch User Repository]].<br />
<br />
==Configuration==<br />
<br />
===PATH Environment Variable===<br />
<br />
After installation, add {{ic|/opt/cocos2d-x/tools/cocos2d-console/bin}}, and {{ic|/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package}} to your '''PATH''' environment variable mostly to run the {{ic|cocos}} python2 script to create projects, and also run {{ic|sdkbox}} respectively. Add the following to your respective shell configuration file ('''~/.bashprofile''', '''~/.zshenv''', etc):<br />
<br />
export PATH=/opt/cocos2d-x/tools/cocos2d-console/bin:/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package:${PATH}<br />
<br />
===Python Scripts Workaround===<br />
<br />
Since some Cocos2D-X scripts use {{ic|python2}} instead of {{ic|python3}}, like {{ic|sdkbox}}, simply calling {{ic|python2 foo.pyc}} will not suffice since other modules will be called with "env python" which could point to python3. To fix this, read [[python#Dealing_with_version_problem_in_build_scripts|here]]. Don't forget to add {{ic|/usr/local/bin}}, or whichever directory the workaround shell script is installed at, before {{ic|/usr/bin}} in your PATH environment variable. The following should suffice:<br />
<br />
export PATH=/usr/local/bin:${PATH}<br />
<br />
Here's an example shell script workaround:<br />
<br />
{{hc|1=/usr/local/bin/python|2=<br />
<nowiki><br />
#!/bin/bash<br />
script=$(readlink -f -- "$1")<br />
case "$script" in (/opt/cocos2d-x/*|/path/to/project1/*|/path/to/project2/*|/path/to/project3/*)<br />
exec python2 "$@"<br />
esac<br />
<br />
exec python3 "$@"<br />
</nowiki><br />
}}<br />
<br />
===Disable sending usage data===<br />
<br />
Sending the usage data can be disabled setting {{ic|enable_stat}} to {{ic|false}} in {{ic|/opt/cocos2d-x/tools/cocos2d-console/bin/cocos2d.ini}}:<br />
<br />
# sed -e 's/enable_stat=.*/enable_stat=false/g' -i /opt/cocos2d-x/tools/cocos2d-console/bin/cocos2d.ini<br />
<br />
===Cross Compiling for Android===<br />
<br />
Install {{AUR|android-ndk}}, {{AUR|android-sdk}} and {{AUR|android-sdk-platform-tools}}, and also add the following to your shell configuration file:<br />
<br />
export NDK_ROOT=/opt/android-ndk<br />
export ANDROID_SDK_ROOT=/opt/android-sdk<br />
export ANT_ROOT=/usr/bin<br />
<br />
The {{ic|android}} tool should suffice to fetch the SDK platform for a certain android version, however there are also packages in the [[Arch User Repository]] such as {{ic|android-platform}} for downloading these SDK platforms.<br />
<br />
===Updating SDKBOX===<br />
<br />
Cocos2D-X comes with a tool called {{ic|sdkbox}} for integrating third party software development kits into projects easily. To update this tool, you must have read/write/execute access to {{ic|/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package}} and the following files in that directory: {{ic|sdkbox}}, {{ic|sdkbox.bat}}, {{ic|sdkbox.pyc}}<br />
<br />
For a single-user configuration, executing the following will suffice:<br />
<br />
# chown $USER:$USER /opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package/{,sdkbox,sdkbox.bat,sdkbox.pyc}<br />
$ sdkbox update<br />
<br />
==See also==<br />
<br />
* [http://www.cocos2d-x.org/programmersguide/ Official Programmers Guide]<br />
* [http://cocos.sonarlearning.co.uk/ Cocos2D-X Developer Guide]<br />
* [http://www.cocos2d-x.org/wiki/Reference Official API Referenece Guide]<br />
* [http://discuss.cocos2d-x.org/t/how-to-set-full-screen-on-android-4-4/10278/3 Enabling Immersive Mode for Android] - See '''Cookiebit''''s answer.<br />
* [http://discuss.cocos2d-x.org/t/cocos3-8-tutorial-rendertexture-blur/13622 Texture Rendering + Blur Tutorial]<br />
* [http://particle2dx.com/ Particle2DX] - Cocos2D-X Particle Generator</div>Zropeinhttps://wiki.archlinux.org/index.php?title=Cocos2D-X&diff=439993Cocos2D-X2016-07-05T17:09:02Z<p>Zropein: Undo revision 434940 by Zropein (talk) This is the proper way of calling the right python intepreter.</p>
<hr />
<div>[[Category:Gaming]]<br />
[[ja:Cocos2D-X]]<br />
Cocos2D-X is a high-performance cross platform 2D/3D game engine that supports multiple platforms such as iOS, Android, WinXP/7/8, WP8, BlackBerry, MeeGo, Marmelade, WebOS, Mac OS X. This page will focus entirely on properly configuring this package for initial usage. For other documentation, click [[#See also|here]].<br />
<br />
==Installation==<br />
<br />
Install {{AUR|cocos2d-x-src}} from the [[Arch User Repository]].<br />
<br />
==Configuration==<br />
<br />
===PATH Environment Variable===<br />
<br />
After installation, add {{ic|/opt/cocos2d-x/tools/cocos2d-console/bin}}, and {{ic|/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package}} to your '''PATH''' environment variable mostly to run the {{ic|cocos}} python2 script to create projects, and also run {{ic|sdkbox}} respectively. Add the following to your respective shell configuration file ('''~/.bashprofile''', '''~/.zshenv''', etc):<br />
<br />
export PATH=/opt/cocos2d-x/tools/cocos2d-console/bin:/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package:${PATH}<br />
<br />
===Python Scripts Workaround===<br />
<br />
Since some Cocos2D-X scripts use {{ic|python2}} instead of {{ic|python3}}, like {{ic|sdkbox}}, simply calling {{ic|python2 foo.pyc}} will not suffice since other modules will be called with "env python" which could point to python3. To fix this, read [[python#Dealing_with_version_problem_in_build_scripts|here]]. Don't forget to add {{ic|/usr/local/bin}}, or whichever directory the workaround shell script is installed at, before {{ic|/usr/bin}} in your PATH environment variable. The following should suffice:<br />
<br />
export PATH=/usr/local/bin:${PATH}<br />
<br />
Here's an example shell script workaround:<br />
<br />
{{hc|1=/usr/local/bin/python|2=<br />
<nowiki><br />
#!/bin/bash<br />
script=$(readlink -f -- "$1")<br />
case "$script" in (/opt/cocos2d-x/*|/path/to/project1/*|/path/to/project2/*|/path/to/project3/*)<br />
exec python2 "$@"<br />
esac<br />
<br />
exec python3 "$@"<br />
</nowiki><br />
}}<br />
<br />
===Cross Compiling for Android===<br />
<br />
Install {{AUR|android-ndk}}, {{AUR|android-sdk}} and {{AUR|android-sdk-platform-tools}}, and also add the following to your shell configuration file:<br />
<br />
export NDK_ROOT=/opt/android-ndk<br />
export ANDROID_SDK_ROOT=/opt/android-sdk<br />
export ANT_ROOT=/usr/bin<br />
<br />
The {{ic|android}} tool should suffice to fetch the SDK platform for a certain android version, however there are also packages in the [[Arch User Repository]] such as {{ic|android-platform}} for downloading these SDK platforms.<br />
<br />
===Updating SDKBOX===<br />
<br />
Cocos2D-X comes with a tool called {{ic|sdkbox}} for integrating third party software development kits into projects easily. To update this tool, you must have read/write/execute access to {{ic|/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package}} and the following files in that directory: {{ic|sdkbox}}, {{ic|sdkbox.bat}}, {{ic|sdkbox.pyc}}<br />
<br />
For a single-user configuration, executing the following will suffice:<br />
<br />
# chown $USER:$USER /opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package/{,sdkbox,sdkbox.bat,sdkbox.pyc}<br />
$ sdkbox update<br />
<br />
==See also==<br />
<br />
* [http://www.cocos2d-x.org/programmersguide/ Official Programmers Guide]<br />
* [http://cocos.sonarlearning.co.uk/ Cocos2D-X Developer Guide]<br />
* [http://www.cocos2d-x.org/wiki/Reference Official API Referenece Guide]<br />
* [http://discuss.cocos2d-x.org/t/how-to-set-full-screen-on-android-4-4/10278/3 Enabling Immersive Mode for Android] - See '''Cookiebit''''s answer.<br />
* [http://discuss.cocos2d-x.org/t/cocos3-8-tutorial-rendertexture-blur/13622 Texture Rendering + Blur Tutorial]<br />
* [http://particle2dx.com/ Particle2DX] - Cocos2D-X Particle Generator</div>Zropeinhttps://wiki.archlinux.org/index.php?title=Cocos2D-X&diff=434940Cocos2D-X2016-05-14T04:16:30Z<p>Zropein: Removed python build scripts. Workaround implemented in PKGBUILD.</p>
<hr />
<div>[[Category:Gaming]]<br />
[[ja:Cocos2D-X]]<br />
Cocos2D-X is a high-performance cross platform 2D/3D game engine that supports multiple platforms such as iOS, Android, WinXP/7/8, WP8, BlackBerry, MeeGo, Marmelade, WebOS, Mac OS X. This page will focus entirely on properly configuring this package for initial usage. For other documentation, click [[#See also|here]].<br />
<br />
==Installation==<br />
<br />
Install {{AUR|cocos2d-x-src}} from the [[Arch User Repository]].<br />
<br />
==Configuration==<br />
<br />
===PATH Environment Variable===<br />
<br />
After installation, add {{ic|/opt/cocos2d-x/tools/cocos2d-console/bin}}, and {{ic|/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package}} to your '''PATH''' environment variable mostly to run the {{ic|cocos}} python2 script to create projects, and also run {{ic|sdkbox}} respectively. Add the following to your respective shell configuration file ('''~/.bashprofile''', '''~/.zshenv''', etc):<br />
<br />
export PATH=/opt/cocos2d-x/tools/cocos2d-console/bin:/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package:${PATH}<br />
<br />
===Cross Compiling for Android===<br />
<br />
Install {{AUR|android-ndk}}, {{AUR|android-sdk}} and {{AUR|android-sdk-platform-tools}}, and also add the following to your shell configuration file:<br />
<br />
export NDK_ROOT=/opt/android-ndk<br />
export ANDROID_SDK_ROOT=/opt/android-sdk<br />
export ANT_ROOT=/usr/bin<br />
<br />
The {{ic|android}} tool should suffice to fetch the SDK platform for a certain android version, however there are also packages in the [[Arch User Repository]] such as {{ic|android-platform}} for downloading these SDK platforms.<br />
<br />
===Updating SDKBOX===<br />
<br />
Cocos2D-X comes with a tool called {{ic|sdkbox}} for integrating third party software development kits into projects easily. To update this tool, you must have read/write/execute access to {{ic|/opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package}} and the following files in that directory: {{ic|sdkbox}}, {{ic|sdkbox.bat}}, {{ic|sdkbox.pyc}}<br />
<br />
For a single-user configuration, executing the following will suffice:<br />
<br />
# chown $USER:$USER /opt/cocos2d-x/tools/cocos2d-console/plugins/plugin_package/{,sdkbox,sdkbox.bat,sdkbox.pyc}<br />
$ sdkbox update<br />
<br />
==See also==<br />
<br />
* [http://www.cocos2d-x.org/programmersguide/ Official Programmers Guide]<br />
* [http://cocos.sonarlearning.co.uk/ Cocos2D-X Developer Guide]<br />
* [http://www.cocos2d-x.org/wiki/Reference Official API Referenece Guide]<br />
* [http://discuss.cocos2d-x.org/t/how-to-set-full-screen-on-android-4-4/10278/3 Enabling Immersive Mode for Android] - See '''Cookiebit''''s answer.<br />
* [http://discuss.cocos2d-x.org/t/cocos3-8-tutorial-rendertexture-blur/13622 Texture Rendering + Blur Tutorial]<br />
* [http://particle2dx.com/ Particle2DX] - Cocos2D-X Particle Generator</div>Zropein