Line 286... |
Line 286... |
286 |
}
|
286 |
}
|
287 |
|
287 |
|
288 |
void SpkForm::AddFile(C_File *file)
|
288 |
void SpkForm::AddFile(C_File *file)
|
289 |
{
|
289 |
{
|
290 |
ListViewItem ^item = gcnew ListViewItem(_US(file->getNameDirectory(NULL)));
|
290 |
ListViewItem ^item = gcnew ListViewItem(_US(file->getNameDirectory(NULL)));
|
291 |
item->SubItems->Add(SystemStringFromCyString(file->GetUncompressedSizeString()));
|
291 |
item->SubItems->Add(_US(file->uncompressedSizeString()));
|
292 |
item->SubItems->Add(SystemStringFromCyString(file->GetFileTypeString()));
|
292 |
item->SubItems->Add(_US(file->fileTypeString()));
|
293 |
|
- |
|
294 |
item->SubItems->Add(SystemStringFromCyString(file->GetCreationTimeString()));
|
293 |
item->SubItems->Add(_US(file->creationTimeString()));
|
295 |
|
294 |
|
296 |
item->Tag = _US(Utils::String::Number(file->GetPos()));
|
295 |
item->Tag = _US(Utils::String::Number(file->GetPos()));
|
297 |
|
296 |
|
298 |
item->ImageKey = _US(Utils::String::Number(file->GetFileType()));
|
297 |
item->ImageKey = _US(Utils::String::Number(file->GetFileType()));
|
299 |
|
298 |
|
Line 543... |
Line 542... |
543 |
ad->AddFile(_US(f->name()), _US(f->dir()), f->GetFileType(), f->GetGame());
|
542 |
ad->AddFile(_US(f->name()), _US(f->dir()), f->GetFileType(), f->GetGame());
|
544 |
|
543 |
|
545 |
// remove the dat or cat file as well
|
544 |
// remove the dat or cat file as well
|
546 |
if ( f->GetFileType() == FILETYPE_MOD )
|
545 |
if ( f->GetFileType() == FILETYPE_MOD )
|
547 |
{
|
546 |
{
|
548 |
if ( f->CheckFileExt("cat") )
|
547 |
if ( f->checkFileExt("cat") )
|
549 |
{
|
548 |
{
|
550 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("dat"), FILETYPE_MOD, "", f->GetGame());
|
549 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("dat"), FILETYPE_MOD, "", f->GetGame());
|
551 |
if ( datFile )
|
550 |
if ( datFile )
|
552 |
ad->AddFile(_US(datFile->name()), _US(datFile->dir()), datFile->GetFileType(), datFile->GetGame());
|
551 |
ad->AddFile(_US(datFile->name()), _US(datFile->dir()), datFile->GetFileType(), datFile->GetGame());
|
553 |
}
|
552 |
}
|
554 |
else if ( f->CheckFileExt("dat") )
|
553 |
else if ( f->checkFileExt("dat") )
|
555 |
{
|
554 |
{
|
556 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("cat"), FILETYPE_MOD, "", f->GetGame());
|
555 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("cat"), FILETYPE_MOD, "", f->GetGame());
|
557 |
if ( datFile )
|
556 |
if ( datFile )
|
558 |
ad->AddFile(_US(datFile->name()), _US(datFile->dir()), datFile->GetFileType(), datFile->GetGame());
|
557 |
ad->AddFile(_US(datFile->name()), _US(datFile->dir()), datFile->GetFileType(), datFile->GetGame());
|
559 |
}
|
558 |
}
|
Line 577... |
Line 576... |
577 |
ad->AddFile(_US(f->name()), _US(f->dir()), f->GetFileType(), f->GetGame());
|
576 |
ad->AddFile(_US(f->name()), _US(f->dir()), f->GetFileType(), f->GetGame());
|
578 |
|
577 |
|
579 |
// remove the dat or cat file as well
|
578 |
// remove the dat or cat file as well
|
580 |
if ( f->GetFileType() == FILETYPE_MOD )
|
579 |
if ( f->GetFileType() == FILETYPE_MOD )
|
581 |
{
|
580 |
{
|
582 |
if ( f->CheckFileExt("cat") )
|
581 |
if ( f->checkFileExt("cat") )
|
583 |
{
|
582 |
{
|
584 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("dat"), FILETYPE_MOD, "", f->GetGame());
|
583 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("dat"), FILETYPE_MOD, "", f->GetGame());
|
585 |
if ( datFile )
|
584 |
if ( datFile )
|
586 |
ad->AddFile(_US(datFile->name()), _US(datFile->dir()), datFile->GetFileType(), datFile->GetGame());
|
585 |
ad->AddFile(_US(datFile->name()), _US(datFile->dir()), datFile->GetFileType(), datFile->GetGame());
|
587 |
}
|
586 |
}
|
588 |
else if ( f->CheckFileExt("dat") )
|
587 |
else if ( f->checkFileExt("dat") )
|
589 |
{
|
588 |
{
|
590 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("cat"), FILETYPE_MOD, "", f->GetGame());
|
589 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("cat"), FILETYPE_MOD, "", f->GetGame());
|
591 |
if ( datFile )
|
590 |
if ( datFile )
|
592 |
ad->AddFile(_US(datFile->name()), _US(datFile->dir()), datFile->GetFileType(), datFile->GetGame());
|
591 |
ad->AddFile(_US(datFile->name()), _US(datFile->dir()), datFile->GetFileType(), datFile->GetGame());
|
593 |
}
|
592 |
}
|
Line 1002... |
Line 1001... |
1002 |
break;
|
1001 |
break;
|
1003 |
|
1002 |
|
1004 |
case FILETYPE_MOD:
|
1003 |
case FILETYPE_MOD:
|
1005 |
if ( m_pPackage->extractFile(f, _S(IO::Path::GetTempPath()), false) )
|
1004 |
if ( m_pPackage->extractFile(f, _S(IO::Path::GetTempPath()), false) )
|
1006 |
{
|
1005 |
{
|
1007 |
if ( f->CheckFileExt("cat") )
|
1006 |
if ( f->checkFileExt("cat") )
|
1008 |
{
|
1007 |
{
|
1009 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("dat"), FILETYPE_MOD, "");
|
1008 |
C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("dat"), FILETYPE_MOD, "");
|
1010 |
if ( datFile )
|
1009 |
if ( datFile )
|
1011 |
{
|
1010 |
{
|
1012 |
if ( m_pPackage->extractFile(datFile, _S(IO::Path::GetTempPath()), false) )
|
1011 |
if ( m_pPackage->extractFile(datFile, _S(IO::Path::GetTempPath()), false) )
|
1013 |
process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(f->name());
|
1012 |
process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(f->name());
|
1014 |
}
|
1013 |
}
|
1015 |
}
|
1014 |
}
|
1016 |
else if ( f->CheckFileExt("dat") )
|
1015 |
else if ( f->checkFileExt("dat") )
|
1017 |
{
|
1016 |
{
|
1018 |
C_File *catFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("cat"), FILETYPE_MOD, "");
|
1017 |
C_File *catFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("cat"), FILETYPE_MOD, "");
|
1019 |
if ( catFile )
|
1018 |
if ( catFile )
|
1020 |
{
|
1019 |
{
|
1021 |
if ( m_pPackage->extractFile(catFile, _S(IO::Path::GetTempPath()), false) )
|
1020 |
if ( m_pPackage->extractFile(catFile, _S(IO::Path::GetTempPath()), false) )
|