Cocos2Dx - Create APK from Visual Studio - cocos2d-x

I new with cocos2Dx and wanna create game for Android with using C++. I use proj.win32 and don't now how build .apk. Can I do this?

Make entry of your .cpp files in Android.mk that exist in jni folder. Find jni folder inside proj.android project module.
LOCAL_SRC_FILES := hellocpp/main.cpp \
../../Classes/AppDelegate.cpp \
../../Classes/HelloWorldScene.cpp
run this command on console
cocos deploy -s ./projects/MyGame -p andoird -m release
where ./projects/MyGame is your project root folder -m release indicated you want .apk in release mode otherwise use debug
If want some Android related code then first import your project into eclipse then put your Android related code then deploy or even through eclipse you can deploy.

Related

How to make a HTML build from raylib

I am a beginner programmer and I was wondering how I would make an HTML build from raylib. I tried looking at the GitHub https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5) I couldn't understand it. would you be able to write a simple step-by-step tutorial for me. please
For the very beginning you have to install emscripten SDK. As stated at the site "Emscripten is a complete compiler toolchain to WebAssembly, using LLVM, with a special focus on speed, size, and the Web platform."
Installation steps are prety easy:
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
After this steps you will have emscripten installed into the directory you've cloned it.
Then, you need to compile raylib itself to be usable in Web:
Go to the raylib/src directory and open Makefile, find where EMSDK_PATH variable is being defined and edit it accordingly to your setup. If you downloaded emscripten into /home/user/emsdk directory then put it in there:
EMSDK_PATH ?= /home/user/emsdk
Fix PYTHON_PATH definition as well.
then launch execute make:
make -e PLATFORM=PLATFORM_WEB -B
Notice -e option. That option allows to propagate and override environment variables to makefile.
Generated libraylib.a is placed in raylib\src\libraylib.a directory.
After that you can cd into raylib/examples/, fix Makefile as described above and launch make -e PLATFORM=PLATFORM_WEB -B again.
After that you would be able to start python3 -m http.server in that directory, navigate to http://0.0.0.0:8000/ in your browser and see examples.

How do I make Octave see installed Shogun libraries in Ubuntu 16.04?

