MacProxy tweaks
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1077 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -4,10 +4,13 @@
|
||||
|
||||
#import "SLProxy.h"
|
||||
|
||||
NSTask *killtask;
|
||||
|
||||
@interface Controller : NSObject
|
||||
{
|
||||
}
|
||||
|
||||
+ (void)terminateOnFailure:(NSTask *)task;
|
||||
+ (void)failBecause:(NSString *)reason;
|
||||
|
||||
@end
|
||||
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
@implementation Controller
|
||||
|
||||
+ (void)terminateOnFailure:(NSTask *)task {
|
||||
killtask = task;
|
||||
}
|
||||
|
||||
+ (void)failBecause:(NSString *)reason {
|
||||
[killtask terminate];
|
||||
NSRunCriticalAlertPanel(@"Failed to start Second Life.", reason, @"Quit", nil, nil);
|
||||
[NSApp terminate:nil];
|
||||
}
|
||||
@@ -24,6 +29,8 @@
|
||||
}
|
||||
|
||||
- (void)awakeFromNib {
|
||||
killtask = nil;
|
||||
|
||||
/* Start the proxy, run Second Life, stop the proxy, and terminate. */
|
||||
SLProxy *proxy = [[SLProxy alloc] init];
|
||||
[self runSecondLifeWithLoginURL:[proxy loginURL]];
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
@implementation SLProxy
|
||||
|
||||
- (SLProxy *)init {
|
||||
[super init];
|
||||
|
||||
NSPipe *pipe = [NSPipe pipe];
|
||||
|
||||
/* Launch the proxy. */
|
||||
@@ -18,6 +20,7 @@
|
||||
NS_HANDLER
|
||||
[Controller failBecause:@"Mono does not appear to be installed on your system."];
|
||||
NS_ENDHANDLER
|
||||
[Controller terminateOnFailure:task];
|
||||
|
||||
/* Read the proxy's output to determine the login URL to give SL. */
|
||||
int reader = [[pipe fileHandleForReading] fileDescriptor];
|
||||
|
||||
Binary file not shown.
@@ -26,6 +26,7 @@ framework installed. This should be distributed separately, since
|
||||
it's huge. The installer is available from
|
||||
http://www.mono-project.com/Downloads.
|
||||
|
||||
Applications generated by MacProxy currently require Mac OS 10.4.0 or
|
||||
later, whereas Second Life itself only requires 10.3.9. This
|
||||
shouldn't be hard to fix.
|
||||
MacProxy assumes that your proxy application accepts the standard
|
||||
suite of --proxy arguments via the command line (see SLProxy's
|
||||
documentation) and that it doesn't output anything of its own to
|
||||
stdout before the proxy is active.
|
||||
|
||||
Reference in New Issue
Block a user