Line 5424... |
Line 5424... |
5424 |
{
|
5424 |
{
|
5425 |
if ( !f->PCKFile() )
|
5425 |
if ( !f->PCKFile() )
|
5426 |
MessageBox::Show(this, "There was a problem trying to pack the file\n" + _US(f->filename()), "Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
|
5426 |
MessageBox::Show(this, "There was a problem trying to pack the file\n" + _US(f->filename()), "Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
|
5427 |
else
|
5427 |
else
|
5428 |
{
|
5428 |
{
|
5429 |
if (f->checkFileExt("bob"))
|
5429 |
if (f->checkFileExt(L"bob"))
|
5430 |
f->changeFileExt("pbb");
|
5430 |
f->changeFileExt(L"pbb");
|
5431 |
else if (f->checkFileExt("bod"))
|
5431 |
else if (f->checkFileExt(L"bod"))
|
5432 |
f->changeFileExt("pbd");
|
5432 |
f->changeFileExt(L"pbd");
|
5433 |
else
|
5433 |
else
|
5434 |
f->changeFileExt("pck");
|
5434 |
f->changeFileExt(L"pck");
|
5435 |
m_pSelectedItem->SubItems[1]->Text = _US("<PACKAGE>/" + f->getNameDirectory(NULL));
|
5435 |
m_pSelectedItem->SubItems[1]->Text = _US(L"<PACKAGE>/" + f->getNameDirectory(NULL));
|
5436 |
m_pSelectedItem->SubItems[2]->Text = _US(f->uncompressedSizeString());
|
5436 |
m_pSelectedItem->SubItems[2]->Text = _US(f->uncompressedSizeString());
|
5437 |
|
5437 |
|
5438 |
m_pPackage->adjustChanged(true);
|
5438 |
m_pPackage->adjustChanged(true);
|
5439 |
this->UpdateChanged();
|
5439 |
this->UpdateChanged();
|
5440 |
}
|
5440 |
}
|
Line 5450... |
Line 5450... |
5450 |
{
|
5450 |
{
|
5451 |
if ( !f->UnPCKFile() )
|
5451 |
if ( !f->UnPCKFile() )
|
5452 |
MessageBox::Show(this, "There was a problem trying to unpack the file\n" + _US(f->filename()), "Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
|
5452 |
MessageBox::Show(this, "There was a problem trying to unpack the file\n" + _US(f->filename()), "Error", MessageBoxButtons::OK, MessageBoxIcon::Error);
|
5453 |
else
|
5453 |
else
|
5454 |
{
|
5454 |
{
|
5455 |
if (f->checkFileExt("pbb"))
|
5455 |
if (f->checkFileExt(L"pbb"))
|
5456 |
f->changeFileExt("bob");
|
5456 |
f->changeFileExt(L"bob");
|
5457 |
else if (f->checkFileExt("pbd"))
|
5457 |
else if (f->checkFileExt(L"pbd"))
|
5458 |
f->changeFileExt("bod");
|
5458 |
f->changeFileExt(L"bod");
|
5459 |
else
|
5459 |
else
|
5460 |
f->changeFileExt("xml");
|
5460 |
f->changeFileExt(L"xml");
|
5461 |
m_pSelectedItem->SubItems[1]->Text = _US("<PACKAGE>/" + f->getNameDirectory(NULL));
|
5461 |
m_pSelectedItem->SubItems[1]->Text = _US(L"<PACKAGE>/" + f->getNameDirectory(NULL));
|
5462 |
m_pSelectedItem->SubItems[2]->Text = _US(f->uncompressedSizeString());
|
5462 |
m_pSelectedItem->SubItems[2]->Text = _US(f->uncompressedSizeString());
|
5463 |
|
5463 |
|
5464 |
m_pPackage->adjustChanged(true);
|
5464 |
m_pPackage->adjustChanged(true);
|
5465 |
this->UpdateChanged();
|
5465 |
this->UpdateChanged();
|
5466 |
}
|
5466 |
}
|
Line 5521... |
Line 5521... |
5521 |
MessageBox::Show(this, "You dont have a primary web address set, you need an address for automatic updates to work", "No Web Address", MessageBoxButtons::OK, MessageBoxIcon::Asterisk);
|
5521 |
MessageBox::Show(this, "You dont have a primary web address set, you need an address for automatic updates to work", "No Web Address", MessageBoxButtons::OK, MessageBoxIcon::Asterisk);
|
5522 |
else
|
5522 |
else
|
5523 |
{
|
5523 |
{
|
5524 |
FolderBrowserDialog ^fbd = gcnew FolderBrowserDialog;
|
5524 |
FolderBrowserDialog ^fbd = gcnew FolderBrowserDialog;
|
5525 |
fbd->Description = "Select the path to save the update file to";
|
5525 |
fbd->Description = "Select the path to save the update file to";
|
5526 |
fbd->SelectedPath = _US(CFileIO(m_pPackage->filename()).dir().findReplace("/", "\\"));
|
5526 |
fbd->SelectedPath = _US(CFileIO(m_pPackage->filename()).dir().findReplace(L"/", L"\\"));
|
5527 |
if ( fbd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
5527 |
if ( fbd->ShowDialog(this) == System::Windows::Forms::DialogResult::OK )
|
5528 |
{
|
5528 |
{
|
5529 |
Utils::WString file = m_pPackage->createUpdateFile(_WS(fbd->SelectedPath));
|
5529 |
Utils::WString file = m_pPackage->createUpdateFile(_WS(fbd->SelectedPath));
|
5530 |
if ( !file.empty() )
|
5530 |
if ( !file.empty() )
|
5531 |
MessageBox::Show(this, "Update file has been created\n" + _US(file) + "\n\nRemember to upload it your web server so its accessable\n" + _US(m_pPackage->webAddress()), "Update File Created", MessageBoxButtons::OK, MessageBoxIcon::Information);
|
5531 |
MessageBox::Show(this, "Update file has been created\n" + _US(file) + "\n\nRemember to upload it your web server so its accessable\n" + _US(m_pPackage->webAddress()), "Update File Created", MessageBoxButtons::OK, MessageBoxIcon::Information);
|