Theos/Setup: Difference between revisions

From iPhone Development Wiki
(Undo revision 5753 by Kritanta (talk))
Tags: Replaced Undo
 
(149 intermediate revisions by 33 users not shown)
Line 1: Line 1:
== Purpose ==
{{soft redirect|https://theos.dev/install}}


This page contains instructions for installing [[Theos]] and preparing a new project.
This article is obsolete, and has been replaced by the [https://theos.dev/install theos.dev website].


== Requirements ==
If you need historical installation instructions, you can find the last version of this article [https://iphonedev.wiki/index.php?title=Theos/Setup&oldid=5735 here].
 
* 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 [http://developer.apple.com/iphone/ 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 ===
 
# Open a terminal window.
# Choose a location for Theos to be installed. If you are unsure, a good choice is <tt>/opt/theos</tt>.<pre>export THEOS=/opt/theos</pre>
#* 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.
# Download the latest version of Theos:
#* Using subversion: <pre>svn co http://svn.howett.net/svn/theos/trunk $THEOS</pre>
#* Alternatively, you can use git, if you prefer: <pre>git clone git://github.com/DHowett/theos.git $THEOS</pre>
# Download <tt>ldid</tt> to <tt>$THEOS/bin</tt>: <pre>curl -s http://dl.dropbox.com/u/3157793/ldid > $THEOS/bin/ldid; chmod +x $THEOS/bin/ldid</pre>
 
=== On iOS ===
 
(On your iOS device:)
 
# Create a file at <tt>/etc/apt/sources.list.d/coredev.nl.list</tt> containing the following line: <pre>deb http://coredev.nl/cydia iphone main</pre>
# Create a file at <tt>/etc/apt/sources.list.d/howett.net.list</tt> containing the following line: <pre>deb http://nix.howett.net/theos ./</pre>
# As root, issue these commands (using either SSH or MobileTerminal): <pre>apt-get update</pre><pre>apt-get install perl theos</pre>
Might need to be: <pre>apt-get install perl net.howett.theos</pre>
 
'''Note:''' Theos will be installed to <tt>/var/theos/</tt> on your device, hereafter referred to as <tt>$THEOS</tt> in this guide.
 
==== Alternative method ====
 
By following the instructions in http://dl.dropbox.com/u/876743/toolchain.txt;
 
<pre>
cd ~
 
echo 'deb http://nix.howett.net/theos ./' > /etc/apt/sources.list.d/_theos.list
 
echo 'deb http://coredev.nl/cydia iphone main' > /etc/apt/sources.list.d/_perl.list
 
apt-get update
 
apt-get install subversion wget make ldid com.ericasadun.utilities adv-cmds mobilesubstrate net.howett.theos perl
 
rm /etc/apt/sources.list.d/_theos.list
rm /etc/apt/sources.list.d/_perl.list
 
wget http://dl.dropbox.com/u/876743/sdk300.deb
dpkg -i sdk300.deb
rm sdk300.deb
 
cd /var/sdk/usr/lib
 
ln -s libgcc_s.1.dylib libgcc_s.10.5.dylib
ln -s dylib1.o dylib1.10.5.o
ln -s /usr/lib/libsubstrate.dylib libsubstrate.dylib
 
cd ~
 
wget http://apt.saurik.com/cydia/debs/libgcc_4.2-20080410-1-6_iphoneos-arm.deb
dpkg -i libgcc_4.2-20080410-1-6_iphoneos-arm.deb
rm libgcc_4.2-20080410-1-6_iphoneos-arm.deb
 
apt-get install iphone-gcc
</pre>
 
If later, after calling <tt>make</tt> on your project, you get the error <tt>ld: library not found for -lcrt1.10.5.o</tt>, perform the following;
 
<pre>
cd /private/var/sdk/usr/lib
ln -s crt1.o crt1.10.5.0
</pre>
 
== 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 ===
 
Here is an example of what you will see when using the NIC to create a project (with user input shown in bold):
 
$ '''$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.
$
 
The above will create a folder <tt>./iphonedevwiki</tt> in the current working directory - make sure you have permissions to create a folder.
 
== 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.

Latest revision as of 07:05, 8 January 2022

Error creating thumbnail: File missing

https://theos.dev/install

This article is obsolete, and has been replaced by the theos.dev website.

If you need historical installation instructions, you can find the last version of this article here.