reverted accidental change to modrules.xml

added missing appdelegate chagnes for previous changes.(iOS only)
removed system copy of bundled Res folder with app deployment (iOS only)
This commit is contained in:
techdragon.nguyen@gmail.com
2011-12-11 10:04:55 +00:00
parent e58f96afad
commit f8f5c24304
4 changed files with 142 additions and 32 deletions

View File

@@ -89,19 +89,10 @@ JFileSystem::JFileSystem(const string & _userPath, const string & _systemPath)
string userPath = _userPath;
#ifdef IOS
//copy the RES folder over to the Documents folder
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error;
NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory,
NSUserDomainMask, YES);
NSString *documentsDirectory = [[paths objectAtIndex:0] stringByAppendingString: @"/Res"];
NSString *resourceDBFolderPath = [[[NSBundle mainBundle] resourcePath]
stringByAppendingPathComponent:@"Res"];
// copy the Res folder over to the Documents directory if it doesn't exist.
if ( ![fileManager fileExistsAtPath: documentsDirectory])
[fileManager copyItemAtPath:resourceDBFolderPath toPath:documentsDirectory error:&error];
userPath = [documentsDirectory cStringUsingEncoding:1];
userPath += "/";
systemPath = "";