LoginSignup
1
2

More than 5 years have passed since last update.

cocos2d-x-3.13.1 を git clone

Last updated at Posted at 2016-09-14

cocos2d-x-3.13.1 を git clone して、オフィシャルサイトからダウンロードできる cocos2d-x-3.13.1.zip の内容を再現した手順

目的

  1. git history を手軽に確認しながら cocos2d-x アプリを開発したい

環境

  1. Mac OS X 10.11.6 (英語)

手順

  1. 基本的に https://github.com/cocos2d/cocos2d-x の README.md に従います

  2. git clone

    $ git clone https://github.com/cocos2d/cocos2d-x
    Cloning into 'cocos2d-x'...
    remote: Counting objects: 423466, done.
    remote: Total 423466 (delta 0), reused 0 (delta 0), pack-reused 423465
    Receiving objects: 100% (423466/423466), 863.18 MiB | 1.53 MiB/s, done.
    Resolving deltas: 100% (285227/285227), done.
    Checking connectivity... done.
    
    1. 何回か HTTP エラーが起きたがリトライで解決
  3. v3.13.1 ブランチを git checkout

    $ git checkout v3.13.1
    Branch v3.13.1 set up to track remote branch v3.13.1 from origin.
    Switched to a new branch 'v3.13.1'
    
  4. 依存ファイルをダウンロード

    $ ./download-deps.py
    =======================================================
    ==> Prepare to download external libraries!
    ==> version file doesn't exist
    ==> Ready to download 'v3-deps-109.zip' from 'https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-109.zip'
    ==> WARNING: Couldn't grab the file size from remote, use 'zip_file_size' section in '/Users/kenichi/butaimeguri/cocos2d-x/external/config.json'
    ==> Start to download, please wait ...
    ==> Downloading finished!                                                   
    ==> Extracting files, please wait ...
    ==> Extraction done!
    ==> Copying files...
    ==> Cleaning...
    ==> Would you like to save 'v3-deps-109.zip'? So you don't have to download it later. [Yes/no]: no
    
  5. git submodule を clone

    $ git submodule update --init
    Submodule 'plugin' (https://github.com/cocos2d-x/plugin-x.git) registered for path 'plugin'
    Submodule 'tests/cpp-tests/Resources/ccs-res' (git://github.com/dumganhar/ccs-res.git) registered for path 'tests/cpp-tests/Resources/ccs-res'
    Submodule 'tools/bindings-generator' (git://github.com/cocos2d/bindings-generator.git) registered for path 'tools/bindings-generator'
    Submodule 'tools/cocos2d-console' (git://github.com/cocos2d/cocos2d-console.git) registered for path 'tools/cocos2d-console'
    Submodule 'web' (git://github.com/cocos2d/cocos2d-html5.git) registered for path 'web'
    Cloning into '/Users/kenichi/butaimeguri/cocos2d-x/plugin'...
    Cloning into '/Users/kenichi/butaimeguri/cocos2d-x/tests/cpp-tests/Resources/ccs-res'...
    Cloning into '/Users/kenichi/butaimeguri/cocos2d-x/tools/bindings-generator'...
    Cloning into '/Users/kenichi/butaimeguri/cocos2d-x/tools/cocos2d-console'...
    Cloning into '/Users/kenichi/butaimeguri/cocos2d-x/web'...
    Submodule path 'plugin': checked out '0fb74e5ad6d5ffd8a4a243b0bfbfac4edc59098f'
    Submodule path 'tests/cpp-tests/Resources/ccs-res': checked out '892e3cbdc27d24c39c62d700a81be27e593823b7'
    Submodule path 'tools/bindings-generator': checked out '32404751d5399ccb0cd9df4b72b211506cade321'
    Submodule path 'tools/cocos2d-console': checked out '5fb3795dbe2861ae9a915861b88787b69722e7e2'
    Submodule path 'web': checked out 'cff01472af3f1203e4422ee84615e8fb3de9f9c5'
    
  6. cocos2d-console をダウンロード

    $ (cd tools/cocos2d-console; ./download-bin.py)
    =======================================================
    ==> Preparing to download console binaries!
    ==> version file doesn't exist
    ==> Ready to download 'v3-console-16.zip' from 'https://github.com/cocos2d/console-binary/archive/v3-console-16.zip'
    ==> WARNING: Couldn't grab the file size from remote, use 'zip_file_size' section in '/Users/kenichi/butaimeguri/cocos2d-x/tools/cocos2d-console/config.json'
    ==> Starting to download, please wait ...
     ==> Downloading finished!al: 38343K, Percent: 88.09%, Speed: 5449.79 KB/S 
    ==> Extracting files, please wait ...
    ==> Extraction done!
    ==> Copying files...
    ==> Cleaning...
    ==> Delete 'v3-console-16.zip' file? It may be reused when you execute this script next time! (yes/no): yes
    
    1. これは README.md には書いてない手順
    2. cocos2d-x-3.12 では cd しないと v3-console-12.zip が見つからないエラーになった
    3. さっきはダウンロードした zip を消すのが no だったけれど、今度は yes

確認

  1. http://www.cocos2d-x.org/download から cocos2d-x-3.13.1.zip をダウンロードして、比較

    $ cd ..
    $ unzip cocos2d-x-3.13.1.zip
    $ diff -r cocos2d-x cocos2d-x-3.13.1
    Only in cocos2d-x: .git
    diff -r cocos2d-x/docs/RELEASE_NOTES.md cocos2d-x-3.13.1/docs/RELEASE_NOTES.md
    31c31
    < ## Cocos command modifications
    ---
    > ## Cocos command modification
    33,35c33
    < Prior to `v3.13` the __cocos__ command would find an Android API level __>=__ a specified
    < Android API level inorder to build source codes on Android. For example, if the contents of
    < __APP_ROOT/proj.android/project.properties__ is:
    ---
    > In previous, cocos command will find an Android API level >= specified Android API level to build source codes on Android. For example, if the content of `APP_ROOT/proj.android/project.properties` is
    40a39
    > then cocos command will find `android-13` in `ANDROID_SDK_ROOT/platforms`, if not found then it will find `android-14`, if `android-14` is not found, then it will find `android-15` and so on until it found one.
    42,53c41
    < then the __cocos__ command will find __android-13__ in `ANDROID_SDK_ROOT/platforms`. If __android-13__
    < is not found then it will try to find __android-14__. If __android-14__ is not found, then it will find
    < __android-15__ and so on until it finds one.
    < 
    < This algorithm has a problem. If you only download __Android 21__, then your application will be built with
    < __Android 21__ even though the default API level is 13. If your application runs on a device with a lower Android OS,
    < such as Android 4.0, then your application may crash. Building with a higher API level does not ensure that your
    < application will run on devices with a lower Android OS.
    < 
    < Starting in `v3.13.1`, the __cocos__ command will stop if it can not find a specific API level. The default
    < is __android-13__. If you want to build with a higher level Android SDK, you should explicitely specify it.
    < Example:
    ---
    > This algorithm has a problem that if you only download Android 21, then application will be built with Android 21 though the default API level is 13. If the application runs on a device with lower Android OS(such as Android 4.0), then the application may crash. Building with high API level Android SDK can not make sure run on devices with low Android OS. It is reasonable,  an applicatoin build with iOS 9 can not make sure run on iOS 8.
    55c43,45
    < ```sh
    ---
    > Since v3.13.1, cocos command will stop if it can not find specific API level(default is android-13). If you want to build with high level Android SDK, you should explicitely specify it like this:
    > 
    > ```
    59,60c49
    < Keep in mind that, after running this command, the contents of `APP_ROOT/proj.android/project.properties` will
    < be changed, __android-19__ will now be the default API level.
    ---
    > Keep in mind that, after running this command, content of `APP_ROOT/proj.android/project.properties` will be changed, `android-19` will be the default API level.
    62c51
    < There is a map between Android API level and Android OS version that you can [refer to](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html) for detailed information.
    ---
    > There is a map between Android API level and Android OS version, can refer to [this documentation](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html) for detail information.
    64c53
    < There is also more detailed information in our [GitHub repo](https://github.com/cocos2d/cocos2d-x/milestone/33) about this issue.
    ---
    > Can refer to [here](https://github.com/cocos2d/cocos2d-x/milestone/33) for detail information about these issues.
    \ No newline at end of file
    Only in cocos2d-x/plugin: .git
    Only in cocos2d-x/tests/cpp-tests/Resources/ccs-res: .git
    Only in cocos2d-x/tools/bindings-generator: .git
    Only in cocos2d-x/tools/cocos2d-console: .git
    Only in cocos2d-x/web: .git
    
    1. .git ディレクトリ以外に docs/RELEASE_NOTES.md に差異がある
    2. オフィシャルサイトのリリースノートは zip ではなく git の方を指しているため clone した方が正しいと思われる
      1. リリース http://blog.cocos2d-x.org/2016/09/cocos2d-x-v3-13-1-released/
      2. 差分は https://github.com/cocos2d/cocos2d-x/commit/290a124f2f2fd3fb7eb13bd1436f3d684b598bc1#diff-aa75d2e7837774f5cb565717b6744a35 だと思われる(英語が変なのを直してるっぽい)
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2