about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--scripts/make_release.py2
-rw-r--r--src/engine/external/glfw/lib/macosx/macosx_window.c2
-rw-r--r--src/osxlaunch/main.m23
3 files changed, 12 insertions, 15 deletions
diff --git a/scripts/make_release.py b/scripts/make_release.py
index dcb9b459..9c92c568 100644
--- a/scripts/make_release.py
+++ b/scripts/make_release.py
@@ -99,7 +99,7 @@ if use_bundle:
         <key>CFBundleDevelopmentRegion</key>
         <string>English</string>
         <key>CFBundleExecutable</key>
-        <string>TeeLaunch</string>
+        <string>teewars</string>
         <key>CFBundleIconFile</key>
         <string>Teewars</string>
         <key>CFBundleInfoDictionaryVersion</key>
diff --git a/src/engine/external/glfw/lib/macosx/macosx_window.c b/src/engine/external/glfw/lib/macosx/macosx_window.c
index b8af0c4e..f191678a 100644
--- a/src/engine/external/glfw/lib/macosx/macosx_window.c
+++ b/src/engine/external/glfw/lib/macosx/macosx_window.c
@@ -707,7 +707,7 @@ int  _glfwPlatformOpenWindow( int width,
             return GL_FALSE;

         }

 

-        if (_glfwLibrary.Unbundled)

+        //if (_glfwLibrary.Unbundled)

         {

             if( GetCurrentProcess( &psn ) != noErr )

             {

diff --git a/src/osxlaunch/main.m b/src/osxlaunch/main.m
index 5f3d6ab6..8d23f5b6 100644
--- a/src/osxlaunch/main.m
+++ b/src/osxlaunch/main.m
@@ -3,15 +3,20 @@
 
 @interface ServerView : NSTextView
 {
+	NSTask *task;
 	NSFileHandle *file;
 }
-- (void)listenTo: (NSFileHandle*)f;
+- (void)listenTo: (NSTask*)t;
 @end
 
 @implementation ServerView
-- (void)listenTo: (NSFileHandle*)f;
+- (void)listenTo: (NSTask*)t;
 {
-	file = f;
+	NSPipe *pipe;
+	task = t;
+    pipe = [NSPipe pipe];
+    [task setStandardOutput: pipe];
+    file = [pipe fileHandleForReading];
 
 	[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(outputNotification:) name: NSFileHandleReadCompletionNotification object: file];
 
@@ -35,6 +40,7 @@
 
 -(void)windowWillClose:(NSNotification *)notification
 {
+	[task terminate]
     [NSApp terminate:self];
 }
 @end
@@ -49,12 +55,6 @@ int main(int argc, char **argv)
 	NSTask *task;
     task = [[NSTask alloc] init];
 	[task setCurrentDirectoryPath: [mainBundle resourcePath]]; 
-	NSPipe *pipe;
-	NSFileHandle *file;
-    pipe = [NSPipe pipe];
-    [task setStandardOutput: pipe];
-    file = [pipe fileHandleForReading];
-
 
 	if(mod & optionKey)
 	{
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
 		[window setDelegate: view];
 		[window makeKeyAndOrderFront: nil];
 
-		[view listenTo: file];
+		[view listenTo: task];
 		[task setLaunchPath: [mainBundle pathForAuxiliaryExecutable: @"teewars_srv"]];
 		[task launch];
 		[NSApp run];
@@ -93,11 +93,8 @@ int main(int argc, char **argv)
 		// run client
 		[task setLaunchPath: [mainBundle pathForAuxiliaryExecutable: @"teewars"]];
 		[task launch];
-		[task waitUntilExit];
 	}
 
-
-
     [NSApp release];
     [pool release];
     return(EXIT_SUCCESS);