Sunday, September 20, 2009

Get and build source code in Cygwin

You should install Java 5 on your computer first!!
Add the path of javac.exe to $PATH.

Download cygwin from http://cygwin.com/setup.exe

Choose A Download Site: You can choose many Taiwan sites. 

Select Packages:( Select Binary )

Press 'View' to Not Installed

Bison: A parser generator that is compatible with YACC
Curl: Command line tool for tranferring files with HTTP, HTTPS, FTP, etc.
Flex: A fast lexical analyzer generator
Gcc: C compiler upgrade helper
Git: Fast version control system - core files
Gperf: Perfect hash function generator
Libncurses-devel: Libraries for terminal handling (development)
Make: The GNU version of the 'make' utility
Python: An interactive object-oriented scripting language
Vim: Vi IMproved - enhanced vi editor
Wget: Utility to retrieve files from the WWW via HTTP and FTP
Zip: The zlib compression and decompression library

Installing as below picture

[caption id="attachment_73" align="alignnone" width="450" caption="Installing Cygwin"]Installing Cygwin[/caption]

/*
create a directory to store some source code
mkdir src
cd src

Install libsdl (http://www.libsdl.org/) not libsdl-dev as Android open project mentioned
wget http://www.libsdl.org/release/SDL-1.2.13.tar.gz
tar -zxvf SDL-1.2.13.tar.gz
cd SDL-1.2.13
./configure
make
make install
if success, you can find SDL.dll in /usr/local/bin

Install libwxgtk2.6-dev
Download "libwxgtk2.6-devel-2.6.4-14mdv2008.1.i586.rpm" from http://rpmfind.net/linux/rpm2html/search.php?query=libwxgtk-devel
Copy it to ~/src
*/

Install cyg-apt
cd /bin
wget http://www.lilypond.org/~janneke/software/cyg-apt
chmod a+rx cyg-apt
vi cyg-apt
1. root = '/cygwin' => root = '/'
2. downloads = root + '/var/cache..... => downloads = root + 'var/cache....
3. config = root + '/etc/setup' => config = root + 'etc/setup'
4. mirror = 'http://mirror.mcs.anl.gov/cygwin'
cyg-apt setup
cyg-apt update

Install some essential application
libsdl-dev
libesd0-dev
libwxgtk2.6-dev
valgrind
zlib1g-dev
libncurses5-dev
git-core gnupg

Reference:
1. Frequently Asked Questions about Java and Cygwin
2. apt for cygwin

No comments:

Post a Comment

You can leave any question here and I will make a response to you ASAP. :D