Subversion Repositories spk

Rev

Rev 178 | Rev 185 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 178 Rev 182
Line 1307... Line 1307...
1307
			for (auto itr = fileList.begin(); itr != fileList.end(); itr++)
1307
			for (auto itr = fileList.begin(); itr != fileList.end(); itr++)
1308
			{
1308
			{
1309
				printf("Reading file: %s\n", (*itr)->str.c_str());
1309
				printf("Reading file: %s\n", (*itr)->str.c_str());
1310
 
1310
 
1311
				int error = 0;
1311
				int error = 0;
1312
				CBaseFile *p = packages.OpenPackage((*itr)->str, &error, 0, SPKREAD_NODATA);
1312
				CBaseFile *p = packages.openPackage((*itr)->str, &error, 0, SPKREAD_NODATA);
1313
				if (!p)
1313
				if (!p)
1314
				{
1314
				{
1315
					printf("\tERROR!\n");
1315
					printf("\tERROR!\n");
1316
					continue;
1316
					continue;
1317
				}
1317
				}
Line 1337... Line 1337...
1337
			}
1337
			}
1338
		}
1338
		}
1339
	}
1339
	}
1340
}
1340
}
1341
 
1341
 
1342
void GenerateUpdateFile(CyString spkfile)
1342
void GenerateUpdateFile(const Utils::String &spkfile)
1343
{
1343
{
1344
	if ( !CFileIO(spkfile).ExistsOld() )
1344
	if (!CFileIO::Exists(spkfile))
1345
	{
1345
	{
1346
		printf("Error: The package file, %s, does not exist", spkfile.c_str());
1346
		printf("Error: The package file, %s, does not exist", spkfile.c_str());
1347
		return;
1347
		return;
1348
	}
1348
	}
1349
 
1349
 
1350
	int check = CSpkFile::CheckFile(spkfile.ToString());
1350
	int check = CSpkFile::CheckFile(spkfile);
1351
	if ( check == SPKFILE_MULTI )
1351
	if ( check == SPKFILE_MULTI )
1352
	{
1352
	{
1353
		printf("Error: Multi-Package files currently not supported\n");
1353
		printf("Error: Multi-Package files currently not supported\n");
1354
		return;
1354
		return;
1355
	}
1355
	}
Line 1364... Line 1364...
1364
		return;
1364
		return;
1365
	}
1365
	}
1366
 
1366
 
1367
	CPackages p;
1367
	CPackages p;
1368
	int error;
1368
	int error;
1369
	CBaseFile *package = p.OpenPackage(spkfile, &error, 0, SPKREAD_NODATA);
1369
	CBaseFile *package = p.openPackage(spkfile, &error, 0, SPKREAD_NODATA);
1370
	if ( !package )
1370
	if ( !package )
1371
	{
1371
	{
1372
		printf("Error: unable to open package file, %s, Error=%d\n", spkfile.c_str(), error);
1372
		printf("Error: unable to open package file, %s, Error=%d\n", spkfile.c_str(), error);
1373
		return;
1373
		return;
1374
	}
1374
	}
Line 1409... Line 1409...
1409
	}
1409
	}
1410
 
1410
 
1411
	CPackages p;
1411
	CPackages p;
1412
	p.startup(".", ".", ".");
1412
	p.startup(".", ".", ".");
1413
	int error;
1413
	int error;
1414
	CBaseFile *package = p.OpenPackage(spkfile, &error, 0, SPKREAD_NODATA);
1414
	CBaseFile *package = p.openPackage(spkfile, &error, 0, SPKREAD_NODATA);
1415
	if ( !package )
1415
	if ( !package )
1416
	{
1416
	{
1417
		printf("Error: unable to open package files, %s, Error=%d\n", spkfile.c_str(), error);
1417
		printf("Error: unable to open package files, %s, Error=%d\n", spkfile.c_str(), error);
1418
		return;
1418
		return;
1419
	}
1419
	}