checks OXP requirements using fall-back XML loading of dictionary if necessary
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@96 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
32b0482738
commit
6164cb8292
@ -177,7 +177,15 @@ NSMutableDictionary* surface_cache;
|
||||
BOOL require_test = YES;
|
||||
// check for compatibility
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:requiresPath])
|
||||
require_test = [ResourceManager areRequirementsFulfilled:[NSDictionary dictionaryWithContentsOfFile:requiresPath]];
|
||||
{
|
||||
NSDictionary* requires_dic = [NSDictionary dictionaryWithContentsOfFile:requiresPath];
|
||||
|
||||
// FIX FOR WINDOWS GNUSTEP NOT PARSING XML PLISTS
|
||||
if (!requires_dic) // try parsing it using our home-grown XML parser
|
||||
requires_dic = (NSDictionary*)[ResourceManager parseXMLPropertyList:[NSString stringWithContentsOfFile:requiresPath]];
|
||||
|
||||
require_test = [ResourceManager areRequirementsFulfilled:requires_dic];
|
||||
}
|
||||
if (require_test)
|
||||
[file_paths addObject:possibleExpansionPath]; // it made it in!
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user