cocos2d-x-3.12 を git clone

cocos2d-x-3.12 を git clone してダウンロードできる cocos2d-x-3.12.zip の内容を再現した手順

[cocos2d-x-3.13.1 バージョン](cc6da43bb038872cf389) を投稿しました

# 目的

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


# 環境

1. Mac OS X 10.11.5 (英語)


# 手順

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: 419192, done.
		remote: Compressing objects: 100% (19/19), done.
		remote: Total 419192 (delta 3), reused 0 (delta 0), pack-reused 419173
		Receiving objects: 100% (419192/419192), 866.70 MiB | 3.01 MiB/s, done.
		Resolving deltas: 100% (280335/280335), done.
		Checking connectivity... done.

    1. 何回か HTTP エラーが起きたがリトライで解決

3. cocos2d-x-3.12 タグを git checkout

		$ cd cocos2d-x
		$ git checkout cocos2d-x-3.12
		Note: checking out 'cocos2d-x-3.12'.

		You are in 'detached HEAD' state. You can look around, make experimental
		changes and commit them, and you can discard any commits you make in this
		state without impacting any branches by performing another checkout.

		If you want to create a new branch to retain commits you create, you may
		do so (now or later) by using -b with the checkout command again. Example:

		  git checkout -b <new-branch-name>

		HEAD is now at 8b6a07f... Merge pull request #16061 from pandamicro/v3.12

4. 依存ファイルをダウンロード

		$ ./download-deps.py
		=======================================================
		==> Prepare to download external libraries!
		==> version file doesn't exist
		==> Ready to download 'v3-deps-99.zip' from 'https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-99.zip'
		==> Start to download, please wait ...
		==> Downloading finished!                                                   
		==> Extracting files, please wait ...
		==> Extraction done!
		==> Copying files...
		==> Cleaning...
		==> Would you like to save 'v3-deps-99.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 'plugin'...
		remote: Counting objects: 9467, done.
		remote: Total 9467 (delta 0), reused 0 (delta 0), pack-reused 9467
		Receiving objects: 100% (9467/9467), 80.32 MiB | 2.61 MiB/s, done.
		Resolving deltas: 100% (4958/4958), done.
		Checking connectivity... done.
		Submodule path 'plugin': checked out '0fb74e5ad6d5ffd8a4a243b0bfbfac4edc59098f'
		Cloning into 'tests/cpp-tests/Resources/ccs-res'...
		remote: Counting objects: 2431, done.
		remote: Total 2431 (delta 0), reused 0 (delta 0), pack-reused 2431
		Receiving objects: 100% (2431/2431), 32.08 MiB | 2.74 MiB/s, done.
		Resolving deltas: 100% (1183/1183), done.
		Checking connectivity... done.
		Submodule path 'tests/cpp-tests/Resources/ccs-res': checked out '892e3cbdc27d24c39c62d700a81be27e593823b7'
		Cloning into 'tools/bindings-generator'...
		remote: Counting objects: 3527, done.
		remote: Total 3527 (delta 0), reused 0 (delta 0), pack-reused 3527
		Receiving objects: 100% (3527/3527), 16.07 MiB | 2.04 MiB/s, done.
		Resolving deltas: 100% (1678/1678), done.
		Checking connectivity... done.
		Submodule path 'tools/bindings-generator': checked out '32404751d5399ccb0cd9df4b72b211506cade321'
		Cloning into 'tools/cocos2d-console'...
		remote: Counting objects: 4224, done.
		remote: Total 4224 (delta 0), reused 0 (delta 0), pack-reused 4224
		Receiving objects: 100% (4224/4224), 3.91 MiB | 1.46 MiB/s, done.
		Resolving deltas: 100% (2598/2598), done.
		Checking connectivity... done.
		Submodule path 'tools/cocos2d-console': checked out '04ade20dec5508d3865c89191e2f88dd21972456'
		Cloning into 'web'...
		remote: Counting objects: 56724, done.
		remote: Compressing objects: 100% (110/110), done.
		remote: Total 56724 (delta 48), reused 0 (delta 0), pack-reused 56614
		Receiving objects: 100% (56724/56724), 57.45 MiB | 2.35 MiB/s, done.
		Resolving deltas: 100% (38715/38715), done.
		Checking connectivity... done.
		Submodule path 'web': checked out '4e9596e72a389b8f0502fffbd4cd75d397bdeb2c'

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-12.zip' from 'https://github.com/natural-law/console-binary/archive/v3-console-12.zip'
		==> WARNING: Couldn't grab the file size from remote, use 'zip_file_size' section in '/Users/foo/cocos2d-x/tools/cocos2d-console/config.json'
		==> Starting to download, please wait ...
		 ==> Downloading finished!al: 38343K, Percent: 93.51%, Speed: 3374.61 KB/S 
		==> Extracting files, please wait ...
		==> Extraction done!
		==> Copying files...
		==> Cleaning...
		==> Delete 'v3-console-12.zip' file? It may be reused when you execute this script next time! (yes/no): yes

    1. これは README.md には書いてない手順
    2. ```cd``` しないと v3-console-12.zip が見つからないエラー
    3. さっきはダウンロードした zip を消すのが ```no``` だったけれど、今度は ```yes```


# 確認

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

		$ cd ..
		$ unzip cocos2d-x-3.12.zip
		$ diff -r cocos2d-x cocos2d-x-3.12
		Only in cocos2d-x: .git
		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 ディレクトリ以外に差異は無い