Portable projects and build times.

Hey there,

I recently started with cocos2dx, and after alot of trouble, have got a simple program working that I created with the create-android-project.sh file.

Now, that project was generated in the cocos2dx directory, but I would like to move it around. Obviously I’m posting here because when I move it, it breaks and I figured part of the problem is that the build_native.sh file uses the …/…/ instead of actual directories.

For example,

DIR=“$( cd”$( dirname “${BASH_SOURCE[0]}” )" && pwd )"
# … use paths relative to current directory

COCOS2DX_ROOT=“$DIR/…/…”
APP_ROOT=“$DIR/…”
APP_ANDROID_ROOT=“$DIR”

So, obviously I’ve tried to change the COCOS2DX_ROOT.

Then I re-imported the project into Eclipse and tried to build it.
There was an error.

It did start building fine, and then it reached

make[1]: **** No rule to make target `/home/Daniel/Development/Software/cocos2dx/cocos2d-2.0-x-2.0.4/test/proj.android/…/…/cocos2dx/script_support/CCScriptSupport.cpp’, needed by `obj/local/armeabi/objs-debug/cocos2dx_static/script_support/CCScriptSupport.o’. Stop.
Now, the first directory is the OLD location of the project, so I’ve assumed that somewhere else other than the build_native file needs to be updated or something.
So I could go looking for `obj/local/armeabi/objs-debug/cocos2dx_static/script_support/CCScriptSupport.o’, but I don’t know what I’m getting myself into.
Surely there’s a simple way to make a project ‘portable’ and I don’t want to go screwing around with more things here.
So that was my first question, how can I make a project portable.

Secondly, my build times are insanely slow.
Like each build/clean or even debug takes over a minute.
My make file goes as follows:

all:
./build_native.sh
ant Dsdk.dir=/home/Daniel/Development/Software/sdk debug
run:
adb
d uninstall org.cocos2dx.test
adb d install bin/test-debug.apk
adb
d logcat | grep cocos2d
clean:
rm rf libs/
rm
rf obj/
rm rf bin/*
rm
rf gen/
rm -rf assets/**

And from looking at the console, the whole cocos engine get’s built.
So is there a way that I can bypass building the engine which I’m obviously never going to change.

I know that Eclipse does an automatic build that only builds the updated files, but I still manually build my projects, and every debug/run builds the whole thing anyway.

Thanks in advance,
Daniel,