Browse Source

Adicionando instruções de montagem

capellaresumo 6 years ago
parent
commit
156c87ae68
5 changed files with 19 additions and 12 deletions
  1. 7 6
      README.md
  2. BIN
      RedCore.apk
  3. 9 3
      build
  4. 1 1
      proj.android-studio/app/AndroidManifest.xml
  5. 2 2
      proj.android-studio/settings.gradle

+ 7 - 6
README.md

@@ -1,8 +1,9 @@
-```
-$ git submodule update --init
+Antes de montar o arquivo você deve configurar o arquivo `proj.android-studio/local.properties`.
+
+Para montar o APK do jogo:
 
-git submodule update --init --recursive
-cd scripts
-./build_distribution.py --version 1.x
+```
+./build
+```
 
-```
+Esse script vai fazer o download do cocos2d-x (por volta de 350mb).

BIN
RedCore.apk


+ 9 - 3
build

@@ -1,5 +1,11 @@
 #!/bin/sh
 
-wget http://www.cocos2d-x.org/filedown/cocos2d-x-3.15.1.zip
-unzip cocos2d-x-3.15.1.zip
-mv cocos2d-x-3.15.1 cocos2d
+if [ ! -d "cocos2d" ]; then
+    wget http://www.cocos2d-x.org/filedown/cocos2d-x-3.15.1.zip
+    unzip cocos2d-x-3.15.1.zip
+    mv cocos2d-x-3.15.1 cocos2d
+fi
+
+./cocos2d/tools/cocos2d-console/bin/cocos compile -p android --android-studio
+
+cp /Users/gabrielcapella/Desktop/RedCore/bin/debug/android/RedCore-debug.apk ./RedCore.apk

+ 1 - 1
proj.android-studio/app/AndroidManifest.xml

@@ -12,7 +12,7 @@
         
         <!-- Tell Cocos2dxActivity the name of our .so -->
         <meta-data android:name="android.app.lib_name"
-                   android:value="MyGame" />
+                   android:value="RedCOre" />
 
         <activity
             android:name="org.cocos2dx.cpp.AppActivity"

+ 2 - 2
proj.android-studio/settings.gradle

@@ -1,4 +1,4 @@
 include ':libcocos2dx'
 project(':libcocos2dx').projectDir = new File(settingsDir, '../cocos2d/cocos/platform/android/libcocos2dx')
-include ':RedCore2'
-project(':RedCore2').projectDir = new File(settingsDir, 'app')
+include ':RedCore'
+project(':RedCore').projectDir = new File(settingsDir, 'app')