diff --git a/source/xcode/English.lproj/MainMenu.nib/classes.nib b/source/xcode/English.lproj/MainMenu.nib/classes.nib
index 14f4e2fe..d0980694 100644
--- a/source/xcode/English.lproj/MainMenu.nib/classes.nib
+++ b/source/xcode/English.lproj/MainMenu.nib/classes.nib
@@ -28,6 +28,8 @@
ObjC
OUTLETS
+ admin_password
+ NSTextField
console
ConsoleView
keys
diff --git a/source/xcode/English.lproj/MainMenu.nib/info.nib b/source/xcode/English.lproj/MainMenu.nib/info.nib
index e54d6bfc..cb563978 100644
--- a/source/xcode/English.lproj/MainMenu.nib/info.nib
+++ b/source/xcode/English.lproj/MainMenu.nib/info.nib
@@ -10,9 +10,9 @@
4
IBOpenObjects
- 264
- 208
21
+ 208
+ 264
213
IBSystem Version
diff --git a/source/xcode/English.lproj/MainMenu.nib/keyedobjects.nib b/source/xcode/English.lproj/MainMenu.nib/keyedobjects.nib
index 56ec57a0..70d6ab31 100644
Binary files a/source/xcode/English.lproj/MainMenu.nib/keyedobjects.nib and b/source/xcode/English.lproj/MainMenu.nib/keyedobjects.nib differ
diff --git a/source/xcode/Launcher.h b/source/xcode/Launcher.h
index 6cd3aa9b..bc3bced3 100644
--- a/source/xcode/Launcher.h
+++ b/source/xcode/Launcher.h
@@ -3,6 +3,8 @@
@class ConsoleView;
@interface Launcher : NSObject {
+ IBOutlet NSTextField *admin_password;
+
IBOutlet NSWindow *window;
//able to leave these disconnected
@@ -23,7 +25,6 @@
NSMutableDictionary *toolBarItems;
pid_t server;
NSMutableDictionary *fileRoles;
- BOOL forcename;
}
- (IBAction)playAction:(id)sender;
diff --git a/source/xcode/Launcher.m b/source/xcode/Launcher.m
index 31d90272..4dc7e474 100644
--- a/source/xcode/Launcher.m
+++ b/source/xcode/Launcher.m
@@ -433,8 +433,8 @@ static int numberForKey(CFDictionaryRef desc, CFStringRef key)
NS_DURING
NSTask *task = [[NSTask alloc] init];
[task setCurrentDirectoryPath:cwd];
- [task setLaunchPath:exe];
- [task setArguments:args];
+ [task setLaunchPath:exe];
+ [task setArguments:args]; NSLog([args description]);
[task setEnvironment:[NSDictionary dictionaryWithObjectsAndKeys:
@"1", @"SDL_SINGLEDISPLAY",
@"1", @"SDL_ENABLEAPPEVENTS", nil
@@ -467,7 +467,10 @@ static int numberForKey(CFDictionaryRef desc, CFStringRef key)
NSArray *res = [[resolutions titleOfSelectedItem] componentsSeparatedByString:@" x "];
NSMutableArray *args = [NSMutableArray array];
-
+
+ [args addObject:@"--init"];
+ [args addObject:[NSString stringWithFormat:@"--home=%@", [Launcher userdir]]];
+
[args addObject:[NSString stringWithFormat:@"-w%@", [res objectAtIndex:0]]];
[args addObject:[NSString stringWithFormat:@"-h%@", [res objectAtIndex:1]]];
[args addObject:@"-z32"]; //otherwise seems to have a fondness to use -z16 which looks crap
@@ -475,31 +478,7 @@ static int numberForKey(CFDictionaryRef desc, CFStringRef key)
if([defs integerForKey:dkFULLSCREEN] == 0) [args addObject:@"-t"];
[args addObject:[NSString stringWithFormat:@"-a%d", [defs integerForKey:dkFSAA]]];
- if ([stencil state] == NSOnState) [args addObject:@"-z8"];
-
- [args addObject:[NSString stringWithFormat:@"--home=%@", [Launcher userdir]]];
-
- NSMutableArray *cmds = [NSMutableArray array];
- if(forcename) [cmds addObject:[NSString stringWithFormat:@"name \"%@\"", NSUserName()]];
-
- if(filename)
- {
- if([filename isEqual:@"-rpg"]) {
- [cmds removeAllObjects]; // rpg current doesn't require name/team
- [args addObject:@"-grpg"]; //demo the rpg game
- } else if([filename hasPrefix:@"-x"])
- [cmds addObject:[filename substringFromIndex:2]];
- else
- [args addObject:[NSString stringWithFormat:@"-l%@", filename]];
- }
-
- if([cmds count] > 0)
- {
- NSString *script = [cmds objectAtIndex:0];
- int i;
- for(i = 1; i < [cmds count]; i++) script = [NSString stringWithFormat:@"%@;%@", script, [cmds objectAtIndex:i]];
- [args addObject:[NSString stringWithFormat:@"-x%@", script]];
- }
+ if ([stencil state] == NSOnState) [args addObject:@"-s8"];
NSEnumerator *e = [[[defs nonNullStringForKey:dkADVANCEDOPTS] componentsSeparatedByString:@" "] objectEnumerator];
NSString *opt;
@@ -581,9 +560,6 @@ static int numberForKey(CFDictionaryRef desc, CFStringRef key)
NSDictionary *dict = [self readConfigFiles];
[keys addObjects:[self getKeys:dict]];
- //encourage people not to remain unnamed
- NSString *name = [dict objectForKey:@"name"];
- forcename = (!name || [name isEqual:@""] || [name isEqual:@"unnamed"]);
[self initMaps];
[self initResolutions];
@@ -673,7 +649,9 @@ static int numberForKey(CFDictionaryRef desc, CFStringRef key)
NSString *pass = [defs nonNullStringForKey:dkPASSWORD];
if (![pass isEqual:@""]) [args addObject:[NSString stringWithFormat:@"-p%@", pass]];
-
+
+ if (![[admin_password stringValue] isEqual:@""]) [args addObject:[NSString stringWithFormat:@"-x%@", pass]];
+
int clients = [defs integerForKey:dkMAXCLIENTS];
if (clients > 0) [args addObject:[NSString stringWithFormat:@"-c%d", clients]];
diff --git a/source/xcode/actioncube.xcodeproj/project.pbxproj b/source/xcode/actioncube.xcodeproj/project.pbxproj
index 2950e898..0e9f2e9f 100644
--- a/source/xcode/actioncube.xcodeproj/project.pbxproj
+++ b/source/xcode/actioncube.xcodeproj/project.pbxproj
@@ -583,7 +583,7 @@
);
runOnlyForDeploymentPostprocessing = 1;
shellPath = /bin/sh;
- shellScript = "echo $TARGET_BUILD_DIR\ncd $TARGET_BUILD_DIR\n\n#ensure old package is gone\nrm -f assaultcube.dmg\n\n#make the directory which our disk image will be made of\n#use /tmp as a destination because copying ourself (xcode folder) whilst compling causes the dog to chase its tail\nACPKG=`mktemp -d /tmp/acpkg.XXXXXX` || exit 1\n\n#leave indicator of where temp directory is in case things break\nln -sf $ACPKG $TARGET_BUILD_DIR/acpkg\n\n#copy launcher\n/Developer/Tools/CpMac -r $TARGET_BUILD_DIR/launcher.app $ACPKG/AssaultCube.app\n\nHELPDIR=$ACPKG/AssaultCube.app/Contents/Resources/help/\nGAMEDIR=$ACPKG/AssaultCube.app/Contents/gamedata\nmkdir $GAMEDIR\nmkdir $HELPDIR\n\n#copy assaultcube\n/Developer/Tools/CpMac -r $TARGET_BUILD_DIR/assaultcube.app $GAMEDIR/\n\n#install all frameworks into app bundle\nmkdir $GAMEDIR/assaultcube.app/Contents/Frameworks\nfor framework in SDL.framework SDL_image.framework Ogg.framework Vorbis.framework\ndo\n\tif [ -d $LOCAL_LIBRARY_DIR/Frameworks/$framework/ ] \n\tthen\t\n\t\t/Developer/Tools/CpMac -r $LOCAL_LIBRARY_DIR/Frameworks/$framework/ $GAMEDIR/assaultcube.app/Contents/Frameworks\n\t\trm -rf $GAMEDIR/assaultcube.app/Contents/Frameworks/$framework/Versions/A/Headers\n\telse\n\t\texit 1\n\tfi\ndone\n\n\n#copy readme and data and remove unneccesary stuff\n/Developer/Tools/CpMac -r $SRCROOT/../../README.html $HELPDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../docs $HELPDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../bot $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../config $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../screenshots $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../mods $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../packages $GAMEDIR/\n/Developer/Tools/CpMac -r $SRCROOT/../../source $ACPKG/sourcecode\nfind -d $ACPKG -name \"shadows.dat\" -exec rm -rf {} \\;\nfind -d $ACPKG -name \"CVS\" -exec rm -rf {} \\;\nfind $ACPKG -name \".DS_Store\" -exec rm -f {} \\;\nrm -rf $ACPKG/sourcecode/xcode/build\nrm -f $GAMEDIR/config/saved.cfg\nrm -f $GAMEDIR/config/servers.cfg\n\n\n#add alias to readme\n/usr/bin/osascript <