cygwin下安裝軟件


分類: Android Linux 826人閱讀 評論(2) 收藏 舉報

目錄(?)[+]

很多時候,我們在windows下安裝完cygwin後,使用時發現裝少了軟件。那麼怎麼辦?

1)有的人說用setup.exe那個玩意再搞一遍。個人比較覺得那個方法蛋疼。

2)有的人說用find命令,怎麼安裝之類的,也不太爽。

3)後來發現apt-cyg這個程序,真是強大啊。使用方法和ubuntu下的apt-get一樣。爽死啦。


安裝apt-cyg的方法如下(在cygwin中輸入如下命令):

  # svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
  # chmod +x /bin/apt-cyg

使用apt-cyg來安裝軟件:

  # apt-cyg install git-core gnupg flex bison gperf build-essential zip curl

好了開始下載android源代碼吧:

新建home下的bin目錄:

$ mkdir ~/bin
$ PATH=~/bin:$PATH
下載repo:

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
新建工程目錄:

$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
初始化倉庫:

$ repo init -u https://android.googlesource.com/platform/manifest
下載文件:

$ repo sync

參考:

你要是想看看這個牛逼的軟件是怎麼實現的可以checkout過來看看(其實就是shell腳本。O(∩_∩)O哈哈~):

svn checkout http://apt-cyg.googlecode.com/svn/trunk/ apt-cyg-read-only

工程鏈接如下:

http://code.google.com/p/apt-cyg/


當然如果屌絲想看英文就看吧:

Intro

apt-cyg is a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository. The syntax is similar to apt-get. Usage examples:

  • "apt-cyg install <package names>" to install packages
  • "apt-cyg remove <package names>" to remove packages
  • "apt-cyg update" to update setup.ini
  • "apt-cyg show" to show installed packages
  • "apt-cyg find <pattern(s)>" to find packages matching patterns
  • "apt-cyg describe <pattern(s)>" to describe packages matching patterns
  • "apt-cyg packageof <commands or files>" to locate parent packages

Quick start

First install subversion and wget through the standard cygwin setup program. Then run the following commands:

  # svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
  # chmod +x /bin/apt-cyg
  • use apt-cyg, for example:
  # apt-cyg install nano
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章