From 6e0df0d01676cec59caaafa2cea3910c5a9b51e0 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 15 Jan 2010 19:29:28 +0000 Subject: Don't open the configuration window when the launcher is first run; display an error message if the user tries to launch the game without an IWAD selected. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1817 --- pkg/osx/IWADController.m | 7 +------ pkg/osx/LauncherManager.m | 15 +++++++++++---- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'pkg/osx') diff --git a/pkg/osx/IWADController.m b/pkg/osx/IWADController.m index 783ee38f..a7730cc7 100644 --- a/pkg/osx/IWADController.m +++ b/pkg/osx/IWADController.m @@ -256,17 +256,12 @@ static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] = [self setIWADConfig]; - // Populate the dropdown IWAD list, and open the configuration - // dialog if not yet configured. + // Populate the dropdown IWAD list. if ([self setDropdownList]) { [self setDropdownSelection]; } - else - { - [self openConfigWindow: nil]; - } } // Set the DOOMWADPATH environment variable to contain the path to each diff --git a/pkg/osx/LauncherManager.m b/pkg/osx/LauncherManager.m index 26684811..0d0ab4ea 100644 --- a/pkg/osx/LauncherManager.m +++ b/pkg/osx/LauncherManager.m @@ -284,12 +284,19 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName) iwad = [self->iwadController getIWADLocation]; args = [self->commandLineArguments stringValue]; - if (iwad != nil) + if (iwad == nil) { - ExecuteProgram(PACKAGE_TARNAME, [iwad UTF8String], - [args UTF8String]); - [NSApp terminate:sender]; + NSRunAlertPanel(@"No IWAD selected", + @"You have not selected an IWAD (game) file.\n\n" + "You must configure and select a valid IWAD file " + "in order to launch the game.", + @"OK", nil, nil); + return; } + + ExecuteProgram(PACKAGE_TARNAME, [iwad UTF8String], + [args UTF8String]); + [NSApp terminate:sender]; } - (void) runSetup: (id)sender -- cgit v1.2.3