I copied the commands (from these instructions: http://www.shogun-toolbox.org/install#ubuntu) into the terminal and they seem to have worked, but there is no documentation on how to make Octave find the libraries. I have tried modshogun and init_shogun but Octave cannot find them. I do have the libraries in usr/lib, and I have put that directory on PATH. I have even set usr/lib as my working directory in Octave and that did not help. As far as I have found, there is no Shogun documentation on what to do at this point.
I have also tried compiling Shogun from source, but configure couldn't find GCC. Apparently, this is a known problem with newer versions of GCC. I decided to ask for help with the former method because at least I have the libraries with that.
Edit: I am following the instructions here http://www.shogun-toolbox.org/install#manual-basics
When i do cd build and then "cmake -DINTERFACE_OCTAVE=ON" it tells me there is no cmakelists.txt. There is one in in the above folder, but when I go to that directory and do "cmake -DINTERFACE_OCTAVE=ON" again, it tells me "Shogun can only be built with GPL codes if the source files are in /home/derose/shogun/src/shogun/src/gpl. Please download or disable with LICENSE_GPL_SHOGUN=OFF."
However, when I add -LICENSE_GPL_SHOGUN=OFF as an option, i get the error "CMake Error: The source directory "/home/derose/shogun/src/shogun/-LICENSE_GPL_SHOGUN=OFF" does not exist."
You've linked to the Ubuntu install instructions. From there
These currently do contain the C++ library and Python bindings..
No word that this would include the GNU Octave binding. See below on the same page:
The native C++ interface is always included. The cmake options for building interfaces are -DINTERFACE_PYTHON=ON -DINTERFACE_R .. etc. For example, replace the cmake step above by cmake -DINTERFACE_PYTHON=ON...
So you have to grab the source and fire up cmake with something like -DINTERFACE_OCTAVE=ON
Steps to build the bleeding edge of shogun (the github repo) and the Octave interface:
git clone https://github.com/shogun-toolbox/shogun && cd shogun
git submodule update --init
mkdir build && cd build
cmake .. -DINTERFACE_OCTAVE=ON
make -j4

Converting .Xcodeproj file to .Apf file

I am developing a game in xcode using cocos2d-x i want to convert the .xcodeproj file to .apk file for that i use the Stella SDK. after download the package I try to configure it. But i am getting the following error, I typed in terminal.Please help me.
mac-man:~ srikanthreddy$ cd / opt
mac-man:/ srikanthreddy$ git clone https://github.com/morningtec/StellaSDK.git
fatal: could not create work tree dir 'StellaSDK'.: Permission denied
You are trying to clone the git project into /opt which is a directory that you may not have write permission for.
Usually you'd create such projects in your home directory, so try this instead:
mkdir ~/StellaSDK
cd ~/StellaSDK
git clone https://github.com/morningtec/StellaSDK.git
Note that this step is only cloning the StellaSDK project, it has nothing to do with the task you described (creating an .apk file). From that I take it you haven't fully understood that StellaSDK is a game engine / framework just like cocos2d-x, so you can't use that to create an .apk file unless you start a new project. In particular you can't just convert a .xcodeproj to work with Stella SDK, there is no automatism like that.
While at the same time cocos2d-x is a cross-platform engine capable of creating Android .apk apps. The reason why you're trying to use Stella for (or in place of?) an already existing cocos2d-x project is a bit of a mystery to me.

How to install cocos2d-x in windows8 and VS2013

I want to install cocos2d-x on my windows8 but i download this "http://bit.ly/18xmkJ9" from "http://cocos2d-x.org/download" in the tutorial says that i must execute a .bat in there or in some other pages says that i neet to create a project in VS, but when i try to do what they say in the tutorial i dont see anithing that is shown.
I'm very lost and help needed.
Could anybody say me hoy to createand start a project on cocos2d?
I have answer the similar question here.
Before cocos2d-x 2.1.2, you can still use templates in VS. However, you can only use python to create project
Install python 2.7
Open command line in Windows
Go to your cocos2d-x-2.1.5\tools\project-creator folder
Run create_project.py. Usage:
create_project.py -project YourProjectName -package com.example.PakcageName -language cpp
-language option:[cpp | lua | javascript]
Your project will be created in cocos2d-x-2.1.5\projects
Then find the win32.proj , open ***.sln

Does Clojure have a configuration file similar to ~/.clisprc.lisp?

On my platform, I need to add (set! *compile-path* (str *compile-path* ":.")) in order for (compile) to find my scripts. I'd prefer not to have to type that every time I want to compile something.
The easiest way to handle setting your "compile path" in Clojure is to use a build tool like Leiningen or Cake to manage your project. Using these tools, you get an idiomatic project structure, all your source code automatically on the compile/class path, and nice command-line tools to handle dependency retrieval, running unit tests and building your projects.
Here are some of the basic command-line tasks defined by Leiningen, and thus available to you in any project:
classpath Show the classpath of the current project.
clean Remove compiled artifacts and jars from project.
compile Compile Clojure source into .class files.
deps Download all dependencies and place them in the :library-path.
help Display a list of tasks or help for a given task.
install Install the current project or download the project specified.
interactive Enter interactive shell for calling tasks without relaunching JVM.
jar Package up all the project's files into a jar file.
javac Compile Java source files.
new Create a new project skeleton.
plugin Manage user-level plugins.
pom Write a pom.xml file to disk for Maven interop.
repl Start a repl session either with the current project or standalone.
run Run a -main function with optional command-line arguments.
swank Launch swank server for Emacs to connect.
test Run the project's tests.
test! Run a project's tests after cleaning and fetching dependencies.
uberjar Package up all the project's files and dependencies into a jar file.
So you start a new project by running lein new <name of project>, which generates a standard directory structure for a Clojure project. After you've written your code, you can run lein compile to simply compile your Clojure source, or you can go right to lein jar to package your code as a Jar file. For an executable jar that includes the Clojure language and all dependencies necessary to run your program, use lein uberjar instead.
If you don't use these tools, then you need to manage the classpath manually, to include where you store your dependency jars and where your source code lives. I highly recommend using one of the above-mentioned build tools.
You can specify -i when running Clojure to have it evaluate a file when starting up.
Below is the script I use to run Clojure as an example:
#!/bin/bash
# GUI mode
if [ "$1" != "--no-fork" ]; then
gnome-terminal -t Clojure -x $0 --no-fork $* &
exit
fi
shift
breakchars="(){}[],^%$##\"\";:''|\\"
if [ -f project.clj ]; then
lein repl
else
rlwrap --remember -c -b "$breakchars" \
java -Djava.ext.dirs=$HOME/.clojure clojure.main \
-i $HOME/.clojurerc --repl
fi
Leiningen will load ~/.lein/init.clj every time it launches. In addition, you can add a :repl-init key to your project.clj files to have that namespace loaded in each repl. Clojure is really not meant to be used standalone without any supporting tools, so calling (compile [...]) on your own is almost never the right answer.
In Clojure this is managed at the Java level (classpath etc) rather than having a .rc file. When I first started programming in Clojure I had a bash script that I would run, but now I use Leiningen.