LoginSignup
2

More than 5 years have passed since last update.

cocos2d-x-3.17 を git clone

Posted at

cocos2d-x レポジトリをクローンして、オフィシャルサイトからダウンロードできる cocos2d-x-3.17.zip の内容を再現してみた

目的

  1. レポジトリとオフィシャルダウンロードの差を確認(もしあれば)

環境

  1. macOS 10.13.5 (英語)
  2. git-2.17.1 (brew)

手順

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

  2. git レポジトリをクローン

    $ git clone https://github.com/cocos2d/cocos2d-x.git
    Cloning into 'cocos2d-x'...
    remote: Counting objects: 441326, done.
    remote: Compressing objects: 100% (8/8), done.
    remote: Total 441326 (delta 0), reused 2 (delta 0), pack-reused 441318
    Receiving objects: 100% (441326/441326), 894.17 MiB | 7.73 MiB/s, done.
    Resolving deltas: 100% (298326/298326), done.
    Checking out files: 100% (5997/5997), done.
    
    $ cd cocos2d-x
    
  3. cocos2d-x-3.17 タグをチェックアウト

    $ git checkout cocos2d-x-3.17
    Note: checking out 'cocos2d-x-3.17'.
    
    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 5c381d8ee6 sync Chinese release notes with English improvements (#18832)
    
  4. 外部ライブラリをダウンロード

    $ python download-deps.py
    =======================================================
    ==> Prepare to download external libraries!
    ==> version file doesn't exist
    ==> Ready to download 'v3-deps-142.zip' from 'https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-142.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-142.zip'? So you don't have to download it later. [Yes/no]: no
    
    1. 3.16v3-deps-136 から v3-deps-142 に更新されてる
  5. git submodule をクローン

    $ git submodule update --init
    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/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 'tests/cpp-tests/Resources/ccs-res': checked out '5d65db4c5f18c0df1305ff32b076425ab228cc4a'
    Submodule path 'tools/bindings-generator': checked out '2aa9b21f11bf514ca80f243b21750e8c7c28f05e'
    Submodule path 'tools/cocos2d-console': checked out '958531ee955b08f9b388847b7ab9eb0bb468c18c'
    Submodule path 'web': checked out 'e79acd062363818af809c51804083a5989a9aedc'
    
    1. 3.16 の時にあった plugin が無くなってる
  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'
    ==> WARNING: Couldn't grab the file size from remote, use 'zip_file_size' section in '/Users/kenichi/cocos2d-x/tools/cocos2d-console/config.json'
    ==> Starting to download, please wait ...
     ==> Downloading finished!al: 38343K, Percent: 98.13%, Speed: 9808.06 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. 3.16 と同じ v3-console-16 のまま(更新されてない)
    2. この手順は README.md には書いてない
    3. cd しないで直接 tools/cocos2d-console/download-bin.py を実行するとエラー: DistutilsFileError: cannot copy tree 'console-binary-3-console-16': not a directory
    4. さっきはダウンロードした zip を消すのが no だったけれど、今度は yes

確認

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

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

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
2