LoginSignup
0
1

More than 5 years have passed since last update.

cocos2d-x-3.14.1 を git clone

Last updated at Posted at 2017-04-10

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

目的

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

環境

  1. Mac OS X 10.12.4 (英語)
  2. git-2.12.2 (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: 432461, done.
    remote: Compressing objects: 100% (15/15), done.
    remote: Total 432461 (delta 4), reused 0 (delta 0), pack-reused 432446
    Receiving objects: 100% (432461/432461), 872.95 MiB | 9.98 MiB/s, done.
    Resolving deltas: 100% (291430/291430), done.
    $ cd cocos2d-x
    
  3. cocos2d-x-3.14.1 タグを git checkout

    $ git checkout cocos2d-x-3.14.1
    Note: checking out 'cocos2d-x-3.14.1'.
    
    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 f4246cb72a... update version (#17230)
    
  4. 依存ファイルをダウンロード

    $ ./download-deps.py
    =======================================================
    ==> Prepare to download external libraries!
    ==> version file doesn't exist
    ==> Ready to download 'v3-deps-116.zip' from 'https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/archive/v3-deps-116.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-116.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 'e75034966263a44904405525526e9d09df179391'
    Submodule path 'tools/cocos2d-console': checked out '39b70e269c44bac6efe544e6d611861b01b36083'
    Submodule path 'web': checked out 'c3f7000e8aa87223e644b04e8762c90da36d048c'
    
  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: 86.40%, Speed: 5769.83 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.14.1.zip をダウンロードして、比較

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