mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
different data file locations for different iso files
This commit is contained in:
@@ -229,10 +229,23 @@
|
|||||||
return [self showErrorText:@"Failed to extract game data using unshield"];
|
return [self showErrorText:@"Failed to extract game data using unshield"];
|
||||||
}
|
}
|
||||||
|
|
||||||
dataDir = [tempDir stringByAppendingString:@"/Heroes3"];
|
NSArray* knownDataDirs = @[
|
||||||
if (![[NSFileManager defaultManager] fileExistsAtPath:dataDir]) {
|
@"/Heroes3",
|
||||||
// Some releases have "Program_Files" folder instead of "Heroes3"
|
@"/Program_Files",
|
||||||
dataDir = [tempDir stringByAppendingString:@"/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
|
// Unmount CD1. Unmount CD2 if needed
|
||||||
|
Reference in New Issue
Block a user