Line 987... |
Line 987... |
987 |
}
|
987 |
}
|
988 |
|
988 |
|
989 |
if ( to && to->Length ) {
|
989 |
if ( to && to->Length ) {
|
990 |
CyString exportFilename = CFileIO(sFile).ChangeFileExtension("zip");
|
990 |
CyString exportFilename = CFileIO(sFile).ChangeFileExtension("zip");
|
991 |
if ( game ) {
|
991 |
if ( game ) {
|
992 |
exportFilename = CFileIO(exportFilename).GetDir() + "/" + CFileIO(exportFilename).GetBaseName() + "_" + CBaseFile::ConvertGameToString(game) + ".zip";
|
992 |
exportFilename = CFileIO(exportFilename).GetDir() + "/" + CFileIO(exportFilename).baseName() + "_" + CBaseFile::ConvertGameToString(game) + ".zip";
|
993 |
}
|
993 |
}
|
994 |
if ( p->SaveToArchive(exportFilename, game) ) {
|
994 |
if ( p->SaveToArchive(exportFilename, game) ) {
|
995 |
String ^message = "Export: " + file + "\nTo: " + SystemStringFromCyString(CFileIO(exportFilename).GetFilename());
|
995 |
String ^message = "Export: " + file + "\nTo: " + SystemStringFromCyString(CFileIO(exportFilename).GetFilename());
|
996 |
if ( game ) {
|
996 |
if ( game ) {
|
997 |
message += "\nGame: " + SystemStringFromCyString(m_pPackages->GetGameExe()->GetGame(game - 1)->sName);
|
997 |
message += "\nGame: " + SystemStringFromCyString(m_pPackages->GetGameExe()->GetGame(game - 1)->sName);
|
Line 1087... |
Line 1087... |
1087 |
if ( package->SaveToArchive(exportto, 0) ) {
|
1087 |
if ( package->SaveToArchive(exportto, 0) ) {
|
1088 |
message += "\nExported to:\n" + SystemStringFromCyString(exportto) + "\n";
|
1088 |
message += "\nExported to:\n" + SystemStringFromCyString(exportto) + "\n";
|
1089 |
if ( package->IsAnyGameInPackage() ) {
|
1089 |
if ( package->IsAnyGameInPackage() ) {
|
1090 |
for ( int i = 0; i < m_pPackages->GetGameExe()->GetNumGames(); i++ ) {
|
1090 |
for ( int i = 0; i < m_pPackages->GetGameExe()->GetNumGames(); i++ ) {
|
1091 |
if ( package->IsGameInPackage(i + 1) ) {
|
1091 |
if ( package->IsGameInPackage(i + 1) ) {
|
1092 |
CyString exportFile = CFileIO(saveto).GetDir() + "/" + CFileIO(saveto).GetBaseName() + "_" + CBaseFile::ConvertGameToString(i + 1) + "." + CFileIO(exportto).GetFileExtension();
|
1092 |
CyString exportFile = CFileIO(saveto).GetDir() + "/" + CFileIO(saveto).baseName() + "_" + CBaseFile::ConvertGameToString(i + 1) + "." + CFileIO(exportto).GetFileExtension();
|
1093 |
if ( package->SaveToArchive(exportFile, i + 1) ) {
|
1093 |
if ( package->SaveToArchive(exportFile, i + 1) ) {
|
1094 |
message += SystemStringFromCyString(CFileIO(exportFile).GetFilename()) + "\n";
|
1094 |
message += SystemStringFromCyString(CFileIO(exportFile).GetFilename()) + "\n";
|
1095 |
}
|
1095 |
}
|
1096 |
}
|
1096 |
}
|
1097 |
}
|
1097 |
}
|
Line 1158... |
Line 1158... |
1158 |
if ( this->imageList1->Images->IndexOfKey(file) == -1 )
|
1158 |
if ( this->imageList1->Images->IndexOfKey(file) == -1 )
|
1159 |
{
|
1159 |
{
|
1160 |
if ( package->GetIcon() )
|
1160 |
if ( package->GetIcon() )
|
1161 |
{
|
1161 |
{
|
1162 |
package->ReadIconFileToMemory();
|
1162 |
package->ReadIconFileToMemory();
|
1163 |
CyString sIconFile = CyStringFromSystemString(IO::Path::GetTempPath()) + "\\" + CFileIO(sFile).GetBaseName() + "." + package->GetIconExt();
|
1163 |
CyString sIconFile = CyStringFromSystemString(IO::Path::GetTempPath()) + "\\" + CFileIO(sFile).baseName() + "." + package->GetIconExt();
|
1164 |
if ( package->ExtractFile(package->GetIcon(), CFileIO(sIconFile).GetFullFilename(), false) )
|
1164 |
if ( package->ExtractFile(package->GetIcon(), CFileIO(sIconFile).GetFullFilename(), false) )
|
1165 |
{
|
1165 |
{
|
1166 |
String ^iconFile = SystemStringFromCyString(sIconFile);
|
1166 |
String ^iconFile = SystemStringFromCyString(sIconFile);
|
1167 |
if ( IO::File::Exists(iconFile) )
|
1167 |
if ( IO::File::Exists(iconFile) )
|
1168 |
{
|
1168 |
{
|