接手
android也有一年的時間了,由于剛開始學(xué)習(xí)時資料比較少,又大多都是斷章取義的,所以對于android我一直處于似懂非懂的狀態(tài)下。今天終于感覺到該留點(diǎn)學(xué)習(xí)的經(jīng)驗(yàn)吧,那就從這篇開始我的android系列文章了。
Android使用Git管理源代碼的,在Linux下我們可以使用ubuntu來獲取系統(tǒng)源碼,下面我就逐步介紹在Windows些如何獲取
Android系統(tǒng)源碼了。
一。安裝msysGit
在google的
http://code.google.com/p/msysgit/中這樣介紹到:
If you just want to use Git to do your version control in Windows, you will need to download Git for Windows, run the installer, and you are ready to start. Note: Git for Windows is a project run by volunteers, so if you want it to improve, volunteer!
…
If you want to download and install the complete source code of Git for Windows (including C compiler) to start hacking, you will need to install the full development system which is called msysGit.
注釋:如果你需要使用Git工具在Windows下進(jìn)行版本控制,你可以使用基于Windows的Git,這里提供了msysGit的安裝下載。
我們選擇full安裝版本,
http://code.google.com/p/msysgit/downloads/detail?name=msysGit-fullinstall-1.7.3.1-preview20101002.exe。
下載msysGit安裝包后安裝,在安裝過程中msysGit會自動的安裝或編譯基于Windows環(huán)境的Git。編譯Git需要點(diǎn)時間,安裝完后截圖如下:
這就是Git的shell窗口,你可以在其中通過命名行操作下載得到Android的系統(tǒng)源碼,下面就以Lunacher——桌面——為例下載源碼。
二。下載Luancher源碼
Android系統(tǒng)源碼都在http://Android.git.kernel.org/網(wǎng)址下,其中那個系統(tǒng)app都在platform/packages/apps結(jié)構(gòu)下。
在剛才的Git的shell命名行窗口中輸入下面的命名:
git clone git://android.git.kernel.org/platform/packages/apps/Luancher2.git
你就可以在你的msysGit安裝目錄的git下(~\msysgit\msysgit\git)看到Luancher工程文件夾了。
然后打開~\msysgit\msysgit\git\Luancher2文件夾,就可以看到Android的Luancher系統(tǒng)源碼工程了。
對于其他的app系統(tǒng)源碼的獲取方法和上述的Luancher相同,只是命名行后的參數(shù)不同。
git clone git://android.git.kernel.org/需下載源碼的app所在的位置。
三。啟動msysGit
有些朋友在關(guān)閉了msysGit命名行窗口后就找不到重新打開的鏈接了,不用著急,你只需要在你安裝的msysGit路徑下雙擊執(zhí)行msys.bat文件即可。
所有的都大功告成了。
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報(bào)。