| Line 473... |
Line 473... |
| 473 |
else if ( p->IsAnyGameInPackage() ) {
|
473 |
else if ( p->IsAnyGameInPackage() ) {
|
| 474 |
game = p->FindFirstGameInPackage();
|
474 |
game = p->FindFirstGameInPackage();
|
| 475 |
}
|
475 |
}
|
| 476 |
|
476 |
|
| 477 |
if ( to && to->Length ) {
|
477 |
if ( to && to->Length ) {
|
| 478 |
Utils::String exportFilename = CFileIO(sFile).ChangeFileExtension("zip").ToString();
|
478 |
Utils::String exportFilename = CFileIO(sFile).changeFileExtension("zip");
|
| 479 |
if ( game ) {
|
479 |
if ( game ) {
|
| 480 |
exportFilename = CFileIO(exportFilename).dir() + "/" + CFileIO(exportFilename).baseName() + "_" + CBaseFile::ConvertGameToString(game) + ".zip";
|
480 |
exportFilename = CFileIO(exportFilename).dir() + "/" + CFileIO(exportFilename).baseName() + "_" + CBaseFile::ConvertGameToString(game) + ".zip";
|
| 481 |
}
|
481 |
}
|
| 482 |
if ( p->SaveToArchive(exportFilename, game, m_pPackages->GetGameExe()) ) {
|
482 |
if ( p->SaveToArchive(exportFilename, game, m_pPackages->GetGameExe()) ) {
|
| 483 |
String ^message = "Export: " + file + "\nTo: " + _US(CFileIO(exportFilename).filename());
|
483 |
String ^message = "Export: " + file + "\nTo: " + _US(CFileIO(exportFilename).filename());
|
| Line 1170... |
Line 1170... |
| 1170 |
{
|
1170 |
{
|
| 1171 |
System::String ^mydoc = Environment::GetFolderPath(Environment::SpecialFolder::Personal );
|
1171 |
System::String ^mydoc = Environment::GetFolderPath(Environment::SpecialFolder::Personal );
|
| 1172 |
CFileIO Config;
|
1172 |
CFileIO Config;
|
| 1173 |
if ( Config.open(_S(mydoc) + "/Egosoft/creator.dat") )
|
1173 |
if ( Config.open(_S(mydoc) + "/Egosoft/creator.dat") )
|
| 1174 |
{
|
1174 |
{
|
| 1175 |
std::vector<CyString> *lines = Config.ReadLines();
|
1175 |
std::vector<Utils::String> *lines = Config.readLines();
|
| 1176 |
if ( lines )
|
1176 |
if ( lines )
|
| 1177 |
{
|
1177 |
{
|
| 1178 |
for ( int i = 0; i < (int)lines->size(); i++ )
|
1178 |
for ( int i = 0; i < (int)lines->size(); i++ )
|
| 1179 |
{
|
1179 |
{
|
| 1180 |
CyString line(lines->at(i));
|
1180 |
Utils::String line(lines->at(i));
|
| 1181 |
CyString start = line.GetToken(":", 1, 1).ToLower();
|
1181 |
Utils::String start = line.token(":", 1).toLower();
|
| 1182 |
CyString rest = line.GetToken(":", 2).RemoveFirstSpace();
|
1182 |
Utils::String rest = line.tokens(":", 2).removeFirstSpace();
|
| 1183 |
if ( start.Compare("CreatorSize") )
|
1183 |
if ( start.Compare("CreatorSize") )
|
| 1184 |
this->Size = System::Drawing::Size(rest.GetToken(" ", 1, 1).ToInt(), rest.GetToken(" ", 2, 2).ToInt());
|
1184 |
this->Size = System::Drawing::Size(rest.token(" ", 1).toInt(), rest.token(" ", 2).toInt());
|
| 1185 |
else if ( start.Compare("CreatorPos") )
|
1185 |
else if ( start.Compare("CreatorPos") )
|
| 1186 |
{
|
1186 |
{
|
| 1187 |
m_iLocX = rest.GetToken(" ", 1, 1).ToInt();
|
1187 |
m_iLocX = rest.token(" ", 1).toInt();
|
| 1188 |
m_iLocY = rest.GetToken(" ", 2, 2).ToInt();
|
1188 |
m_iLocY = rest.token(" ", 2).toInt();
|
| 1189 |
}
|
1189 |
}
|
| 1190 |
else if ( start.Compare("Loaded") )
|
1190 |
else if ( start.Compare("Loaded") )
|
| 1191 |
m_pLoadedList->PushBack(rest);
|
1191 |
m_pLoadedList->PushBack(CyString(rest));
|
| 1192 |
else if ( start.Compare("CreatorMax") )
|
1192 |
else if ( start.Compare("CreatorMax") )
|
| 1193 |
this->WindowState = FormWindowState::Maximized;
|
1193 |
this->WindowState = FormWindowState::Maximized;
|
| 1194 |
else if ( start.Compare("GenerateUpdate") )
|
1194 |
else if ( start.Compare("GenerateUpdate") )
|
| 1195 |
m_settings->bGenerateUpdate = true;
|
1195 |
m_settings->bGenerateUpdate = true;
|
| 1196 |
else if ( start.Compare("GameDir") )
|
1196 |
else if ( start.Compare("GameDir") )
|
| 1197 |
_pGameDir->parse(rest.ToString(), m_pPackages);
|
1197 |
_pGameDir->parse(rest, m_pPackages);
|
| 1198 |
}
|
1198 |
}
|
| 1199 |
|
1199 |
|
| 1200 |
delete lines;
|
1200 |
delete lines;
|
| 1201 |
}
|
1201 |
}
|
| 1202 |
}
|
1202 |
}
|