From 1fb56dd13d33bf6b5572be254e63cbec54ab5faf Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 19 Mar 2010 00:30:03 +1300 Subject: [PATCH] File downloader --- packaging/osx/launcher/Controller.h | 27 + packaging/osx/launcher/Controller.m | 112 +++ .../osx/launcher/English.lproj/MainMenu.xib | 942 +++++++++++------- .../launcher/OpenRA.xcodeproj/project.pbxproj | 12 +- packaging/osx/launcher/OpenRAAppDelegate.h | 27 - packaging/osx/launcher/OpenRAAppDelegate.m | 29 - packaging/osx/package.sh | 2 +- 7 files changed, 700 insertions(+), 451 deletions(-) delete mode 100644 packaging/osx/launcher/OpenRAAppDelegate.h delete mode 100644 packaging/osx/launcher/OpenRAAppDelegate.m diff --git a/packaging/osx/launcher/Controller.h b/packaging/osx/launcher/Controller.h index f4896ac121..c865ad4894 100644 --- a/packaging/osx/launcher/Controller.h +++ b/packaging/osx/launcher/Controller.h @@ -20,8 +20,35 @@ @interface Controller : NSObject { + // Main Window + NSString *localDownloadPath; + NSString *packageDirectory; + NSURLDownload *currentDownload; + long long expectedData; + long long downloadedData; + BOOL downloading; + + IBOutlet NSWindow *mainWindow; + + // Download Sheet + IBOutlet NSWindow *downloadSheet; + IBOutlet id infoText; + IBOutlet id downloadButton; + IBOutlet id cancelButton; + + IBOutlet id downloadBar; + IBOutlet id statusText; + IBOutlet id abortButton; } + +-(IBAction)showDownloadSheet:(id)sender; +- (IBAction)dismissDownloadSheet:(id)sender; + + -(IBAction)launchApp:(id)sender; +- (IBAction)startDownload:(id)sender; +- (IBAction)stopDownload:(id)sender; +- (void)extractPackages; @end diff --git a/packaging/osx/launcher/Controller.m b/packaging/osx/launcher/Controller.m index 055311b72a..ac7279ef7f 100644 --- a/packaging/osx/launcher/Controller.m +++ b/packaging/osx/launcher/Controller.m @@ -27,5 +27,117 @@ [NSApp terminate: nil]; } +-(IBAction)showDownloadSheet:(id)sender +{ + [NSApp beginSheet:downloadSheet modalForWindow:mainWindow + modalDelegate:self didEndSelector:NULL contextInfo:nil]; +} + +- (IBAction)dismissDownloadSheet:(id)sender +{ + [NSApp endSheet:downloadSheet]; + [downloadSheet orderOut:self]; + [downloadSheet performClose:self]; +} + +- (IBAction)startDownload:(id)sender +{ + // Change the sheet items + [downloadBar setHidden:NO]; + [abortButton setHidden:NO]; + [statusText setHidden:NO]; + [infoText setHidden:YES]; + [downloadButton setHidden:YES]; + [cancelButton setHidden:YES]; + + // Create a request + NSURL *remoteURL = [NSURL URLWithString:@"http://open-ra.org/packages/ra-packages.zip"]; + localDownloadPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"ra-packages.zip"]; + packageDirectory = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"mods/ra/packages/"]; + + NSLog(@"Downloading to %@",localDownloadPath); + NSURLRequest *theRequest=[NSURLRequest requestWithURL:remoteURL + cachePolicy:NSURLRequestUseProtocolCachePolicy + timeoutInterval:60.0]; + + // Create a download object + currentDownload = [[NSURLDownload alloc] initWithRequest:theRequest delegate:self]; + + if (currentDownload) + { + downloading = YES; + [currentDownload setDestination:localDownloadPath allowOverwrite:YES]; + [statusText setStringValue:@"Connecting..."]; + } + else + [statusText setStringValue:@"Cannot connect to server"]; +} + +- (IBAction)stopDownload:(id)sender +{ + // Stop the download + if (downloading) + [currentDownload cancel]; + + // Update the sheet status + [downloadBar setHidden:YES]; + [abortButton setHidden:YES]; + [statusText setHidden:YES]; + [infoText setHidden:NO]; + [downloadButton setHidden:NO]; + [cancelButton setHidden:NO]; +} + +#pragma mark === Download Delegate Methods === + +- (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error +{ + [download release]; downloading = NO; + [statusText setStringValue:@"Error downloading file"]; +} + +- (void)downloadDidFinish:(NSURLDownload *)download +{ + [download release]; downloading = NO; + [self extractPackages]; +} + +- (void)extractPackages +{ + [abortButton setEnabled:NO]; + [downloadBar setDoubleValue:0]; + [downloadBar setMaxValue:1]; + [downloadBar setIndeterminate:YES]; + [statusText setStringValue:@"Extracting..."]; + + // TODO: Extract and copy files +} + +- (void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse *)response +{ + expectedData = [response expectedContentLength]; + if (expectedData > 0.0) + { + downloadedData = 0; + [downloadBar setIndeterminate:NO]; + [downloadBar setMaxValue:expectedData]; + [downloadBar setDoubleValue:downloadedData]; + } +} + +- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)length +{ + downloadedData += length; + if (downloadedData >= expectedData) + { + [downloadBar setIndeterminate:YES]; + [statusText setStringValue:@"Downloading..."]; + } + else + { + [downloadBar setDoubleValue:downloadedData]; + [statusText setStringValue:[NSString stringWithFormat:@"Downloading %.1f of %f",downloadedData,expectedData]]; + } +} @end diff --git a/packaging/osx/launcher/English.lproj/MainMenu.xib b/packaging/osx/launcher/English.lproj/MainMenu.xib index 56c799d1e2..28161654f2 100644 --- a/packaging/osx/launcher/English.lproj/MainMenu.xib +++ b/packaging/osx/launcher/English.lproj/MainMenu.xib @@ -1,7 +1,7 @@ - 1060 + 1050 10C540 740 1038.25 @@ -12,6 +12,7 @@ YES + @@ -266,13 +267,12 @@ 7 2 - {{855, 323}, {300, 300}} + {{855, 474}, {424, 149}} 1954022400 OpenRA Launcher NSWindow - {300, 300} - {300, 300} + {3.40282e+38, 3.40282e+38} 256 @@ -281,13 +281,13 @@ 289 - {{185, 12}, {96, 32}} + {{109, 60}, {96, 32}} YES -2080244224 134217728 - Launch + C&C LucidaGrande 13 @@ -302,242 +302,217 @@ 25 - + - 274 - - YES - - - 2304 - - YES - - - 256 - {258, 209} - - YES - - - 256 - {258, 17} - - - - - - -2147483392 - {{224, 0}, {16, 17}} - - - - YES - - 142 - 40 - 1000 - - 75628096 - 2048 - - - LucidaGrande - 11 - 3100 - - - 3 - MC4zMzMzMzI5ODU2AA - - - 6 - System - headerTextColor - - 3 - MAA - - - - - 337772096 - 2048 - Text Cell - - - - 6 - System - controlBackgroundColor - - 3 - MC42NjY2NjY2ODY1AA - - - - 6 - System - controlTextColor - - - - 3 - YES - YES - - - - 99 - 40 - 1000 - - 75628096 - 2048 - - - - - - - 337772096 - 2048 - Text Cell - - - - - - 3 - YES - YES - - - - 3 - 2 - - 3 - MQA - - - 6 - System - gridColor - - 3 - MC41AA - - - 17 - -702545920 - - - 4 - 15 - 0 - YES - 0 - - - {{1, 17}, {258, 209}} - - - - - 4 - - - - -2147483392 - {{224, 17}, {15, 102}} - - - _doScroller: - 0.90506327152252197 - - - - -2147483392 - {{1, 160}, {256, 15}} - - 1 - - _doScroller: - 1 - 0.94464945793151855 - - - - 2304 - - YES - - - {{1, 0}, {258, 17}} - - - - - 4 - - - - {{20, 53}, {260, 227}} - - - 562 - - - - - - QSAAAEEgAABBmAAAQZgAAA - - - - 292 - {{18, 21}, {86, 18}} + 289 + {{285, 4}, {103, 32}} YES - - -2080244224 - 0 - Fullscreen + + 67239424 + 134217984 + Download - - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - + + -2038284033 + 129 + + Gw + 200 + 25 + + + + + 289 + {{222, 60}, {98, 32}} + + YES + + -2080244224 + 134217728 + Red Alert + + + -2038284033 + 129 200 25 + + + 266 + {{117, 107}, {190, 17}} + + YES + + 68288064 + 138413056 + Select Game + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2ODY1AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + - {300, 300} + {424, 149} {{0, 0}, {1680, 1028}} - {300, 322} - {300, 322} - - - OpenRAAppDelegate - - - NSFontManager + {3.40282e+38, 3.40282e+38} Controller + + YES + + + 1 + 2 + {{196, 400}, {379, 110}} + -1535639552 + Download + NSPanel + + {3.40282e+38, 3.40282e+38} + + + 256 + + YES + + + 289 + {{262, 12}, {103, 32}} + + YES + + 67239424 + 134217728 + Ok + + + -2038284033 + 129 + + + 200 + 25 + + + + + -2147483359 + {{262, 12}, {103, 32}} + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 129 + + Gw + 200 + 25 + + + + + 289 + {{159, 12}, {103, 32}} + + YES + + -2080244224 + 134217728 + Cancel + + + -2038284033 + 129 + + Gw + 200 + 25 + + + + + 268 + {{17, 48}, {345, 42}} + + YES + + 67239424 + 272629760 + Files from the original game are required to play. Approximately 7MiB will now be downloaded. + + LucidaGrande + 13 + 16 + + + + + + + + + -2147482356 + + {{18, 70}, {335, 20}} + + 16394 + 1 + + + + -2147483380 + {{17, 49}, {337, 17}} + + YES + + 68288064 + 71304192 + Downloading %f of %f + + + + + + + + {379, 110} + + + {{0, 0}, {1680, 1028}} + {3.40282e+38, 3.40282e+38} + @@ -614,22 +589,6 @@ 493 - - - delegate - - - - 495 - - - - window - - - - 532 - launchApp: @@ -638,6 +597,110 @@ 536 + + + launchApp: + + + + 550 + + + + startDownload: + + + + 556 + + + + dismissDownloadSheet: + + + + 581 + + + + showDownloadSheet: + + + + 582 + + + + downloadSheet + + + + 583 + + + + mainWindow + + + + 584 + + + + infoText + + + + 585 + + + + downloadBar + + + + 586 + + + + cancelButton + + + + 587 + + + + downloadButton + + + + 588 + + + + stopDownload: + + + + 592 + + + + abortButton + + + + 593 + + + + statusText + + + + 597 + @@ -824,17 +887,13 @@ YES - - + + + - - 420 - - - 490 @@ -858,11 +917,6 @@ - - 494 - - - 533 @@ -883,83 +937,149 @@ - 537 - + 548 + YES - - - - + - 538 - - + 549 + + - 539 - - - - - 540 - + 551 + YES - - - - - - - 541 - - - - - 542 - - - YES - - - - - - 543 - - - YES - - - - - - 544 - - - - - 545 - - - - - 546 - - - YES - + - 547 - - + 552 + + + + + 558 + + + + + 564 + + + YES + + + + + + 565 + + + + + 568 + + + YES + + + + + + 569 + + + YES + + + + + + + + + + + 575 + + + YES + + + + + + 576 + + + + + 570 + + + YES + + + + + + 571 + + + + + 553 + + + YES + + + + + + 554 + + + + + 557 + + + + + 589 + + + YES + + + + + + 590 + + + + + 595 + + + YES + + + + + + 596 + + @@ -1024,25 +1144,38 @@ 5.ImportedFromIB2 533.IBPluginDependency 534.IBPluginDependency - 537.IBPluginDependency - 538.IBPluginDependency - 539.IBPluginDependency - 540.IBPluginDependency - 541.IBPluginDependency - 542.IBPluginDependency - 543.IBPluginDependency - 544.IBPluginDependency - 545.IBPluginDependency - 546.IBPluginDependency - 547.IBPluginDependency + 548.IBPluginDependency + 549.IBPluginDependency + 551.IBPluginDependency + 552.IBPluginDependency + 553.IBPluginDependency + 554.IBPluginDependency + 557.IBPluginDependency + 558.IBPluginDependency 56.IBPluginDependency 56.ImportedFromIB2 + 564.IBPluginDependency + 565.IBPluginDependency + 568.IBEditorWindowLastContentRect + 568.IBPluginDependency + 568.IBViewEditorWindowController.showingLayoutRectangles + 568.IBWindowTemplateEditedContentRect + 568.NSWindowTemplate.visibleAtLaunch + 569.IBPluginDependency 57.IBEditorWindowLastContentRect 57.IBPluginDependency 57.ImportedFromIB2 57.editorWindowContentRectSynchronizationRect + 570.IBPluginDependency + 571.IBPluginDependency + 575.IBPluginDependency + 576.IBPluginDependency 58.IBPluginDependency 58.ImportedFromIB2 + 589.IBPluginDependency + 590.IBPluginDependency + 595.IBPluginDependency + 596.IBPluginDependency 92.IBPluginDependency 92.ImportedFromIB2 @@ -1087,13 +1220,13 @@ {74, 862} {{6, 978}, {478, 20}} - {{855, 279}, {300, 300}} + {{740, 575}, {424, 149}} com.apple.InterfaceBuilder.CocoaPlugin - {{855, 279}, {300, 300}} + {{740, 575}, {424, 149}} {{33, 99}, {480, 360}} - - + + {300, 300} {300, 300} com.apple.InterfaceBuilder.CocoaPlugin @@ -1114,17 +1247,30 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{982, 337}, {379, 110}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{982, 337}, {379, 110}} + + com.apple.InterfaceBuilder.CocoaPlugin {{392, 653}, {190, 183}} com.apple.InterfaceBuilder.CocoaPlugin {{23, 794}, {245, 183}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -1144,7 +1290,7 @@ - 547 + 597 @@ -1153,26 +1299,54 @@ Controller NSObject - launchApp: - id + YES + + YES + dismissDownloadSheet: + launchApp: + showDownloadSheet: + startDownload: + stopDownload: + + + YES + id + id + id + id + id + + + + YES + + YES + abortButton + cancelButton + downloadBar + downloadButton + downloadSheet + infoText + mainWindow + statusText + + + YES + id + id + id + id + NSWindow + id + NSWindow + id + IBProjectSource Controller.h - - OpenRAAppDelegate - NSObject - - window - NSWindow - - - IBProjectSource - OpenRAAppDelegate.h - - YES @@ -1260,11 +1434,11 @@ - NSFontManager + NSController NSObject - + IBFrameworkSource - AppKit.framework/Headers/NSFontManager.h + AppKit.framework/Headers/NSController.h @@ -1330,7 +1504,10 @@ NSObject - + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + NSObject @@ -1380,7 +1557,7 @@ NSObject - + IBFrameworkSource AppKit.framework/Headers/NSTableView.h @@ -1532,6 +1709,22 @@ Foundation.framework/Headers/NSURLDownload.h + + NSPanel + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSPanel.h + + + + NSProgressIndicator + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSProgressIndicator.h + + NSResponder @@ -1548,42 +1741,13 @@ - NSScrollView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSScrollView.h - - - - NSScroller + NSTextField NSControl IBFrameworkSource - AppKit.framework/Headers/NSScroller.h + AppKit.framework/Headers/NSTextField.h - - NSTableColumn - NSObject - - IBFrameworkSource - AppKit.framework/Headers/NSTableColumn.h - - - - NSTableHeaderView - NSView - - IBFrameworkSource - AppKit.framework/Headers/NSTableHeaderView.h - - - - NSTableView - NSControl - - NSTextFieldCell NSActionCell @@ -1592,6 +1756,14 @@ AppKit.framework/Headers/NSTextFieldCell.h + + NSUserDefaultsController + NSController + + IBFrameworkSource + AppKit.framework/Headers/NSUserDefaultsController.h + + NSView @@ -1642,7 +1814,7 @@ 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 diff --git a/packaging/osx/launcher/OpenRA.xcodeproj/project.pbxproj b/packaging/osx/launcher/OpenRA.xcodeproj/project.pbxproj index 7e978b1344..32a3b247f7 100644 --- a/packaging/osx/launcher/OpenRA.xcodeproj/project.pbxproj +++ b/packaging/osx/launcher/OpenRA.xcodeproj/project.pbxproj @@ -8,7 +8,6 @@ /* Begin PBXBuildFile section */ 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; - 256AC3DA0F4B6AC300CF3369 /* OpenRAAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* OpenRAAppDelegate.m */; }; 8990E7AF1151C0F20089C198 /* Controller.m in Sources */ = {isa = PBXBuildFile; fileRef = 8990E7AE1151C0F20089C198 /* Controller.m */; }; 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; @@ -22,8 +21,6 @@ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; - 256AC3D80F4B6AC300CF3369 /* OpenRAAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenRAAppDelegate.h; sourceTree = ""; }; - 256AC3D90F4B6AC300CF3369 /* OpenRAAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OpenRAAppDelegate.m; sourceTree = ""; }; 256AC3F00F4B6AF500CF3369 /* OpenRA_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenRA_Prefix.pch; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; @@ -53,8 +50,6 @@ children = ( 8990E7AD1151C0F20089C198 /* Controller.h */, 8990E7AE1151C0F20089C198 /* Controller.m */, - 256AC3D80F4B6AC300CF3369 /* OpenRAAppDelegate.h */, - 256AC3D90F4B6AC300CF3369 /* OpenRAAppDelegate.m */, ); name = Classes; sourceTree = ""; @@ -193,7 +188,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "DIR=`pwd`\ncd ../../../\nmake clean\nmake all\nmake dist-osx\ncp -r OpenRA.app ${TARGET_BUILD_DIR}/OpenRA.app/Contents/Resources/"; + shellScript = "cd ../../../\n#make clean\n#make all\n#make dist-osx\ncp -r OpenRA.app ${TARGET_BUILD_DIR}/OpenRA.app/Contents/Resources/"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -204,7 +199,6 @@ buildActionMask = 2147483647; files = ( 8D11072D0486CEB800E47090 /* main.m in Sources */, - 256AC3DA0F4B6AC300CF3369 /* OpenRAAppDelegate.m in Sources */, 8990E7AF1151C0F20089C198 /* Controller.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -272,7 +266,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; PREBINDING = NO; - SDKROOT = macosx10.6; + SDKROOT = macosx10.5; }; name = Debug; }; @@ -284,7 +278,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; - SDKROOT = macosx10.6; + SDKROOT = macosx10.5; }; name = Release; }; diff --git a/packaging/osx/launcher/OpenRAAppDelegate.h b/packaging/osx/launcher/OpenRAAppDelegate.h deleted file mode 100644 index 764b4a710a..0000000000 --- a/packaging/osx/launcher/OpenRAAppDelegate.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. - * This file is part of OpenRA. - * - * OpenRA is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * OpenRA is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with OpenRA. If not, see . - */ - -#import - -@interface OpenRAAppDelegate : NSObject { - NSWindow *window; -} - -@property (assign) IBOutlet NSWindow *window; - -@end diff --git a/packaging/osx/launcher/OpenRAAppDelegate.m b/packaging/osx/launcher/OpenRAAppDelegate.m deleted file mode 100644 index 59f1e71d74..0000000000 --- a/packaging/osx/launcher/OpenRAAppDelegate.m +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford. - * This file is part of OpenRA. - * - * OpenRA is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * OpenRA is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with OpenRA. If not, see . - */ - -#import "OpenRAAppDelegate.h" - -@implementation OpenRAAppDelegate - -@synthesize window; - -- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - // Insert code here to initialize your application -} - -@end diff --git a/packaging/osx/package.sh b/packaging/osx/package.sh index a16713eaff..f88bb8690f 100755 --- a/packaging/osx/package.sh +++ b/packaging/osx/package.sh @@ -16,7 +16,7 @@ MODS_INCLUDE_FILES="find mods/$m ! -name \"*.mdb\" ! -name \"packages\"" GAC_DYLIBS="/Library/Frameworks/Mono.framework/Versions/2.6.1/lib/libMonoPosixHelper.dylib /Library/Frameworks/Mono.framework/Versions/2.6.1/lib/libgdiplus.dylib" # Remove old app bundle -rm -r OpenRA.app OpenRA +rm -r OpenRA.app # Recursively modify and copy the mono files depended on by OpenRA into the app bundle function patch_mono {