forked from Mirrors/openclonk
mac: Use standard localization facility for addon installation dialogs + put addons into preferred installation location (Library/Application Support)
parent
a62486044e
commit
e7878038c8
|
@ -1323,3 +1323,6 @@ IDS_NET_CLIENT_IGNORE=Ignorieren
|
|||
IDS_NET_CLIENT_UNIGNORE=Nicht mehr ignorieren
|
||||
IDS_MSG_HIGHRESLANDSCAPE=Hochauflösende Landschaft
|
||||
IDS_MSG_HIGHRESLANDSCAPE_DESC=Experimenteller Effekt für hochauflösende Texturen auf der Landschaft.
|
||||
IDS_ADDON_INSTALLSUCCESS=Installation von '%s' erfolgreich.
|
||||
IDS_ADDON_INSTALLFAILURE=Installation von '%s' fehlgeschlagen.
|
||||
IDS_ADDON_INSTALLTITLE=Addon-Installation
|
||||
|
|
|
@ -1322,3 +1322,6 @@ IDS_NET_CLIENT_IGNORE=Ignore
|
|||
IDS_NET_CLIENT_UNIGNORE=Unignore
|
||||
IDS_MSG_HIGHRESLANDSCAPE=High resolution landscape
|
||||
IDS_MSG_HIGHRESLANDSCAPE_DESC=Experimental effect for high resolution textures on the landscape.
|
||||
IDS_ADDON_INSTALLSUCCESS=Installation of '%s' successful.
|
||||
IDS_ADDON_INSTALLFAILURE=Failed to install '%s'.
|
||||
IDS_ADDON_INSTALLTITLE=Addon Installation
|
||||
|
|
|
@ -221,18 +221,21 @@
|
|||
|
||||
// Build destination path.
|
||||
NSString* justFileName = [addonSupplied lastPathComponent];
|
||||
NSString* destPath = [[self clonkDirectory] stringByAppendingPathComponent:justFileName];
|
||||
NSString* destPath = [self clonkDirectory];
|
||||
NSString* formatString;
|
||||
|
||||
// Already installed?
|
||||
for (C4Reloc::iterator it = Reloc.begin(); it != Reloc.end(); it++)
|
||||
{
|
||||
if ([addonSupplied hasPrefix:[NSString stringWithCString:(*it).getData() encoding:NSUTF8StringEncoding]])
|
||||
if ([addonSupplied hasPrefix:[NSString stringWithCString:(*it).strBuf.getData() encoding:NSUTF8StringEncoding]])
|
||||
{
|
||||
[gatheredArguments addObject:addonSupplied];
|
||||
return NO; // run scenarios when they are already containd in one of the Reloc directories
|
||||
}
|
||||
else if (it->pathType == C4Reloc::PATH_PreferredInstallationLocation)
|
||||
destPath = [NSString stringWithCString:it->strBuf.getData() encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
destPath = [destPath stringByAppendingPathComponent:justFileName];
|
||||
|
||||
NSFileManager* fileManager = [NSFileManager defaultManager];
|
||||
if ([fileManager fileExistsAtPath:destPath])
|
||||
|
|
Loading…
Reference in New Issue