mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-21 19:19:26 +02:00
different data file locations for different iso files
This commit is contained in:
parent
a091398027
commit
145df56126
@ -229,10 +229,23 @@
|
||||
return [self showErrorText:@"Failed to extract game data using unshield"];
|
||||
}
|
||||
|
||||
dataDir = [tempDir stringByAppendingString:@"/Heroes3"];
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:dataDir]) {
|
||||
// Some releases have "Program_Files" folder instead of "Heroes3"
|
||||
dataDir = [tempDir stringByAppendingString:@"/Program_Files"];
|
||||
NSArray* knownDataDirs = @[
|
||||
@"/Heroes3",
|
||||
@"/Program_Files",
|
||||
@"/Data",
|
||||
];
|
||||
|
||||
success = false;
|
||||
for (NSString* knownDir in knownDataDirs) {
|
||||
dataDir = [tempDir stringByAppendingString:knownDir];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:dataDir]) {
|
||||
success = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
return [self showErrorText:@"Failed to extract game data using unshield"];
|
||||
}
|
||||
|
||||
// Unmount CD1. Unmount CD2 if needed
|
||||
|
Loading…
x
Reference in New Issue
Block a user