This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:vim4:development:android:download-android-source-code [2022/08/04 23:02] ruby |
products:sbc:vim4:development:android:download-android-source-code [2024/11/28 21:55] (current) william |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== VIM4: Download Android Source Code ====== | + | {{indexmenu_n> |
| + | |||
| + | |||
| + | ====== VIM4 Download Android Source Code ====== | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| + | This document mainly introduces how to download the Android source code of VIM4. | ||
| - | The Android | + | ===== Download from github ===== |
| + | < | ||
| + | 1. Create an empty directory to store working files: | ||
| - | Walk through the steps below to download the Source Code. | + | ```shell |
| + | $ mkdir -p WORKING_DIRECTORY | ||
| + | $ cd WORKING_DIRECTORY | ||
| + | ``` | ||
| - | ===== Steps ===== | + | 2. Run '' |
| - | First, install | + | ```shell |
| + | $ repo init -u https:// | ||
| + | ``` | ||
| + | |||
| + | 3. Run '' | ||
| ```shell | ```shell | ||
| - | $ mkdir git_lfs | + | $ repo sync -c -j4 |
| - | $ cd git_lfs | + | |
| - | $ wget https:// | + | |
| - | $ tar xvzf git-lfs-linux-amd64-2.3.4.tar.gz | + | |
| - | $ cd git-lfs-2.3.4 | + | |
| - | $ sudo ./ | + | |
| - | $ git lfs install | + | |
| ``` | ``` | ||
| + | The initial sync operation may take an hour or more to complete. | ||
| - | 1) Create an empty directory to hold your working files: | + | <WRAP info > |
| + | You might need to run above command repeatly if it fails halfway. Or you can try with this script instead: | ||
| + | ```bash sync_helper.sh | ||
| + | repo sync -c -j4 | ||
| + | while [ $? = 1 ]; do | ||
| + | echo "Sync failed, repeat again:" | ||
| + | repo sync -c -j4 | ||
| + | done | ||
| + | ``` | ||
| + | |||
| + | If needed, press '' | ||
| + | |||
| + | </ | ||
| + | |||
| + | 4. Begin a new branch for development: | ||
| + | |||
| + | ```shell | ||
| + | $ repo start < | ||
| + | ``` | ||
| + | |||
| + | <tabbox Android 11> | ||
| + | Install git-lfs tool to download Android 11.0 SDK | ||
| + | |||
| + | ```shell | ||
| + | $ sudo apt install git-lfs | ||
| + | ``` | ||
| + | |||
| + | 1. Create an empty directory to store working files: | ||
| ```shell | ```shell | ||
| Line 29: | Line 64: | ||
| ``` | ``` | ||
| - | 2) Run '' | + | 2. Run '' |
| ```shell | ```shell | ||
| - | $ repo init -u https:// | + | $ repo init -u https:// |
| ``` | ``` | ||
| - | 3) Run '' | + | 3. Run '' |
| ```shell | ```shell | ||
| - | $ repo sync -j4 | + | $ repo sync -c -j4 |
| ``` | ``` | ||
| The initial sync operation may take an hour or more to complete. | The initial sync operation may take an hour or more to complete. | ||
| - | + | < | |
| - | < | + | |
| You might need to run above command repeatly if it fails halfway. Or you can try with this script instead: | You might need to run above command repeatly if it fails halfway. Or you can try with this script instead: | ||
| - | + | ```bash | |
| - | ```shell | + | repo sync -c -j4 |
| - | #!/bin/bash | + | |
| - | repo sync -j4 | + | |
| while [ $? = 1 ]; do | while [ $? = 1 ]; do | ||
| - | echo "Sync failed, repeat again:" | + | echo "Sync failed, repeat again:" |
| - | repo sync -j4 | + | repo sync -c -j4 |
| done | done | ||
| ``` | ``` | ||
| - | + | ||
| - | **If needed, press Ctrl-\ to quit.** | + | If needed, press '' |
| </ | </ | ||
| + | 4. Run the following command to pull large files. Otherwise, compilation will report an [[https:// | ||
| + | ```shell | ||
| + | $ repo forall -c 'git lfs pull' | ||
| + | ``` | ||
| - | 4) Begin a new branch for development: | + | 5. Begin a new branch for development: |
| ```shell | ```shell | ||
| $ repo start < | $ repo start < | ||
| ``` | ``` | ||
| + | </ | ||
| + | ===== Download from cloud drive ===== | ||
| + | Chinese developers can download base package from cloud drive. Then synchronize the code.\\ | ||
| + | |||
| + | 1. Download the android source code base package from follow links.\\ | ||
| + | |||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | 2. Use the following command to unzip the base package and synchronize the code. | ||
| + | ```shell | ||
| + | $ cat vim4-androidXX-XXXXXXXX.tar.gza* | tar -xzv | ||
| + | $ .repo/ | ||
| + | $ .repo/ | ||
| + | ``` | ||
| ===== Further Reading ===== | ===== Further Reading ===== | ||
| * [[https:// | * [[https:// | ||
| * [[products: | * [[products: | ||