cocos2d-x-3.16 を git clone

cocos2d-x レポジトリを `git clone` して、[オフィシャルサイトからダウンロード](http://www.cocos2d-x.org/download)できる cocos2d-x-3.16.zip の内容を再現してみた

# 目的

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


# 環境

1. macOS 10.13.3 (英語)
2. git-2.16.1 (brew)


# 手順

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

2. `git clone`

		$ git clone https://github.com/cocos2d/cocos2d-x.git
		Cloning into 'cocos2d-x'...
		remote: Counting objects: 440390, done.
		remote: Total 440390 (delta 0), reused 0 (delta 0), pack-reused 440390
		Receiving objects: 100% (440390/440390), 891.58 MiB | 6.39 MiB/s, done.
		Resolving deltas: 100% (297784/297784), done.
		Checking out files: 100% (5991/5991), done.
		$ cd cocos2d-x

3. `cocos2d-x-3.16` タグを `git checkout`

		$ git checkout cocos2d-x-3.16
		Checking out files: 100% (3750/3750), done.
		Note: checking out 'cocos2d-x-3.16'.

		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 f467d42e02 fix misspelling on RELEASE_NOTES.md (#18338)

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

		$ python download-deps.py
		=======================================================
		==> Prepare to download external libraries!
		==> version file doesn't exist
		==> Ready to download 'v3-deps-136.zip' from 'https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-136.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!
		==> Cleaning cocos2d-x/external folder ...
		==> Copying files...
		==> Cleaning...
		==> Would you like to save 'v3-deps-136.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 '5d65db4c5f18c0df1305ff32b076425ab228cc4a'
		Submodule path 'tools/bindings-generator': checked out '3d7c67d5ff722df97455b67e32638adf2cc0130d'
		Submodule path 'tools/cocos2d-console': checked out 'a9fd0d4904a277c162153754054429d461c7ab23'
		Submodule path 'web': checked out '87b178605cb2e95e413302e2cfb633f440306a9e'

6. cocos2d-console をダウンロード

		$ (cd tools/cocos2d-console; python 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'
		==> Starting to download, please wait ...
		 ==> Downloading finished!al: 38343K, Percent: 95.50%, Speed: 8920.16 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. `cd` しないで直接 `tools/cocos2d-console/download-bin.py` を実行するとエラー： `DistutilsFileError: cannot copy tree 'console-binary-3-console-16': not a directory`
    3. さっきはダウンロードした zip を消すのが ```no``` だったけれど、今度は ```yes```


# 確認

1. オフィシャルサイトから cocos2d-x-3.16.zip をダウンロードして、比較

		$ cd ..
		$ unzip cocos2d-x-3.16.zip
		$ diff -r cocos2d-x cocos2d-x-3.16
		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` ディレクトリ以外に差異はない