Theos/Setup: Difference between revisions

From iPhone Development Wiki
(→‎Creating a Project: example of using NIC.)
Line 54: Line 54:


  $THEOS/bin/nic.pl
  $THEOS/bin/nic.pl
NIC will prompt you for all the necessary information before creating a project.


=== NIC example ===
=== NIC example ===
Line 72: Line 74:
Done.
Done.
$ </pre>
$ </pre>
NIC will prompt you for all the necessary information before creating a project.


== Getting Help ==
== Getting Help ==


If you need further assistance, or if you have other questions about Theos itself, feel free to connect to #theos on irc.saurik.com using your preferred IRC client.
If you need further assistance, or if you have other questions about Theos itself, feel free to connect to #theos on irc.saurik.com using your preferred IRC client.

Revision as of 06:10, 24 August 2010

Purpose

This page contains instructions for installing Theos and preparing a new project.

Requirements

  • A UNIX-based operating system (Mac OS X, iOS (jailbroken), and most variants of Linux should do)
    • subversion or git
    • curl
    • perl
  • Some form of a toolchain or official SDK
  • Access to a terminal emulator and some knowledge of how to use it

More detailed explanations of these requirements are given in the next section, and are dependent on the environment you use.

Setting Up Dependencies

For Mac OS X

Mac OS X comes with most of the necessary tools (subversion, curl, and perl) by default. You will still need compilation tools and the iOS SDK, and the easiest way to obtain both of these is by installing the official iOS SDK from Apple's web site. (You will have to register for a free developer account in order to download it.)

Newer versions of the iOS SDK do not come with support for iOS 3.x, which Theos currently expects by default. You will need to either install a 3.x SDK component yourself, or set the variable SDKVERSION=4.0 in your environment later on.

For iOS

To be written.

For Linux

To be written.

Installing Theos

On Mac OS X or Linux

  1. Open a terminal window.
  2. Choose a location for Theos to be installed. If you are unsure, a good choice is /opt/theos.
    export THEOS=/opt/theos
    • If you chose a location outside of your user's home directory, you will probably need to run some or all of the following commands with root permissions.
  3. Download the latest version of Theos:
    • Using subversion:
      svn co http://svn.howett.net/svn/theos/trunk $THEOS
    • Alternatively, you can use git, if you prefer:
      git clone git://github.com/DHowett/theos.git $THEOS
  4. Download a libsubstrate.dylib stub (x86, x64, arm) to $THEOS/lib:
    curl -s http://dl.dropbox.com/u/3157793/stub/libsubstrate.dylib > $THEOS/lib/libsubstrate.dylib; chmod +x $THEOS/lib/libsubstrate.dylib
  5. Download substrate.h to $THEOS/include:
    curl -s http://svn.saurik.com/repos/menes/trunk/mobilesubstrate/substrate.h > $THEOS/include/substrate.h
  6. Download ldid to $THEOS/bin:
    curl -s http://dl.dropbox.com/u/3157793/ldid > $THEOS/bin/ldid; chmod +x $THEOS/bin/ldid

On iOS

To be written.

Creating a Project

Theos lets you create new projects based on templates using the New Instance Creator (NIC). You do not need to be root to do this step, nor should you be. Start the NIC wizard using the following command:

$THEOS/bin/nic.pl

NIC will prompt you for all the necessary information before creating a project.

NIC example

$ $THEOS/bin/nic.pl
NIC 1.0 - New Instance Creator
------------------------------
  [1.] iphone/application
  [2.] iphone/library
  [3.] iphone/preference_bundle
  [4.] iphone/tool
  [5.] iphone/tweak
Choose a Template (required): 1
Project Name (required): iPhoneDevWiki
Package Name [com.yourcompany.iphonedevwiki]: net.howett.iphonedevwiki
Authour/Maintainer Name [Dustin L. Howett]:              
Instantiating iphone/application in iphonedevwiki/...
Done.
$ 

Getting Help

If you need further assistance, or if you have other questions about Theos itself, feel free to connect to #theos on irc.saurik.com using your preferred IRC client.