author | alfadur |
Thu, 12 Nov 2020 00:24:58 +0300 | |
changeset 15759 | c929e25a7da2 |
parent 8931 | ca678bee1a41 |
permissions | -rw-r--r-- |
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
1 |
/***************************************************************** |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
2 |
M3InstallController.m |
3697 | 3 |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
4 |
Created by Martin Pilkington on 02/06/2007. |
3697 | 5 |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
6 |
Copyright (c) 2006-2009 M Cubed Software |
3697 | 7 |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
8 |
Permission is hereby granted, free of charge, to any person |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
9 |
obtaining a copy of this software and associated documentation |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
10 |
files (the "Software"), to deal in the Software without |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
11 |
restriction, including without limitation the rights to use, |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
12 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
13 |
copies of the Software, and to permit persons to whom the |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
14 |
Software is furnished to do so, subject to the following |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
15 |
conditions: |
3697 | 16 |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
17 |
The above copyright notice and this permission notice shall be |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
18 |
included in all copies or substantial portions of the Software. |
3697 | 19 |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
20 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
21 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
22 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
23 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
24 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
25 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
26 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
27 |
OTHER DEALINGS IN THE SOFTWARE. |
3697 | 28 |
|
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
29 |
*****************************************************************/ |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
30 |
|
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
31 |
#import "M3InstallController.h" |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
32 |
#import "NSWorkspace_RBAdditions.h" |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
33 |
|
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
34 |
#import <Foundation/Foundation.h> |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
35 |
|
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
36 |
@implementation M3InstallController |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
37 |
|
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
38 |
-(id) init { |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
39 |
if ((self = [super init])) { |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
40 |
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
41 |
NSString *title = [NSString stringWithFormat:NSLocalizedString(@"%@ is currently running from a disk image", @"AppName is currently running from a disk image"), appName]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
42 |
NSString *body = [NSString stringWithFormat:NSLocalizedString(@"Would you like to install %@ in your applications folder before quitting?", @"Would you like to install App Name in your applications folder before quitting?"), appName]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
43 |
alert = [[NSAlert alertWithMessageText:title |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
44 |
defaultButton:NSLocalizedString(@"Install", @"Install") |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
45 |
alternateButton:NSLocalizedString(@"Don't Install", @"Don't Install") |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
46 |
otherButton:nil |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
47 |
informativeTextWithFormat:body] retain]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
48 |
//[alert setShowsSuppressionButton:YES]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
49 |
} |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
50 |
return self; |
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
51 |
} |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
52 |
|
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
53 |
-(void) displayInstaller { |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
54 |
NSString *imageFilePath = [[[NSWorkspace sharedWorkspace] propertiesForPath:[[NSBundle mainBundle] bundlePath]] objectForKey:NSWorkspace_RBimagefilepath]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
55 |
if (imageFilePath && ![imageFilePath isEqualToString:[NSString stringWithFormat:@"/Users/.%@/%@.sparseimage", NSUserName(), NSUserName()]] && ![[NSUserDefaults standardUserDefaults] boolForKey:@"M3DontAskInstallAgain"]) { |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
56 |
NSInteger returnValue = [alert runModal]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
57 |
if (returnValue == NSAlertDefaultReturn) { |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
58 |
[self installApp]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
59 |
} |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
60 |
if ([NSAlert instancesRespondToSelector:@selector(suppressionButton)]) |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
61 |
if ([[alert performSelector:@selector(suppressionButton)] state] == NSOnState) |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
62 |
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"M3DontAskInstallAgain"]; |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
63 |
} |
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
64 |
} |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
65 |
|
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
66 |
-(void) installApp { |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
67 |
NSString *appsPath = [[NSString stringWithString:@"/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
68 |
NSString *userAppsPath = [[[NSString stringWithString:@"~/Applications"] stringByAppendingPathComponent:[[[NSBundle mainBundle] bundlePath] lastPathComponent]] stringByExpandingTildeInPath]; |
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
69 |
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
70 |
NSString *currentPath = [[NSBundle mainBundle] bundlePath]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
71 |
NSString *finalPath; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
72 |
NSError *error = nil; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
73 |
BOOL success; |
3697 | 74 |
|
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
75 |
// Prepare the remove invocation |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
76 |
SEL removeSelector; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
77 |
if ([NSFileManager instancesRespondToSelector:@selector(removeItemAtPath:error:)]) |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
78 |
removeSelector = @selector(removeItemAtPath:error:); |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
79 |
else |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
80 |
removeSelector = @selector(removeFileAtPath:handler:); |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
81 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
82 |
NSMethodSignature *removeSignature = [NSFileManager instanceMethodSignatureForSelector:removeSelector]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
83 |
NSInvocation *removeInvocation = [NSInvocation invocationWithMethodSignature:removeSignature]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
84 |
[removeInvocation setTarget:[NSFileManager defaultManager]]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
85 |
[removeInvocation setSelector:removeSelector]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
86 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
87 |
// Delete the app if already installed |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
88 |
if ([[NSFileManager defaultManager] fileExistsAtPath:appsPath]) { |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
89 |
[removeInvocation setArgument:&appsPath atIndex:2]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
90 |
[removeInvocation setArgument:&error atIndex:3]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
91 |
[removeInvocation invoke]; |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
92 |
} |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
93 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
94 |
// Prepare the copy invocation |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
95 |
SEL copySelector; |
8449 | 96 |
if ([NSFileManager instancesRespondToSelector:@selector(copyItemAtPath:toPath:error:)]) |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
97 |
copySelector = @selector(copyItemAtPath:toPath:error:); |
8449 | 98 |
else |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
99 |
copySelector = @selector(copyPath:toPath:handler:); |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
100 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
101 |
NSMethodSignature *copySignature = [NSFileManager instanceMethodSignatureForSelector:copySelector]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
102 |
NSInvocation *copyInvocation = [NSInvocation invocationWithMethodSignature:copySignature]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
103 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
104 |
[copyInvocation setTarget:[NSFileManager defaultManager]]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
105 |
[copyInvocation setSelector:copySelector]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
106 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
107 |
// Copy the app in /Applications |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
108 |
[copyInvocation setArgument:¤tPath atIndex:2]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
109 |
[copyInvocation setArgument:&appsPath atIndex:3]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
110 |
[copyInvocation setArgument:&error atIndex:4]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
111 |
[copyInvocation invoke]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
112 |
[copyInvocation getReturnValue:&success]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
113 |
finalPath = @"/Applications"; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
114 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
115 |
// In case something went wrong, let's try again somewhere else |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
116 |
if (success == NO) { |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
117 |
// Delete the app if already installed |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
118 |
if ([[NSFileManager defaultManager] fileExistsAtPath:userAppsPath]) { |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
119 |
[removeInvocation setArgument:&userAppsPath atIndex:2]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
120 |
[removeInvocation invoke]; |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
121 |
} |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
122 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
123 |
// Copy the app in ~/Applications |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
124 |
[copyInvocation setArgument:&userAppsPath atIndex:3]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
125 |
[copyInvocation invoke]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
126 |
[copyInvocation getReturnValue:&success]; |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
127 |
finalPath = [[NSString stringWithString:@"~/Applications"] stringByExpandingTildeInPath]; |
8440
ea4d6a7a2937
complete tabs and trailing whitespace formatting on frontend
koda
parents:
8381
diff
changeset
|
128 |
} |
8931
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
129 |
|
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
130 |
if (success) |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
131 |
NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"%@ installed successfully", @"successful installation title"), appName], |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
132 |
[NSString stringWithFormat:NSLocalizedString(@"%@ was installed in %@", @"successfull installation text"), appName, finalPath], |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
133 |
NSLocalizedString(@"Ok", @"ok message"), nil, nil); |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
134 |
else |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
135 |
NSRunAlertPanel([NSString stringWithFormat:NSLocalizedString(@"Could not install %@", @"installation failure title"), appName], |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
136 |
NSLocalizedString(@"An error occurred when installing", @"installation failure text"), |
ca678bee1a41
rewrite m3panel installation to fix all warnings on any architecture, using nsinvocation all round
koda
parents:
8449
diff
changeset
|
137 |
NSLocalizedString(@"Quit", @"exit message"), nil, nil); |
2400
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
138 |
} |
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
139 |
|
2422ea85d100
added a utility that warns the user to install hedgewars when it's run from the diskimage
koda
parents:
diff
changeset
|
140 |
@end |