diff --git a/SLProxy/MacProxy/Launcher/Controller.m b/SLProxy/MacProxy/Launcher/Controller.m index 1726ad6a..fff271b4 100644 --- a/SLProxy/MacProxy/Launcher/Controller.m +++ b/SLProxy/MacProxy/Launcher/Controller.m @@ -7,7 +7,6 @@ } + (void)failBecause:(NSString *)reason { - [killtask terminate]; NSRunCriticalAlertPanel(@"Failed to start Second Life.", reason, @"Quit", nil, nil); [NSApp terminate:nil]; } @@ -28,9 +27,17 @@ [task release]; } -- (void)awakeFromNib { +- (id)init { + [super init]; killtask = nil; + return self; +} +- (void)awakeFromNib { + [NSApp setDelegate:self]; +} + +- (void)applicationDidFinishLaunching:(NSNotification *)notification { /* Start the proxy, run Second Life, stop the proxy, and terminate. */ SLProxy *proxy = [[SLProxy alloc] init]; [self runSecondLifeWithLoginURL:[proxy loginURL]]; @@ -38,4 +45,8 @@ [NSApp terminate:self]; } +- (void)applicationWillTerminate:(NSNotification *)notification { + [killtask terminate]; +} + @end diff --git a/SLProxy/MacProxy/Launcher/Info.plist b/SLProxy/MacProxy/Launcher/Info.plist index 85696095..2f341811 100644 --- a/SLProxy/MacProxy/Launcher/Info.plist +++ b/SLProxy/MacProxy/Launcher/Info.plist @@ -20,7 +20,7 @@ ???? CFBundleVersion 1.0 - LSBackgroundOnly + LSUIElement MonoArguments diff --git a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/MacOS/Launcher b/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/MacOS/Launcher deleted file mode 100755 index 408c811e..00000000 Binary files a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/MacOS/Launcher and /dev/null differ diff --git a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/PkgInfo b/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/PkgInfo deleted file mode 100644 index bd04210f..00000000 --- a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? \ No newline at end of file diff --git a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/InfoPlist.strings b/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/InfoPlist.strings deleted file mode 100644 index 997688e2..00000000 Binary files a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/InfoPlist.strings and /dev/null differ diff --git a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib b/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib deleted file mode 100644 index aa4358a7..00000000 --- a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/classes.nib +++ /dev/null @@ -1,8 +0,0 @@ -{ - IBClasses = ( - {CLASS = Controller; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, - {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, - {CLASS = SLProxy; LANGUAGE = ObjC; SUPERCLASS = NSObject; } - ); - IBVersion = 1; -} \ No newline at end of file diff --git a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib b/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib deleted file mode 100644 index e113278b..00000000 --- a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib +++ /dev/null @@ -1,17 +0,0 @@ - - - - - IBDocumentLocation - 110 86 356 240 0 0 1440 878 - IBEditorPositions - - 29 - 109 299 338 44 0 0 1440 878 - - IBFramework Version - 446.1 - IBSystem Version - 8P2137 - - diff --git a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib b/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib deleted file mode 100644 index 430b4de7..00000000 Binary files a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib and /dev/null differ diff --git a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/libsl.icns b/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/libsl.icns deleted file mode 100644 index c35d47cc..00000000 Binary files a/SLProxy/MacProxy/Launcher/build/Release/Launcher.app/Contents/Resources/libsl.icns and /dev/null differ diff --git a/SLProxy/MacProxy/README.txt b/SLProxy/MacProxy/README.txt index 0a71da13..082ec56a 100644 --- a/SLProxy/MacProxy/README.txt +++ b/SLProxy/MacProxy/README.txt @@ -9,7 +9,7 @@ environment with Perl installed should suffice. To use MacProxy, navigate to the MacProxy directory and type ./build.pl "Application Name" path/to/executable.exe \ - path/to/SLProxy.dll path/to/libsecondlife.dll + path/to/libraries.dll ... For example, to create a standalone ChatConsole for the Mac: diff --git a/SLProxy/MacProxy/build.pl b/SLProxy/MacProxy/build.pl index e1eb9418..ac666fe4 100755 --- a/SLProxy/MacProxy/build.pl +++ b/SLProxy/MacProxy/build.pl @@ -1,10 +1,10 @@ #!/usr/bin/perl -w -die "Usage: $0 \"Application Name\" path/to/executable.exe path/to/SLProxy.dll path/to/libsecondlife.dll\n" unless @ARGV == 4; +die "Usage: $0 \"Application Name\" path/to/executable.exe path/to/libraries.dll ...\n" unless @ARGV >= 2; die "Please run MacProxy from within its own directory.\n" unless -d 'Launcher'; -my ($appname, $exe, $slproxy, $libsl) = @ARGV; +my ($appname, $exe, @libs) = @ARGV; print "Creating application bundle...\n"; @@ -14,7 +14,7 @@ and die "Failed; aborting.\n"; print "Embedding assemblies...\n"; -system('cp', $exe, $slproxy, $libsl, "$appname.app/Contents/Resources/Assemblies/") +system('cp', $exe, @libs, "$appname.app/Contents/Resources/Assemblies/") and die "Failed; aborting.\n"; print "Writing metadata...\n"; @@ -27,7 +27,7 @@ or die "Failed to open $appname.app/Contents/Info.plist; aborting.\n"; my $id = $appname; $id =~ s/[^a-z]//gi; $id = 'x' unless length $id; -$$_ =~ s!.*/!! foreach \$exe, \$slproxy, \$libsl; +$exe =~ s!.*/!!; while (<$ii>) { s/##NAME##/$appname/; s/##ID##/$id/;