Skip to content

Instantly share code, notes, and snippets.

@akiomik
Last active September 15, 2015 03:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save akiomik/ca5399da0e867ea60c42 to your computer and use it in GitHub Desktop.
a homebrew formula for cocos2d-x v3.7.1

Change the plugin path of /usr/local/opt/cocos2d-x/bin/cocos2d.ini.

53c53
< plugins=../plugins
---
> plugins=/usr/local/opt/cocos2d-x/tools/cocos2d-console/plugins
class Cocos2dX < Formula
desc ""
homepage "http://www.cocos2d-x.org/"
url "http://www.cocos2d-x.org/filedown/cocos2d-x-3.7.1.zip"
sha256 "78e20266d2484f6d5e23945b3fdac1745d462e574487b26a7b406846c9e91ac0"
depends_on "ant"
depends_on "android-sdk"
depends_on "android-ndk"
def install
prefix.install "build", "cmake", "cocos", "docs", "extensions", "external", "licenses", "plugin", "templates", "tests", "tools", "web"
bin.install_symlink Dir["#{prefix}/tools/cocos2d-console/bin/*"]
system "./setup.py"
end
def caveats; <<-EOS.undent
Add the following to your .bashrc:
export COCOS_X_ROOT=#{opt_prefix}
export COCOS_CONSOLE_ROOT=#{opt_prefix}/tools/cocos2d-console/bin
export COCOS_TEMPLATES_ROOT=#{opt_prefix}/templates
export ANT_ROOT=#{Formula["ant"].opt_prefix}/bin
export NDK_ROOT=#{Formula["android-ndk"].opt_prefix}
export ANDROID_SDK_ROOT=#{Formula["android-sdk"].opt_prefix}
EOS
end
test do
system "false"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment