[mobileterminal commit] r384 - Add a "MobileTerminal" xcode project that combines the VT100.framework and

145 views
Skip to first unread message

codesite...@google.com

unread,
Jul 12, 2009, 1:26:51 AM7/12/09
to mobilet...@googlegroups.com
Author: allen.porter
Date: Sat Jul 11 22:26:13 2009
New Revision: 384

Added:
branches/applesdk/MobileTerminal/
branches/applesdk/MobileTerminal/Classes/
branches/applesdk/MobileTerminal/Classes/MobileTerminalAppDelegate.h
branches/applesdk/MobileTerminal/Classes/MobileTerminalAppDelegate.m
branches/applesdk/MobileTerminal/Classes/MobileTerminalViewController.h
branches/applesdk/MobileTerminal/Classes/MobileTerminalViewController.m
branches/applesdk/MobileTerminal/Classes/TerminalKeyboard.h
branches/applesdk/MobileTerminal/Classes/TerminalKeyboard.m
branches/applesdk/MobileTerminal/MainWindow.xib
branches/applesdk/MobileTerminal/MobileTerminal-Info.plist
branches/applesdk/MobileTerminal/MobileTerminal.xcodeproj/

branches/applesdk/MobileTerminal/MobileTerminal.xcodeproj/project.pbxproj
(contents, props changed)
branches/applesdk/MobileTerminal/MobileTerminalViewController.xib
branches/applesdk/MobileTerminal/MobileTerminal_Prefix.pch
branches/applesdk/MobileTerminal/main.m
Modified:
branches/applesdk/SubProcess/SubProcess.h

Log:
Add a "MobileTerminal" xcode project that combines the VT100.framework and
SubProcess.framework into a (somewhat) working terminal.

This is still missing tons of great features from the trunk, but, actually
does
work with a full terminal in the iPhoneSimulator using the official SDK!

Added: branches/applesdk/MobileTerminal/Classes/MobileTerminalAppDelegate.h
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/Classes/MobileTerminalAppDelegate.h
Sat Jul 11 22:26:13 2009
@@ -0,0 +1,18 @@
+// MobileTerminalAppDelegate.h
+// MobileTerminal
+
+#import <UIKit/UIKit.h>
+
+@class MobileTerminalViewController;
+
+@interface MobileTerminalAppDelegate : NSObject <UIApplicationDelegate> {
+@private
+ UIWindow *window;
+ MobileTerminalViewController *viewController;
+}
+
+@property (nonatomic, retain) IBOutlet UIWindow *window;
+@property (nonatomic, retain) IBOutlet MobileTerminalViewController
*viewController;
+
+@end
+

Added: branches/applesdk/MobileTerminal/Classes/MobileTerminalAppDelegate.m
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/Classes/MobileTerminalAppDelegate.m
Sat Jul 11 22:26:13 2009
@@ -0,0 +1,27 @@
+// MobileTerminalAppDelegate.m
+// MobileTerminal
+
+#import "MobileTerminalAppDelegate.h"
+#import "MobileTerminalViewController.h"
+
+@implementation MobileTerminalAppDelegate
+
+@synthesize window;
+@synthesize viewController;
+
+
+- (void)applicationDidFinishLaunching:(UIApplication *)application {
+ // Override point for customization after app launch
+ [window addSubview:viewController.view];
+ [window makeKeyAndVisible];
+}
+
+
+- (void)dealloc {
+ [viewController release];
+ [window release];
+ [super dealloc];
+}
+
+
+@end

Added:
branches/applesdk/MobileTerminal/Classes/MobileTerminalViewController.h
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/Classes/MobileTerminalViewController.h
Sat Jul 11 22:26:13 2009
@@ -0,0 +1,26 @@
+// MobileTerminalViewController.h
+// MobileTerminal
+
+#import <UIKit/UIKit.h>
+#import "TerminalKeyboard.h"
+
+@class VT100TextView;
+@class SubProcess;
+@class PTY;
+@class TerminalKeyboard;
+
+@interface MobileTerminalViewController : UIViewController
<TerminalKeyboardProtocol> {
+@private
+ VT100TextView *vt100TextView;
+ SubProcess *subProcess;
+ PTY* pty;
+ TerminalKeyboard* terminalKeyboard;
+ BOOL keyboardShown;
+}
+
+@property (nonatomic, retain) IBOutlet VT100TextView *vt100TextView;
+
+- (void)receiveKeyboardInput:(NSData*)data;
+
+@end
+

Added:
branches/applesdk/MobileTerminal/Classes/MobileTerminalViewController.m
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/Classes/MobileTerminalViewController.m
Sat Jul 11 22:26:13 2009
@@ -0,0 +1,155 @@
+// MobileTerminalViewController.m
+// MobileTerminal
+
+#import "MobileTerminalViewController.h"
+
+#import <VT100/VT100TextView.h>
+#import <SubProcess/SubProcess.h>
+#import "TerminalKeyboard.h"
+
+@implementation MobileTerminalViewController
+
+@synthesize vt100TextView;
+
+- (void)dataAvailable:(NSNotification *)aNotification {
+ // Forward the subprocess data into the terminal character handler
+ NSData* data = [[aNotification userInfo]
objectForKey:NSFileHandleNotificationDataItem];
+ [vt100TextView readInputStream:data];
+
+ // Queue another read
+ [[subProcess fileHandle] readInBackgroundAndNotify];
+}
+
+// The designated initializer. Override to perform setup that is required
before the view is loaded.
+- (id)initWithCoder:(NSCoder *)decoder
+{
+ self = [super initWithCoder:decoder];
+ if (self != nil) {
+ subProcess = [[SubProcess alloc] init];
+ pty = NULL;
+ terminalKeyboard = [[TerminalKeyboard alloc] init];
+ terminalKeyboard.inputDelegate = self;
+ keyboardShown = NO;
+ }
+ return self;
+}
+
+- (void)registerForKeyboardNotifications
+{
+ [[NSNotificationCenter defaultCenter] addObserver:self
+
selector:@selector(keyboardWasShown:)
+
name:UIKeyboardDidShowNotification object:nil];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+
selector:@selector(keyboardWasHidden:)
+
name:UIKeyboardDidHideNotification object:nil];
+}
+
+- (void)keyboardWasShown:(NSNotification*)aNotification
+{
+ if (keyboardShown)
+ return;
+
+ NSDictionary* info = [aNotification userInfo];
+
+ // Get the size of the keyboard.
+ NSValue* aValue = [info objectForKey:UIKeyboardBoundsUserInfoKey];
+ CGSize keyboardSize = [aValue CGRectValue].size;
+
+ // Resize the scroll view (which is the root view of the window)
+ CGRect viewFrame = [[self view] frame];
+ viewFrame.size.height -= keyboardSize.height;
+ [self view].frame = viewFrame;
+
+ keyboardShown = YES;
+}
+
+// TODO(allen): This doesn't do the right thing when rotating in the
simulator
+- (void)keyboardWasHidden:(NSNotification*)aNotification
+{
+ if (!keyboardShown)
+ return;
+
+ NSDictionary* info = [aNotification userInfo];
+
+ // Get the size of the keyboard.
+ NSValue* aValue = [info objectForKey:UIKeyboardBoundsUserInfoKey];
+ CGSize keyboardSize = [aValue CGRectValue].size;
+
+ // Reset the height of the scroll view to its original value
+ CGRect viewFrame = [[self view] frame];
+ viewFrame.size.height += keyboardSize.height;
+ [self view].frame = viewFrame;
+
+ keyboardShown = NO;
+}
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ vt100TextView.font = [UIFont fontWithName:@"Courier" size:10.0f];
+
+
+ // Adding the keyboard to the view has no effect, except that it is will
+ // later allow us to make it the first responder so we can show the
keyboard
+ // on the screen.
+ [[self view] addSubview:terminalKeyboard];
+
+ [self registerForKeyboardNotifications];
+
+ // Show the keyboard
+ // TODO(allen): This should hook in with preferences
+ [terminalKeyboard becomeFirstResponder];
+
+ // Prepare subprocess stuff
+ [subProcess start];
+
+ // Resize the PTY based on the font size of the text view
+ pty = [[PTY alloc] initWithFileHandle:[subProcess fileHandle]];
+ [pty setWidth:[vt100TextView width] withHeight:[vt100TextView height]];
+
+ // Schedule an async read of the subprocess. Invokes our callback when
+ // data becomes available.
+ [[NSNotificationCenter defaultCenter] addObserver:self
+
selector:@selector(dataAvailable:)
+
name:NSFileHandleReadCompletionNotification
+ object:[subProcess
fileHandle]];
+ [[subProcess fileHandle] readInBackgroundAndNotify];
+}
+
+-
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
+ // This supports everything except for upside down, since upside down is
most
+ // likely accidental.
+ switch (interfaceOrientation) {
+ case UIInterfaceOrientationPortrait:
+ case UIInterfaceOrientationLandscapeLeft:
+ case UIInterfaceOrientationLandscapeRight:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+- (void)didReceiveMemoryWarning {
+ // TODO(allen): Should clear scrollback buffers to save memory?
+ [super didReceiveMemoryWarning];
+}
+
+- (void)viewDidUnload {
+ [subProcess stop];
+ [pty dealloc];
+ pty = NULL;
+}
+
+- (void)dealloc {
+ [subProcess dealloc];
+ [super dealloc];
+}
+
+- (void)receiveKeyboardInput:(NSData*)data
+{
+ // Forward the data from the keyboard directly to the subprocess
+ [[subProcess fileHandle] writeData:data];
+}
+
+@end

Added: branches/applesdk/MobileTerminal/Classes/TerminalKeyboard.h
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/Classes/TerminalKeyboard.h Sat Jul 11
22:26:13 2009
@@ -0,0 +1,29 @@
+// TerminalKeyboard.h
+// MobileTerminal
+
+#import <UIKit/UIKit.h>
+
+@class InputHandler;
+
+// Protocol implemented by listener of keyboard events
+@protocol TerminalKeyboardProtocol
+@required
+- (void)receiveKeyboardInput:(NSData*)data;
+@end
+
+// The terminal view. This is an opaque view that triggers rendering of
the
+// keyboard on the screen -- the keyboard is not rendered in this view
itself.
+@interface TerminalKeyboard : UIView {
+@private
+ InputHandler* inputHandler;
+ id<TerminalKeyboardProtocol> inputDelegate;
+}
+
+@property (nonatomic, retain) id<TerminalKeyboardProtocol> inputDelegate;
+
+// Show and hide the keyboard, respectively. Callers can listen to system
+// keyboard notifications to get notified when the keyboard is shown.
+- (BOOL)becomeFirstResponder;
+- (BOOL)resignFirstResponder;
+
+@end
\ No newline at end of file

Added: branches/applesdk/MobileTerminal/Classes/TerminalKeyboard.m
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/Classes/TerminalKeyboard.m Sat Jul 11
22:26:13 2009
@@ -0,0 +1,103 @@
+// TerminalKeyboard.m
+// MobileTerminal
+
+#import "TerminalKeyboard.h"
+#import <UIKit/UIKit.h>
+
+// The InputHandler
+//
+@interface InputHandler : UITextField <UITextFieldDelegate>
+{
+@private
+ TerminalKeyboard* terminalKeyboard;
+ NSData* backspaceData;
+}
+- (id)initWithTerminalKeyboard:(TerminalKeyboard*)keyboard;
+@end
+
+@implementation InputHandler
+
+- (id)initWithTerminalKeyboard:(TerminalKeyboard*)keyboard
+{
+ self = [super init];
+ if (self != nil) {
+ terminalKeyboard = keyboard;
+ [self setKeyboardType:UIKeyboardTypeASCIICapable];
+ [self setAutocapitalizationType:UITextAutocapitalizationTypeNone];
+ [self setAutocorrectionType:UITextAutocorrectionTypeNo];
+ [self setEnablesReturnKeyAutomatically:NO];
+
+ // To intercept keyboard events we make this object its own delegate.
A
+ // workaround to the fact that we don't get keyboard events for
backspaces
+ // in an empty text field is that we put some text in the box, but
always
+ // return NO from our delegate method so it is never changed.
+ [self setText:@" "];
+ [self setDelegate:self];
+
+ // Data to send in response to a backspace. This is created now so it
is
+ // not re-allocated on ever backspace event.
+ backspaceData = [[NSData alloc] initWithBytes:"\x08" length:1];
+ }
+ return self;
+}
+
+- (void) dealloc
+{
+ [backspaceData release];
+ [super dealloc];
+}
+
+
+- (BOOL)textField:(UITextField *)textField
shouldChangeCharactersInRange:(NSRange)range
+
replacementString:(NSString *)string
+{
+ // An empty replacement string means a backspace event
+ NSData* data =
+ ([string length] == 0) ? backspaceData
+ : [string
dataUsingEncoding:NSUTF8StringEncoding];
+ [[terminalKeyboard inputDelegate] receiveKeyboardInput:data];
+ // Don't let the text get updated so never have to worry about not
getting
+ // a backspace event.
+ return NO;
+}
+
+@end
+
+
+@implementation TerminalKeyboard
+
+@synthesize inputDelegate;
+
+- (id)init
+{
+ self = [super init];
+ if (self != nil) {
+ [self setOpaque:YES];
+
+ // Handles key presses and forward them back to us
+ inputHandler = [[InputHandler alloc] initWithTerminalKeyboard:self];
+ [self addSubview:inputHandler];
+ }
+ return self;
+}
+
+- (void)drawRect:(CGRect)rect {
+ // Nothing to see here
+}
+
+- (BOOL)becomeFirstResponder
+{
+ return [inputHandler becomeFirstResponder];
+}
+
+- (BOOL)resignFirstResponder
+{
+ return [inputHandler resignFirstResponder];
+}
+
+- (void)dealloc {
+ [inputHandler release];
+ [super dealloc];
+}
+
+@end

Added: branches/applesdk/MobileTerminal/MainWindow.xib
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/MainWindow.xib Sat Jul 11 22:26:13 2009
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
+ <data>
+ <int key="IBDocument.SystemTarget">768</int>
+ <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="10"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ </object>
+ <object class="IBProxyObject" id="427554174">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ </object>
+ <object class="IBUICustomObject" id="664661524"/>
+ <object class="IBUIViewController" id="943309135">
+ <string key="IBUINibName">MobileTerminalViewController</string>
+ </object>
+ <object class="IBUIWindow" id="117978783">
+ <nil key="NSNextResponder"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrameSize">{320, 480}</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="664661524"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">viewController</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="943309135"/>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="664661524"/>
+ <reference key="destination" ref="117978783"/>
+ </object>
+ <int key="connectionID">14</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="110820876">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="110820876"/>
+ <string type="base64-UTF8"
key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="664661524"/>
+ <reference key="parent" ref="110820876"/>
+ <string key="objectName">MobileTerminal App Delegate</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="427554174"/>
+ <reference key="parent" ref="110820876"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">10</int>
+ <reference key="object" ref="943309135"/>
+ <reference key="parent" ref="110820876"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">12</int>
+ <reference key="object" ref="117978783"/>
+ <reference key="parent" ref="110820876"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>10.CustomClassName</string>
+ <string>10.IBEditorWindowLastContentRect</string>
+ <string>10.IBPluginDependency</string>
+ <string>12.IBEditorWindowLastContentRect</string>
+ <string>12.IBPluginDependency</string>
+ <string>3.CustomClassName</string>
+ <string>3.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>UIApplication</string>
+ <string>UIResponder</string>
+ <string>MobileTerminalViewController</string>
+ <string>{{332, 258}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>{{525, 346}, {320, 480}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>MobileTerminalAppDelegate</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">14</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">MobileTerminalAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>viewController</string>
+ <string>window</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>MobileTerminalViewController</string>
+ <string>UIWindow</string>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">Classes/MobileTerminalAppDelegate.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">MobileTerminalAppDelegate</string>
+ <string key="superclassName">NSObject</string>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBUserSource</string>
+ <string key="minorKey"/>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
+ <string key="className">MobileTerminalViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">vt100TextView</string>
+ <string key="NS.object.0">VT100TextView</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string
key="minorKey">Classes/MobileTerminalViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string
key="IBDocument.LastKnownRelativeProjectPath">MobileTerminal.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>

Added: branches/applesdk/MobileTerminal/MobileTerminal-Info.plist
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/MobileTerminal-Info.plist Sat Jul 11
22:26:13 2009
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST
1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+
<string>com.googlecode.mobileterminal.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+</dict>
+</plist>

Added:
branches/applesdk/MobileTerminal/MobileTerminal.xcodeproj/project.pbxproj
==============================================================================
--- (empty file)
+++
branches/applesdk/MobileTerminal/MobileTerminal.xcodeproj/project.pbxproj
Sat Jul 11 22:26:13 2009
@@ -0,0 +1,274 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1D3623260D0F684500981E51 /* MobileTerminalAppDelegate.m in Sources */ =
{isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /*
MobileTerminalAppDelegate.m */; };
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile;
fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa
= PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework
*/; };
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa =
PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
+ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ =
{isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /*
CoreGraphics.framework */; };
+ 2899E5220DE3E06400AC0155 /* MobileTerminalViewController.xib in
Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /*
MobileTerminalViewController.xib */; };
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa =
PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
+ 28D7ACF80DDB3853001CB0EB /* MobileTerminalViewController.m in Sources */
= {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /*
MobileTerminalViewController.m */; };
+ 2C7C795710096AD300136948 /* VT100.framework in Frameworks */ = {isa =
PBXBuildFile; fileRef = 2C7C795610096AD300136948 /* VT100.framework */; };
+ 2C7C795E10096AE100136948 /* SubProcess.framework in Frameworks */ = {isa
= PBXBuildFile; fileRef = 2C7C795D10096AE100136948 /* SubProcess.framework
*/; };
+ 2C7C79E6100973C700136948 /* TerminalKeyboard.m in Sources */ = {isa =
PBXBuildFile; fileRef = 2C7C79E5100973C700136948 /* TerminalKeyboard.m */;
};
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
Foundation.framework; path =
System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ 1D3623240D0F684500981E51 /* MobileTerminalAppDelegate.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = MobileTerminalAppDelegate.h; sourceTree = "<group>"; };
+ 1D3623250D0F684500981E51 /* MobileTerminalAppDelegate.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = MobileTerminalAppDelegate.m; sourceTree = "<group>"; };
+ 1D6058910D05DD3D006BFB54 /* MobileTerminal.app */ = {isa =
PBXFileReference; explicitFileType = wrapper.application; includeInIndex =
0; path = MobileTerminal.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
UIKit.framework; path = System/Library/Frameworks/UIKit.framework;
sourceTree = SDKROOT; };
+ 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
CoreGraphics.framework; path =
System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ 2899E5210DE3E06400AC0155 /* MobileTerminalViewController.xib */ = {isa =
PBXFileReference; lastKnownFileType = file.xib; path =
MobileTerminalViewController.xib; sourceTree = "<group>"; };
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference;
lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree
= "<group>"; };
+ 28D7ACF60DDB3853001CB0EB /* MobileTerminalViewController.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = MobileTerminalViewController.h; sourceTree = "<group>"; };
+ 28D7ACF70DDB3853001CB0EB /* MobileTerminalViewController.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = MobileTerminalViewController.m; sourceTree = "<group>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference;
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m;
sourceTree = "<group>"; };
+ 2C7C795610096AD300136948 /* VT100.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
VT100.framework; path
= "../VT100/build/Debug-iphonesimulator/VT100.framework"; sourceTree =
SOURCE_ROOT; };
+ 2C7C795D10096AE100136948 /* SubProcess.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
SubProcess.framework; path
= "../SubProcess/build/Debug-iphonesimulator/SubProcess.framework";
sourceTree = SOURCE_ROOT; };
+ 2C7C79E4100973C700136948 /* TerminalKeyboard.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = TerminalKeyboard.h; sourceTree = "<group>"; };
+ 2C7C79E5100973C700136948 /* TerminalKeyboard.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = TerminalKeyboard.m; sourceTree = "<group>"; };
+ 32CA4F630368D1EE00C91783 /* MobileTerminal_Prefix.pch */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h;
path = MobileTerminal_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* MobileTerminal-Info.plist */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml;
path = "MobileTerminal-Info.plist"; plistStructureDefinitionIdentifier
= "com.apple.xcode.plist.structure-definition.iphone.info-plist";
sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
+ 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
+ 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
+ 2C7C795710096AD300136948 /* VT100.framework in Frameworks */,
+ 2C7C795E10096AE100136948 /* SubProcess.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 1D3623240D0F684500981E51 /* MobileTerminalAppDelegate.h */,
+ 1D3623250D0F684500981E51 /* MobileTerminalAppDelegate.m */,
+ 28D7ACF60DDB3853001CB0EB /* MobileTerminalViewController.h */,
+ 28D7ACF70DDB3853001CB0EB /* MobileTerminalViewController.m */,
+ 2C7C79E4100973C700136948 /* TerminalKeyboard.h */,
+ 2C7C79E5100973C700136948 /* TerminalKeyboard.m */,
+ );
+ path = Classes;
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 1D6058910D05DD3D006BFB54 /* MobileTerminal.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = CustomTemplate;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* MobileTerminal_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 2899E5210DE3E06400AC0155 /* MobileTerminalViewController.xib */,
+ 28AD733E0D9D9553002E5188 /* MainWindow.xib */,
+ 8D1107310486CEB800E47090 /* MobileTerminal-Info.plist */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 2C7C795D10096AE100136948 /* SubProcess.framework */,
+ 2C7C795610096AD300136948 /* VT100.framework */,
+ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
+ 1D30AB110D05D00D00671497 /* Foundation.framework */,
+ 288765A40DF7441C002DB57D /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 1D6058900D05DD3D006BFB54 /* MobileTerminal */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build
configuration list for PBXNativeTarget "MobileTerminal" */;
+ buildPhases = (
+ 1D60588D0D05DD3D006BFB54 /* Resources */,
+ 1D60588E0D05DD3D006BFB54 /* Sources */,
+ 1D60588F0D05DD3D006BFB54 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = MobileTerminal;
+ productName = MobileTerminal;
+ productReference = 1D6058910D05DD3D006BFB54 /* MobileTerminal.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build
configuration list for PBXProject "MobileTerminal" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 1D6058900D05DD3D006BFB54 /* MobileTerminal */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 1D60588D0D05DD3D006BFB54 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */,
+ 2899E5220DE3E06400AC0155 /* MobileTerminalViewController.xib in
Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1D60588E0D05DD3D006BFB54 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 1D60589B0D05DD56006BFB54 /* main.m in Sources */,
+ 1D3623260D0F684500981E51 /* MobileTerminalAppDelegate.m in Sources */,
+ 28D7ACF80DDB3853001CB0EB /* MobileTerminalViewController.m in Sources
*/,
+ 2C7C79E6100973C700136948 /* TerminalKeyboard.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 1D6058940D05DD3E006BFB54 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../VT100/build/Debug-iphonesimulator\"",
+ "\"$(SRCROOT)/../SubProcess/build/Debug-iphonesimulator\"",
+ );
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = MobileTerminal_Prefix.pch;
+ INFOPLIST_FILE = "MobileTerminal-Info.plist";
+ PRODUCT_NAME = MobileTerminal;
+ };
+ name = Debug;
+ };
+ 1D6058950D05DD3E006BFB54 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../VT100/build/Debug-iphonesimulator\"",
+ "\"$(SRCROOT)/../SubProcess/build/Debug-iphonesimulator\"",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = MobileTerminal_Prefix.pch;
+ INFOPLIST_FILE = "MobileTerminal-Info.plist";
+ PRODUCT_NAME = MobileTerminal;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = iphoneos3.0;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = iphoneos3.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1D6058960D05DD3E006BFB54 /* Build configuration list for
PBXNativeTarget "MobileTerminal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1D6058940D05DD3E006BFB54 /* Debug */,
+ 1D6058950D05DD3E006BFB54 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for
PBXProject "MobileTerminal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}

Added: branches/applesdk/MobileTerminal/MobileTerminalViewController.xib
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/MobileTerminalViewController.xib Sat
Jul 11 22:26:13 2009
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.03">
+ <data>
+ <int key="IBDocument.SystemTarget">768</int>
+ <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="8"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ </object>
+ <object class="IBProxyObject" id="843779117">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ </object>
+ <object class="IBUIView" id="774585933">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBUIView" id="903159340">
+ <reference key="NSNextResponder" ref="774585933"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrameSize">{320, 436}</string>
+ <reference key="NSSuperview" ref="774585933"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MCAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ </object>
+ </object>
+ <string key="NSFrameSize">{320, 436}</string>
+ <reference key="NSSuperview"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC43NQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="774585933"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">vt100TextView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="903159340"/>
+ </object>
+ <int key="connectionID">9</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="188853954">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="188853954"/>
+ <string type="base64-UTF8"
key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="843779117"/>
+ <reference key="parent" ref="188853954"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="774585933"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="903159340"/>
+ </object>
+ <reference key="parent" ref="188853954"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">8</int>
+ <reference key="object" ref="903159340"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="parent" ref="774585933"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.CustomClassName</string>
+ <string>-2.CustomClassName</string>
+ <string>6.IBEditorWindowLastContentRect</string>
+ <string>6.IBPluginDependency</string>
+ <string>8.CustomClassName</string>
+ <string>8.IBPluginDependency</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>MobileTerminalViewController</string>
+ <string>UIResponder</string>
+ <string>{{363, 364}, {320, 436}}</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string>VT100TextView</string>
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">12</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">MobileTerminalViewController</string>
+ <string key="superclassName">UIViewController</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">vt100TextView</string>
+ <string key="NS.object.0">VT100TextView</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string
key="minorKey">Classes/MobileTerminalViewController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string
key="IBDocument.LastKnownRelativeProjectPath">MobileTerminal.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>

Added: branches/applesdk/MobileTerminal/MobileTerminal_Prefix.pch
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/MobileTerminal_Prefix.pch Sat Jul 11
22:26:13 2009
@@ -0,0 +1,8 @@
+//
+// Prefix header for all source files of the 'MobileTerminal' target in
the 'MobileTerminal' project
+//
+
+#ifdef __OBJC__
+ #import <Foundation/Foundation.h>
+ #import <UIKit/UIKit.h>
+#endif

Added: branches/applesdk/MobileTerminal/main.m
==============================================================================
--- (empty file)
+++ branches/applesdk/MobileTerminal/main.m Sat Jul 11 22:26:13 2009
@@ -0,0 +1,12 @@
+// main.m
+// MobileTerminal
+
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[]) {
+
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ [pool release];
+ return retVal;
+}

Modified: branches/applesdk/SubProcess/SubProcess.h
==============================================================================
--- branches/applesdk/SubProcess/SubProcess.h (original)
+++ branches/applesdk/SubProcess/SubProcess.h Sat Jul 11 22:26:13 2009
@@ -2,6 +2,7 @@
// MobileTerminal

#import <Foundation/Foundation.h>
+#import <SubProcess/PTY.h>

// Forks a terminal subprocess.
@interface SubProcess : NSObject {

Matthias Ringwald

unread,
Jul 12, 2009, 8:35:52 AM7/12/09
to mobilet...@googlegroups.com

On Jul 12, 2009, at 7:26 AM, codesite...@google.com wrote:

This is still missing tons of great features from the trunk, but, actually  
does
work with a full terminal in the iPhoneSimulator using the official SDK!

Looks cool! After compiling and starting on the simulator, I thought I could dig a bit more into the iPhone OS 3.0 internals. However, a simple ls made me clear that I'm just using a terminal on the iPhone to my Mac... :)

Cheers,
 Matthias

P.S. you've added a getter/setter for font in VT100TextView but did miss to use the setter  this line in the current SVN.

Index: MobileTerminal/Classes/MobileTerminalViewController.m
===================================================================
--- MobileTerminal/Classes/MobileTerminalViewController.m       (revision 385)
+++ MobileTerminal/Classes/MobileTerminalViewController.m       (working copy)
@@ -87,7 +87,7 @@
 - (void)viewDidLoad {
   [super viewDidLoad];
 
-  vt100TextView.font = [UIFont fontWithName:@"Courier" size:10.0f];
+  [vt100TextView setFont:[UIFont fontWithName:@"Courier" size:10.0f]];

Allen Porter

unread,
Jul 12, 2009, 3:33:03 PM7/12/09
to mobilet...@googlegroups.com
On Sun, Jul 12, 2009 at 5:35 AM, Matthias Ringwald <matthias...@gmail.com> wrote:

On Jul 12, 2009, at 7:26 AM, codesite...@google.com wrote:

This is still missing tons of great features from the trunk, but, actually  
does
work with a full terminal in the iPhoneSimulator using the official SDK!

Looks cool! After compiling and starting on the simulator, I thought I could dig a bit more into the iPhone OS 3.0 internals. However, a simple ls made me clear that I'm just using a terminal on the iPhone to my Mac... :)

Thanks for checking it out!  I think we get too much further, i'll write up some instructions on how to build the project, though it seems like its pretty self explanatory.  I'm wondering of the choice of splitting it into 3 different projects could be improved somehow.  I mostly was trying to make it hard to introduce bad dependencies like we have in trunk (I'll take my fair share of blame for it)
 

Cheers,
 Matthias

P.S. you've added a getter/setter for font in VT100TextView but did miss to use the setter  this line in the current SVN.

Thanks for pointing this out.  I've submitted a fix.  I am glad someone else is double checking these changes -- If anyone else interested, feel free to use the built in code review feature:

If it catches on and people find it useful, we can start assigning reviews for each committed change.
 

Index: MobileTerminal/Classes/MobileTerminalViewController.m
===================================================================
--- MobileTerminal/Classes/MobileTerminalViewController.m       (revision 385)
+++ MobileTerminal/Classes/MobileTerminalViewController.m       (working copy)
@@ -87,7 +87,7 @@
 - (void)viewDidLoad {
   [super viewDidLoad];
 
-  vt100TextView.font = [UIFont fontWithName:@"Courier" size:10.0f];
+  [vt100TextView setFont:[UIFont fontWithName:@"Courier" size:10.0f]];
 
   
   // Adding the keyboard to the view has no effect, except that it is will





--
-allen

Matthias Ringwald

unread,
Jul 12, 2009, 4:15:55 PM7/12/09
to mobilet...@googlegroups.com
On Jul 12, 2009, at 9:33 PM, Allen Porter wrote:



Thanks for checking it out!  I think we get too much further, i'll write up some instructions on how to build the project, though it seems like its pretty self explanatory.  I'm wondering of the choice of splitting it into 3 different projects could be improved somehow.  I mostly was trying to make it hard to introduce bad dependencies like we have in trunk (I'll take my fair share of blame for it)

I'm no expert in XCode, but I think you can have subproject somehow such that you can just open a project, press on build and have all sub projects being build. (Don't know how really..)


Thanks for pointing this out.  I've submitted a fix.  I am glad someone else is double checking these changes -- If anyone else interested, feel free to use the built in code review feature:

If it catches on and people find it useful, we can start assigning reviews for each committed change.

It was caught by my compiler...

Best,
 Matthias

Allen Porter

unread,
Jul 13, 2009, 12:57:28 AM7/13/09
to mobilet...@googlegroups.com
On Sun, Jul 12, 2009 at 1:15 PM, Matthias Ringwald <matthias...@gmail.com> wrote:

On Jul 12, 2009, at 9:33 PM, Allen Porter wrote:



Thanks for checking it out!  I think we get too much further, i'll write up some instructions on how to build the project, though it seems like its pretty self explanatory.  I'm wondering of the choice of splitting it into 3 different projects could be improved somehow.  I mostly was trying to make it hard to introduce bad dependencies like we have in trunk (I'll take my fair share of blame for it)

I'm no expert in XCode, but I think you can have subproject somehow such that you can just open a project, press on build and have all sub projects being build. (Don't know how really..)

I found that the cross project references don't work very good with .frameworks, and work better with static libraries:

but that seems like a lot of work to ask everyone to implement.  Maybe it would be simpler to move everything back into a single XCode project (and just hope the dependencies stay nice and clean without a hard wall)
 

Thanks for pointing this out.  I've submitted a fix.  I am glad someone else is double checking these changes -- If anyone else interested, feel free to use the built in code review feature:

If it catches on and people find it useful, we can start assigning reviews for each committed change.

It was caught by my compiler...

That is what I get for not doing a clean build, or having cross-project dependencies :)
 

Best,
 Matthias





--
-allen

Matthias Ringwald

unread,
Jul 13, 2009, 3:34:08 AM7/13/09
to mobilet...@googlegroups.com
hi allen


I'm no expert in XCode, but I think you can have subproject somehow such that you can just open a project, press on build and have all sub projects being build. (Don't know how really..)

I found that the cross project references don't work very good with .frameworks, and work better with static libraries:

but that seems like a lot of work to ask everyone to implement.  Maybe it would be simpler to move everything back into a single XCode project (and just hope the dependencies stay nice and clean without a hard wall)

Nice article. At least in the described approach everything is automatic as I would be annoyed when I had to manually update all projects in the right order.

Anyway, unless you (or som else) wants to reuse the frameworks, I would follow the one project - with a folder per sub-project - approach.

 

Thanks for pointing this out.  I've submitted a fix.  I am glad someone else is double checking these changes -- If anyone else interested, feel free to use the built in code review feature:

If it catches on and people find it useful, we can start assigning reviews for each committed change.

It was caught by my compiler...

That is what I get for not doing a clean build, or having cross-project dependencies :)

You're doing good, I don't have any unit-tests for my btstack project. :)

Matthias

Lance Fetters

unread,
Jul 15, 2009, 10:22:50 PM7/15/09
to mobilet...@googlegroups.com
I (briefly) tried compiling the applesdk branch with XCode; SubProcess
compiled fine, but I was unable to get past VT100.

It appears to be missing some files, in particular "term.h". I tried
using the version from Leopard, but it then tried to pull in other
headers (such as ncurses). I suppose that I could just include
"/usr/include", but if that is necessary I expect that it would already
be in the project file.

Are there, perhaps, some required files that have not been added to the
repository yet?


Cheers,

--
Lance Fetters
Ogaki, Gifu, Japan

Matthias Ringwald

unread,
Jul 16, 2009, 2:24:28 AM7/16/09
to mobilet...@googlegroups.com
Hi Lance

It compiles fine for Simulator 2.0 PPC. If I compile for OS 2.0 I also get the term.h error and some undefined key names. Maybe this is really picked from the OS X headers.

Matthias

Allen Porter

unread,
Jul 16, 2009, 3:53:14 AM7/16/09
to mobilet...@googlegroups.com
Hmm, my SDK has this file:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/include/term.h
--
-allen

Lance Fetters

unread,
Jul 16, 2009, 3:59:26 AM7/16/09
to mobilet...@googlegroups.com
Allen Porter wrote:
> Hmm, my SDK has this file:
> /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/usr/include/term.h

I haven't tried to compile for the simulator; I was targeting the
device. (I find the idea of being able to use the terminal on a
non-jailbroken - but provisioned - device quite intriguing).

Matthias Ringwald

unread,
Jul 16, 2009, 4:01:57 AM7/16/09
to mobilet...@googlegroups.com

Ok. So term.h it was added after 2.0 and 3.0. At home with my PowerBook G4, I cannot use SDK 3.0 as it really is Intel-only. Also, I can only compile for OS 2.0 because it requires code signing. If it isn't to much trouble, keeping mobile terminal compatible with 2.0-3.0 would be nice. Other then that, I can just use a different machine (e.g. my office machine) for compiling. :)

Matthias

Allen Porter

unread,
Jul 26, 2009, 6:34:56 PM7/26/09
to mobilet...@googlegroups.com
Hey Lance,

I updated the xcode project so that it can now compile for the Device instead of just the Simulator.  After code signing the binary, attempting to run it on the device is unsuccessful because the kernel won't let it fork a pty:

Sun Jul 26 15:17:20 unknown kernel[0] <Debug>: MobileTerminal 628 PARENTAGE_FORK DENY 1 (seatbelt)
Sun Jul 26 15:17:20 unknown MobileTerminal[628] <Error>: *** Terminating app due to uncaught exception 'IOException', reason: 'Failed to fork child process (1: Operation not permitted)'

I have not had a change to investigate this much, but since people don't run into this problem with the iphone-dev toolchain its may be just related to the method of running the binary through xcode.  Maybe it would work if setup for ad-hoc distribution and run standalone.

--
-allen

Lance Fetters

unread,
Jul 27, 2009, 8:27:10 AM7/27/09
to mobileterminal
Allen,

On Jul 27, 7:34 am, Allen Porter <allen.por...@gmail.com> wrote:
> I have not had a change to investigate this much, but since people don't run
> into this problem with the iphone-dev toolchain its may be just related to
> the method of running the binary through xcode.  Maybe it would work if
> setup for ad-hoc distribution and run standalone.

I'm not certain, but I believe that it may not be possible to use fork
() on a non-jailbroken device; I would recommend confirming with Jay
Freeman.

I was able to use your latest version (SVN revision 413) with both the
simulator and my jb'd 3GS, but I get the same error as you when I
attempt to run it on a non-jb'd device.

Allen Porter

unread,
Jul 28, 2009, 11:15:14 PM7/28/09
to mobilet...@googlegroups.com
On Mon, Jul 27, 2009 at 5:27 AM, Lance Fetters <gai...@gmail.com> wrote:

Allen,

On Jul 27, 7:34 am, Allen Porter <allen.por...@gmail.com> wrote:
> I have not had a change to investigate this much, but since people don't run
> into this problem with the iphone-dev toolchain its may be just related to
> the method of running the binary through xcode.  Maybe it would work if
> setup for ad-hoc distribution and run standalone.

I'm not certain, but I believe that it may not be possible to use fork
() on a non-jailbroken device; I would recommend confirming with Jay
Freeman.

Great, idea, i'll send him a note.  For what its worth, my phone is jail broken and the last release of mobile terminal works fine so I suspect its something specific to the binary (code signed binaries behave differently?)
 

I was able to use your latest version (SVN revision 413) with both the
simulator and my jb'd 3GS, but I get the same error as you when I
attempt to run it on a non-jb'd device.

--
Lance Fetters
Ogaki, Gifu, Japan




--
-allen

Allen Porter

unread,
Jun 13, 2010, 5:14:32 PM6/13/10
to mobilet...@googlegroups.com
On Tue, Jul 28, 2009 at 8:15 PM, Allen Porter <allen....@gmail.com> wrote:
>
>
> On Mon, Jul 27, 2009 at 5:27 AM, Lance Fetters <gai...@gmail.com> wrote:
>>
>> Allen,
>>
>> On Jul 27, 7:34 am, Allen Porter <allen.por...@gmail.com> wrote:
>> > I have not had a change to investigate this much, but since people don't
>> > run
>> > into this problem with the iphone-dev toolchain its may be just related
>> > to
>> > the method of running the binary through xcode.  Maybe it would work if
>> > setup for ad-hoc distribution and run standalone.
>>
>> I'm not certain, but I believe that it may not be possible to use fork
>> () on a non-jailbroken device; I would recommend confirming with Jay
>> Freeman.
>
> Great, idea, i'll send him a note.  For what its worth, my phone is jail
> broken and the last release of mobile terminal works fine so I suspect its
> something specific to the binary (code signed binaries behave differently?)
>

Quick update. I figured out the problem. When running from inside
XCode, the binary is placed in a directory that is restricted by the
sandbox/seatbelt kernel extension (such as
/var/mobile/Applications/...). The binary works just fine when placed
in /Applications/.

This means that we now have a working terminal (that we can actually
compile) for the iPhone and the iPad. The feature set of this
terminal is a lot less than the existing terminal, but I hope that
getting a new binary back into the hands of users will let us figure
out what features are most missed. Hopefully we can get the new
binary out soon with some kind of label indicating that its
"unstable" so that people don't expect too much.

If I hear from someone else that this sounds like a good idea, I may
do a bug scrub and erase all of the bugs that apply to earlier
versions of mobile terminal created with the ad-hoc toolchains that
are no longer used by anyone (that I am aware of).


>>
>> I was able to use your latest version (SVN revision 413) with both the
>> simulator and my jb'd 3GS, but I get the same error as you when I
>> attempt to run it on a non-jb'd device.
>>
>> --
>> Lance Fetters
>> Ogaki, Gifu, Japan

>> --~--~---------~--~----~------------~-------~--~----~
>> You received this message because you are subscribed to the Google Groups
>> "mobileterminal" group.
>> To post to this group, send email to mobilet...@googlegroups.com
>> To unsubscribe from this group, send email to
>> mobiletermina...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/mobileterminal?hl=en
>> -~----------~----~----~----~------~----~------~--~---
>>
>
>
>
> --
> -allen
>

--
-allen

Reply all
Reply to author
Forward
0 new messages