Skip to content

Commit

Permalink
update README and run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tinybearc committed Mar 8, 2016
1 parent ad03d94 commit 3218cec
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
@@ -0,0 +1,37 @@

# How to run sdkbox samples

Steps:

~~~bash
mkdir samples
cd samples

# must clone this repo
git clone --depth 1 https://github.com/sdkbox/sdkbox-cocos2d-x-binary.git

# clone sample repo
git clone --depth 1 https://github.com/sdkbox/sdkbox-sample-facebook.git

# run sample with specified language and platform
# eg: cpp and ios
./sdkbox-cocos2d-x-binary/run_sample.sh facebook cpp ios
# javascript and android
./sdkbox-cocos2d-x-binary/run_sample.sh facebook js android

# <optional> if exists "download-depends.sh" in sample repo, execute it
# ./sdkbox-sample-facebook/download-depends.sh

~~~

Memo:

1. Sample repo and cocos2dx repo must be in same level directory

~~~
+-- sdkbox-cocos2d-x-binary
+-- sdkbox-sample-facebook
| +-- cpp
| +-- lua
| \-- js
~~~
27 changes: 27 additions & 0 deletions run.sh
@@ -0,0 +1,27 @@
#!/bin/bash
CUR_DIR=$(cd "$(dirname $0)" && pwd)

cd "$CUR_DIR"

if [ ! -d ../sdkbox-cocos2d-x-binary ]; then
echo "[ERROR] not found sdkbox-cocos2d-x-binary"
echo ""
cat README.md
exit
fi

if [ "$2" == "" ]; then
echo "[ERROR] not specified language and platform"
echo ""

echo "syntax:"
echo " run.sh LANGUAGE PLATFORM"
echo ""
echo "examples:"
echo " run.sh cpp android"
echo " run.sh js ios"
echo ""
exit
fi

../sdkbox-cocos2d-x-binary/run_sample.sh facebook $*

0 comments on commit 3218cec

Please sign in to comment.