javacom / toolchain4_cygwin

iPhone toolchain4 for cygwin
9 stars 5 forks source link

Cygwin iPhone Toolchain 4

  1. Install cygwin in Windows http://cygwin.com/install.html Choose Admin, Archive, Base, Devel, Libs, Net, Python, System, Utils, Web

  2. Launch cygwin Clone Project cd / git clone git://github.com/javacom/toolchain4_cygwin.git toolchain4

    Download pre-built gcc & cctools from http://www.2shared.com/file/nctMF-IN/toolchain4_cygwintar.html to / Install gcc & cctools tar xjvf /toolchain4_cygwin.tar.bz2 -C /

  3. Install as_driver cd /toolchain4/as_driver make cd /usr/bin mv as.exe i686-pc-cygwin-as.exe cp -p /toolchain4/as_driver/as_driver.exe as.exe ln -s /toolchain4/pre/bin/arm-apple-darwin9-as.exe . mv ld.exe i686-pc-cygwin-ld.exe cp -p /toolchain4/as_driver/as_driver.exe ld.exe ln -s /toolchain4/pre/bin/arm-apple-darwin9-ld.exe .

  4. Put iPhoneOS4.2.pkg to /toolchain4/sdks/ (see toolchain4 wiki) build xar ./toolchain.sh xar

    see Wiki if problems on building xar

    then put iPhoneSDK4_2.pkg to /toolchain4/sdks/ Use ./toolchain.sh buildsys to build sys

    Put iPhoneSDKHeadersAndLibs_32.pkg & MacOSX10.5.pkg to /toolchain4/sdks/ ./toolchain.sh build32 to build sys32

    Put iPhoneSDK5_0.pkg to /toolchain4/sdks/ Use ./toolchain.sh buildsys50 to build sys50

  5. Install clang in cygwin mkdir /toolchain4/src cd /toolchain4/src svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm cd llvm/tools svn co http://llvm.org/svn/llvm-project/cfe/trunk clang mkdir /toolchain4/bld cd /toolchain4/bld ../src/llvm/configure make make install clang -v

  6. Test iOS4 sample code cd /toolchain4/Projects/LocalPush make make dist (LocalPush.app & LocalPush.ipa will be in build/4.0/ folder)

  7. Checkout the updated UICatalog in svn here svn checkout http://apiexplorer.googlecode.com/svn/trunk/UICatalog UICatalog-read-only cd UICatalog-read-only make -f Makefile.ios4 make -f Makefile.ios4 dist (Then install the build/4.0/UICatalog.ipa to iPhone for testing)

Enjoy.


Instructions to add theos build system to toolchain4_cygwin

  1. Installation cd /toolchain4 git clone git://github.com/DHowett/theos.git theos mv /toolchain4/theos/include /toolchain4/theos/include.bak cd /toolchain4/theos/templates git clone git://github.com/DHowett/theos-nic-templates.git theos-nic-templates cd /toolchain4/theos git clone git://github.com/rpetrich/iphoneheaders.git include for FILE in /toolchain4/theos/include.bak/*.h; do mv $FILE /toolchain4/theos/include/; done rmdir /toolchain4/theos/include.bak cp /toolchain4/Projects/IOSurfaceAPI.h /toolchain4/theos/include/IOSurface/. cp /toolchain4/pre/bin/ldid.exe /toolchain4/theos/bin/. cp /toolchain4/Projects/common.mk /toolchain4/theos/makefiles/. cp /toolchain4/Projects/libsubstrate.dylib /toolchain4/theos/lib/.

  2. This is how to create theos project cd /toolchain4/Projects /toolchain4/theos/bin/nic.pl

  3. Test iOS5 sample notification center widget (requires sys50) cd /toolchain4/Projects/widgettest/ make && make stage deb

  4. Test mobilesubstrate extension (requires sys32) cd /toolchain4/Projects git clone git://github.com/DHowett/preferenceloader.git preferenceloader cd /toolchain4/Projects/preferenceloader cp /toolchain4/Projects/Makefile_for_preferenceloader Makefile make && make stage deb

Enjoy.