mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-13 13:27:15 +00:00
Various fixes for ISOProperties's filesystem viewer, bugfix for empty folders not being empty thanks to j4ck.fr0st (issue 702), also added icons and fixed dumping all files from a wii game.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4266 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
c7431401be
commit
e76d2a1a4c
@ -51,7 +51,7 @@ u64 CFileSystemGCWii::GetFileSize(const char* _rFullPath) const
|
||||
|
||||
const SFileInfo* pFileInfo = FindFileInfo(_rFullPath);
|
||||
|
||||
if (pFileInfo != NULL)
|
||||
if (pFileInfo != NULL && !pFileInfo->IsDirectory())
|
||||
return pFileInfo->m_FileSize;
|
||||
|
||||
return 0;
|
||||
@ -68,7 +68,7 @@ const char* CFileSystemGCWii::GetFileName(u64 _Address) const
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u64 CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const
|
||||
@ -115,82 +115,73 @@ bool CFileSystemGCWii::ExportFile(const char* _rFullPath, const char* _rExportFi
|
||||
delete[] buffer;
|
||||
return false;
|
||||
}
|
||||
bool CFileSystemGCWii::ExportDir(const char* _rFullPath, const char* _rExportFolder) const
|
||||
|
||||
void CFileSystemGCWii::ExportApploader(const char* _rExportFolder) const
|
||||
{
|
||||
std::vector<const SFileInfo *> fst;
|
||||
GetFileList(fst);
|
||||
char exportName[512];
|
||||
//look for the dir we are going to extract
|
||||
u32 index[2];
|
||||
if (!_rFullPath)
|
||||
{
|
||||
//extract all
|
||||
index[0] = 0;
|
||||
index[1] = fst.size();
|
||||
}
|
||||
else
|
||||
{
|
||||
for(index[0] = 0; index[0] < fst.size();index[0]++)
|
||||
{
|
||||
// Note By DacoTaco : i wonder why it doesn't work with just the _rFullPath
|
||||
if (fst.at(index[0])->m_FullPath == FindFileInfo(_rFullPath)->m_FullPath )
|
||||
{
|
||||
DEBUG_LOG(DISCIO,"Found the Dir at %u",index[0]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//now to get the index of last file
|
||||
index[1] = index[0];
|
||||
while(index[1] < fst.at(index[0])->m_FileSize)
|
||||
{
|
||||
index[1]++;
|
||||
}
|
||||
DEBUG_LOG(DISCIO,"Dir found from %u to %u\nextracting to:\n%s",index[0],index[1],_rExportFolder);
|
||||
}
|
||||
//extraction
|
||||
for (int i = index[0]; i < index[1];i++)
|
||||
{
|
||||
if (fst[i]->IsDirectory())
|
||||
{
|
||||
sprintf(exportName, "%s/%s/", _rExportFolder, fst[i]->m_FullPath);
|
||||
DEBUG_LOG(DISCIO, "%s", exportName);
|
||||
|
||||
if (!File::Exists(exportName))
|
||||
{
|
||||
// Extract Apploader
|
||||
// ------------------
|
||||
// Apploader code size
|
||||
u32 AppSize = Read32(0x2440 + 0x14) << m_OffsetShift;
|
||||
AppSize += Read32(0x2440 + 0x18) << m_OffsetShift; // + apptrailer size
|
||||
AppSize += 0x20; // + the header = Apploader size! :')
|
||||
DEBUG_LOG(DISCIO,"AppSize -> %x",AppSize);
|
||||
|
||||
if (!File::CreateFullPath(exportName))
|
||||
{
|
||||
ERROR_LOG(DISCIO, "Could not create the path %s", exportName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!File::IsDirectory(exportName))
|
||||
{
|
||||
ERROR_LOG(DISCIO, "%s already exists and is not a directory", exportName);
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG(DISCIO, "folder %s already exists", exportName);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(exportName, "%s/%s", _rExportFolder, fst[i]->m_FullPath);
|
||||
DEBUG_LOG(DISCIO, "%s", exportName);
|
||||
if (!File::Exists(exportName))
|
||||
{
|
||||
if (!ExportFile(fst[i]->m_FullPath, exportName))
|
||||
ERROR_LOG(DISCIO, "Could not export %s", exportName);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(DISCIO, "%s already exists", exportName);
|
||||
}
|
||||
}
|
||||
char* buffer = new char[AppSize];
|
||||
m_rVolume->Read(0x2440, AppSize, (u8*)buffer);
|
||||
sprintf(exportName, "%s/apploader.ldr", _rExportFolder);
|
||||
FILE* AppFile = fopen(exportName,"w");
|
||||
if (!AppFile)
|
||||
{
|
||||
PanicAlert("Failed to create %s! canceling further extraction",exportName);
|
||||
return;
|
||||
}
|
||||
return false;
|
||||
fwrite(buffer, 1, AppSize, AppFile);
|
||||
fclose(AppFile);
|
||||
//delete[] buffer; buffer = 0;
|
||||
|
||||
/* TODO : This part crashes with Wii games :/
|
||||
// Extract dol(bootfile)
|
||||
// ---------------------
|
||||
u32 DolOffset = Read32(0x420) << m_OffsetShift;
|
||||
u32 DolSize = 0, offset = 0, size = 0, max = 0;
|
||||
// note DacoTaco : thank you shuffle and discscrubber :P . find it kinda of pointless to include
|
||||
// the discscrubber just for the GetDolSize function so its copy pasta time ...
|
||||
// TODO: fix boot.dol size. or gc-tool is again silly with size or we are wrong (more likely :/)
|
||||
|
||||
// Iterate through the 7 code segments
|
||||
for (u8 i = 0; i < 7; i++)
|
||||
{
|
||||
m_rVolume->Read(DolOffset + 0x00 + i * 4, 4, (u8*)&offset);
|
||||
m_rVolume->Read(DolOffset + 0x90 + i * 4, 4, (u8*)&size);
|
||||
if (offset + size > DolSize)
|
||||
DolSize = offset + size;
|
||||
}
|
||||
|
||||
// Iterate through the 11 data segments
|
||||
for (u8 i = 0; i < 11; i++)
|
||||
{
|
||||
m_rVolume->Read(DolOffset + 0x1c + i * 4, 4, (u8*)&offset);
|
||||
m_rVolume->Read(DolOffset + 0xac + i * 4, 4, (u8*)&size);
|
||||
if (offset + size > DolSize)
|
||||
DolSize = offset + size;
|
||||
}
|
||||
// Add header to size
|
||||
DolSize += 0x40;
|
||||
buffer = new char[DolSize];
|
||||
m_rVolume->Read(DolOffset, DolSize, (u8*)&buffer);
|
||||
sprintf(exportName, "%s/boot.dol", _rExportFolder);
|
||||
FILE* DolFile = fopen(exportName, "w");
|
||||
if (!DolFile)
|
||||
{
|
||||
PanicAlert("Failed to create %s! canceling further extraction",exportName);
|
||||
return;
|
||||
}
|
||||
fwrite(buffer, 1, DolSize, DolFile);
|
||||
fclose(DolFile);
|
||||
delete[] buffer;
|
||||
*/
|
||||
}
|
||||
|
||||
u32 CFileSystemGCWii::Read32(u64 _Offset) const
|
||||
|
@ -32,10 +32,11 @@ public:
|
||||
virtual ~CFileSystemGCWii();
|
||||
virtual bool IsInitialized() const;
|
||||
virtual u64 GetFileSize(const char* _rFullPath) const;
|
||||
virtual size_t GetFileList(std::vector<const SFileInfo *> &_rFilenames) const;
|
||||
virtual const char* GetFileName(u64 _Address) const;
|
||||
virtual u64 ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const;
|
||||
virtual bool ExportFile(const char* _rFullPath, const char* _rExportFilename) const;
|
||||
virtual bool ExportDir(const char* _rFullPath, const char* _rExportFilename) const;
|
||||
virtual void ExportApploader(const char* _rExportFolder) const;
|
||||
|
||||
private:
|
||||
|
||||
@ -43,7 +44,6 @@ private:
|
||||
u32 m_OffsetShift; // WII offsets are all shifted
|
||||
std::vector <SFileInfo> m_FileInfoVector;
|
||||
u32 Read32(u64 _Offset) const;
|
||||
virtual size_t GetFileList(std::vector<const SFileInfo *> &_rFilenames) const;
|
||||
void GetStringFromOffset(u64 _Offset, char* Filename) const;
|
||||
const SFileInfo* FindFileInfo(const char* _rFullPath) const;
|
||||
bool InitFileSystem();
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
virtual u64 GetFileSize(const char* _rFullPath) const = 0;
|
||||
virtual u64 ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBufferSize) const = 0;
|
||||
virtual bool ExportFile(const char* _rFullPath, const char* _rExportFilename) const = 0;
|
||||
virtual bool ExportDir(const char* _rFullPath, const char* _rExportFilename) const = 0;
|
||||
virtual void ExportApploader(const char* _rExportFolder) const = 0;
|
||||
virtual const char* GetFileName(u64 _Address) const = 0;
|
||||
|
||||
virtual const IVolume *GetVolume() const { return m_rVolume; }
|
||||
|
@ -25,6 +25,12 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
#if USE_XPM_BITMAPS
|
||||
#include "../resources/isoprop_file.xpm"
|
||||
#include "../resources/isoprop_folder.xpm"
|
||||
#include "../resources/isoprop_disc.xpm"
|
||||
#endif // USE_XPM_BITMAPS
|
||||
|
||||
struct WiiPartition
|
||||
{
|
||||
DiscIO::IVolume *Partition;
|
||||
@ -58,7 +64,7 @@ BEGIN_EVENT_TABLE(CISOProperties, wxDialog)
|
||||
EVT_TREE_ITEM_RIGHT_CLICK(ID_TREECTRL, CISOProperties::OnRightClickOnTree)
|
||||
EVT_MENU(IDM_EXTRACTFILE, CISOProperties::OnExtractFile)
|
||||
EVT_MENU(IDM_EXTRACTDIR, CISOProperties::OnExtractDir)
|
||||
EVT_MENU(IDM_EXTRACTALL, CISOProperties::OnExtractAll)
|
||||
EVT_MENU(IDM_EXTRACTALL, CISOProperties::OnExtractDir)
|
||||
EVT_CHOICE(ID_LANG, CISOProperties::OnChangeBannerLang)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
@ -168,10 +174,10 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||
{
|
||||
for (u32 i = 0; i < WiiDisc.size(); i++)
|
||||
{
|
||||
fileIter beginning = WiiDisc.at(i).Files.begin(), end = WiiDisc.at(i).Files.end(), pos = WiiDisc.at(i).Files.begin();
|
||||
wxTreeItemId PartitionRoot = m_Treectrl->AppendItem(RootId, wxString::Format(wxT("Partition %i"), i), -1, -1, 0);
|
||||
CreateDirectoryTree(PartitionRoot, beginning, end, pos, (char *)"/");
|
||||
if (i == 0)
|
||||
WiiPartition partition = WiiDisc.at(i);
|
||||
wxTreeItemId PartitionRoot = m_Treectrl->AppendItem(RootId, wxString::Format(wxT("Partition %i"), i), 0, 0, 0);
|
||||
CreateDirectoryTree(PartitionRoot, partition.Files, 1, partition.Files.at(0)->m_FileSize);
|
||||
if (i == 1)
|
||||
m_Treectrl->Expand(PartitionRoot);
|
||||
}
|
||||
}
|
||||
@ -180,8 +186,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||
// TODO : Should we add a way to browse the wad file ?
|
||||
if (!DiscIO::IsVolumeWadFile(OpenISO))
|
||||
{
|
||||
fileIter beginning = GCFiles.begin(), end = GCFiles.end(), pos = GCFiles.begin();
|
||||
CreateDirectoryTree(RootId, beginning, end, pos, (char *)"/");
|
||||
CreateDirectoryTree(RootId, GCFiles, 1, GCFiles.at(0)->m_FileSize);
|
||||
}
|
||||
}
|
||||
m_Treectrl->Expand(RootId);
|
||||
@ -216,54 +221,40 @@ CISOProperties::~CISOProperties()
|
||||
delete OpenISO;
|
||||
}
|
||||
|
||||
void CISOProperties::CreateDirectoryTree(wxTreeItemId& parent,
|
||||
fileIter& begin,
|
||||
fileIter& end,
|
||||
fileIter& iterPos,
|
||||
char *directory)
|
||||
size_t CISOProperties::CreateDirectoryTree(wxTreeItemId& parent,
|
||||
std::vector<const DiscIO::SFileInfo*> fileInfos,
|
||||
const size_t _FirstIndex,
|
||||
const size_t _LastIndex)
|
||||
{
|
||||
bool bRoot = true;
|
||||
size_t CurrentIndex = _FirstIndex;
|
||||
|
||||
if(iterPos == begin)
|
||||
++iterPos;
|
||||
else
|
||||
bRoot = false;
|
||||
|
||||
char *name = (char *)((*iterPos)->m_FullPath);
|
||||
|
||||
if(iterPos == end)
|
||||
return;
|
||||
|
||||
do
|
||||
while (CurrentIndex < _LastIndex)
|
||||
{
|
||||
if((*iterPos)->IsDirectory()) {
|
||||
char *dirName;
|
||||
name[strlen(name) - 1] = '\0';
|
||||
dirName = strrchr(name, DIR_SEP_CHR);
|
||||
if(!dirName)
|
||||
dirName = name;
|
||||
else
|
||||
dirName++;
|
||||
const DiscIO::SFileInfo *rFileInfo = fileInfos[CurrentIndex];
|
||||
char *name = (char*)rFileInfo->m_FullPath;
|
||||
|
||||
wxTreeItemId item = m_Treectrl->AppendItem(parent, wxString::FromAscii(dirName));
|
||||
CreateDirectoryTree(item, begin, end, ++iterPos, name);
|
||||
} else {
|
||||
char *fileName = strrchr(name, DIR_SEP_CHR);
|
||||
if(!fileName)
|
||||
fileName = name;
|
||||
else
|
||||
fileName++;
|
||||
if (rFileInfo->IsDirectory()) name[strlen(name) - 1] = '\0';
|
||||
char *itemName = strrchr(name, DIR_SEP_CHR);
|
||||
|
||||
m_Treectrl->AppendItem(parent, wxString::FromAscii(fileName));
|
||||
++iterPos;
|
||||
if(!itemName)
|
||||
itemName = name;
|
||||
else
|
||||
itemName++;
|
||||
|
||||
// check next index
|
||||
if (rFileInfo->IsDirectory())
|
||||
{
|
||||
wxTreeItemId item = m_Treectrl->AppendItem(parent, wxString::FromAscii(itemName), 1, 1);
|
||||
CurrentIndex = CreateDirectoryTree(item, fileInfos, CurrentIndex + 1, (size_t)rFileInfo->m_FileSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Treectrl->AppendItem(parent, wxString::FromAscii(itemName), 2, 2);
|
||||
CurrentIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
if(iterPos == end)
|
||||
break;
|
||||
|
||||
name = (char *)((*iterPos)->m_FullPath);
|
||||
|
||||
} while(bRoot || strstr(name, directory));
|
||||
return CurrentIndex;
|
||||
}
|
||||
|
||||
void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
@ -498,10 +489,18 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
m_Information->SetSizer(sInfoPage);
|
||||
sInfoPage->Layout();
|
||||
|
||||
|
||||
// Filesystem icons
|
||||
wxIcon iconTemp;
|
||||
m_iconList = new wxImageList(16, 16);
|
||||
|
||||
iconTemp.CopyFromBitmap(wxBitmap(disc_xpm)); m_iconList->Add(iconTemp); // 0
|
||||
iconTemp.CopyFromBitmap(wxBitmap(folder_xpm)); m_iconList->Add(iconTemp); // 1
|
||||
iconTemp.CopyFromBitmap(wxBitmap(file_xpm)); m_iconList->Add(iconTemp); // 2
|
||||
|
||||
// Filesystem tree
|
||||
m_Treectrl = new wxTreeCtrl(m_Filesystem, ID_TREECTRL, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE, wxDefaultValidator);
|
||||
RootId = m_Treectrl->AddRoot(wxT("Disc"), -1, -1, 0);
|
||||
m_Treectrl->AssignImageList(m_iconList);
|
||||
RootId = m_Treectrl->AddRoot(wxT("Disc"), 0, 0, 0);
|
||||
|
||||
wxBoxSizer* sTreePage;
|
||||
sTreePage = new wxBoxSizer(wxVERTICAL);
|
||||
@ -562,13 +561,17 @@ void CISOProperties::OnRightClickOnTree(wxTreeEvent& event)
|
||||
m_Treectrl->SelectItem(event.GetItem());
|
||||
|
||||
wxMenu popupMenu;
|
||||
if (m_Treectrl->ItemHasChildren(m_Treectrl->GetSelection()))
|
||||
popupMenu.Append(IDM_EXTRACTDIR, _("Extract Directory...!experimental!"));
|
||||
else
|
||||
|
||||
if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0
|
||||
&& m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
|
||||
popupMenu.Append(IDM_EXTRACTDIR, _("Extract Partition..."));
|
||||
else if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 1)
|
||||
popupMenu.Append(IDM_EXTRACTDIR, _("Extract Directory..."));
|
||||
else if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 2)
|
||||
popupMenu.Append(IDM_EXTRACTFILE, _("Extract File..."));
|
||||
|
||||
if (!DiscIO::IsVolumeWiiDisc(OpenISO)) //disabled on wii until it dumps more than partition 0
|
||||
popupMenu.Append(IDM_EXTRACTALL, _("Extract All Files (!!Experimental!!)"));
|
||||
popupMenu.Append(IDM_EXTRACTALL, _("Extract All Files..."));
|
||||
|
||||
PopupMenu(&popupMenu);
|
||||
|
||||
event.Skip();
|
||||
@ -615,19 +618,114 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event))
|
||||
pFileSystem->ExportFile(File.mb_str(), Path.mb_str());
|
||||
}
|
||||
|
||||
void CISOProperties::OnExtractDir(wxCommandEvent& WXUNUSED (event))
|
||||
void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolder, const int partitionNum)
|
||||
{
|
||||
if(!AskYesNo("%s", "Warning! this process does not yet have a progress bar.\nDolphin might appear unresponsive(depends on how big the folder is) until the extraction is complete\nContinue?"))
|
||||
return;
|
||||
wxString Path;
|
||||
wxString Directory;
|
||||
char exportName[512];
|
||||
u32 index[2], offsetShift = 0;
|
||||
std::vector<const DiscIO::SFileInfo *> fst;
|
||||
DiscIO::IFileSystem *FS = 0;
|
||||
|
||||
Directory = m_Treectrl->GetItemText(m_Treectrl->GetSelection());
|
||||
Path = wxDirSelector(wxT("Choose the folder where to extract to"));
|
||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||
{
|
||||
FS = WiiDisc.at(partitionNum).FileSystem;
|
||||
offsetShift = 2;
|
||||
}
|
||||
else
|
||||
FS = pFileSystem;
|
||||
|
||||
FS->GetFileList(fst);
|
||||
|
||||
if (!_rFullPath) // Extract all
|
||||
{
|
||||
index[0] = 0;
|
||||
index[1] = fst.size();
|
||||
|
||||
FS->ExportApploader(_rExportFolder);
|
||||
}
|
||||
else // Look for the dir we are going to extract
|
||||
{
|
||||
for(index[0] = 0; index[0] < fst.size(); index[0]++)
|
||||
{
|
||||
if (!strcmp(fst.at(index[0])->m_FullPath, _rFullPath))
|
||||
{
|
||||
DEBUG_LOG(DISCIO, "Found the Dir at %u", index[0]);
|
||||
index[1] = (u32)fst.at(index[0])->m_FileSize;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG(DISCIO,"Dir found from %u to %u\nextracting to:\n%s",index[0],index[1],_rExportFolder);
|
||||
}
|
||||
|
||||
wxProgressDialog dialog(index[0] ? _T("Extracting Directory") : _T("Extracting All Files"),
|
||||
_T("Extracting..."),
|
||||
index[1], // range
|
||||
this, // parent
|
||||
wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_ELAPSED_TIME |
|
||||
wxPD_ESTIMATED_TIME | wxPD_REMAINING_TIME |
|
||||
wxPD_SMOOTH // - makes indeterminate mode bar on WinXP very small
|
||||
);
|
||||
dialog.CenterOnParent();
|
||||
|
||||
// Extraction
|
||||
for (u32 i = index[0]; i < index[1]; i++)
|
||||
{
|
||||
if (!dialog.Update(i, wxString::Format(_T("Extracting %s"), wxString::FromAscii(fst[i]->m_FullPath))))
|
||||
break;
|
||||
|
||||
if (fst[i]->IsDirectory())
|
||||
{
|
||||
sprintf(exportName, "%s/%s/", _rExportFolder, fst[i]->m_FullPath);
|
||||
DEBUG_LOG(DISCIO, "%s", exportName);
|
||||
|
||||
if (!File::Exists(exportName) && !File::CreateFullPath(exportName))
|
||||
{
|
||||
ERROR_LOG(DISCIO, "Could not create the path %s", exportName);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!File::IsDirectory(exportName))
|
||||
ERROR_LOG(DISCIO, "%s already exists and is not a directory", exportName);
|
||||
|
||||
DEBUG_LOG(DISCIO, "folder %s already exists", exportName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(exportName, "%s/%s", _rExportFolder, fst[i]->m_FullPath);
|
||||
DEBUG_LOG(DISCIO, "%s", exportName);
|
||||
|
||||
if (!File::Exists(exportName) && !FS->ExportFile(fst[i]->m_FullPath, exportName))
|
||||
{
|
||||
ERROR_LOG(DISCIO, "Could not export %s", exportName);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(DISCIO, "%s already exists", exportName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CISOProperties::OnExtractDir(wxCommandEvent& event)
|
||||
{
|
||||
wxString Directory = m_Treectrl->GetItemText(m_Treectrl->GetSelection());
|
||||
wxString Path = wxDirSelector(wxT("Choose the folder where to extract to"));
|
||||
|
||||
if (!Path || !Directory)
|
||||
return;
|
||||
|
||||
if (event.GetId() == IDM_EXTRACTALL)
|
||||
{
|
||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||
for (u32 i = 0; i < WiiDisc.size(); i++)
|
||||
ExportDir(NULL, Path.mb_str(), i);
|
||||
else
|
||||
ExportDir(NULL, Path.mb_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
while (m_Treectrl->GetItemParent(m_Treectrl->GetSelection()) != m_Treectrl->GetRootItem())
|
||||
{
|
||||
wxString temp;
|
||||
@ -641,26 +739,10 @@ void CISOProperties::OnExtractDir(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
int partitionNum = wxAtoi(Directory.SubString(10, 11));
|
||||
Directory.Remove(0, 12); // Remove "Partition x/"
|
||||
WiiDisc.at(partitionNum).FileSystem->ExportDir(Directory.mb_str(), Path.mb_str());
|
||||
ExportDir(Directory.mb_str(), Path.mb_str(), partitionNum);
|
||||
}
|
||||
else
|
||||
pFileSystem->ExportDir(Directory.mb_str(), Path.mb_str());
|
||||
}
|
||||
|
||||
void CISOProperties::OnExtractAll(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
if(!AskYesNo("%s", "Warning! this process does not yet have a progress bar.\nDolphin will appear unresponsive until the extraction is complete\nContinue?"))
|
||||
return;
|
||||
wxString dirHome;
|
||||
wxGetHomeDir(&dirHome);
|
||||
|
||||
wxDirDialog dialog(this, _("Browse for a directory to add"), dirHome, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
|
||||
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
std::string sPath(dialog.GetPath().mb_str());
|
||||
pFileSystem->ExportDir(NULL,sPath.c_str());
|
||||
}
|
||||
ExportDir(Directory.mb_str(), Path.mb_str());
|
||||
}
|
||||
|
||||
void CISOProperties::SetRefresh(wxCommandEvent& event)
|
||||
|
@ -141,6 +141,7 @@ class CISOProperties : public wxDialog
|
||||
|
||||
wxTreeCtrl *m_Treectrl;
|
||||
wxTreeItemId RootId;
|
||||
wxImageList *m_iconList;
|
||||
|
||||
enum
|
||||
{
|
||||
@ -212,8 +213,8 @@ class CISOProperties : public wxDialog
|
||||
ID_MAKER,
|
||||
ID_COMMENT,
|
||||
ID_BANNER,
|
||||
IDM_EXTRACTALL,
|
||||
IDM_EXTRACTDIR,
|
||||
IDM_EXTRACTALL,
|
||||
IDM_EXTRACTFILE,
|
||||
IDM_BNRSAVEAS
|
||||
};
|
||||
@ -230,7 +231,6 @@ class CISOProperties : public wxDialog
|
||||
void OnRightClickOnTree(wxTreeEvent& event);
|
||||
void OnExtractFile(wxCommandEvent& event);
|
||||
void OnExtractDir(wxCommandEvent& event);
|
||||
void OnExtractAll(wxCommandEvent& event);
|
||||
void SetRefresh(wxCommandEvent& event);
|
||||
void OnChangeBannerLang(wxCommandEvent& event);
|
||||
|
||||
@ -239,9 +239,12 @@ class CISOProperties : public wxDialog
|
||||
std::vector<const DiscIO::SFileInfo *> GCFiles;
|
||||
typedef std::vector<const DiscIO::SFileInfo *>::iterator fileIter;
|
||||
|
||||
void CreateDirectoryTree(wxTreeItemId& parent,fileIter& begin,
|
||||
fileIter& end,
|
||||
fileIter& iterPos, char *directory);
|
||||
size_t CreateDirectoryTree(wxTreeItemId& parent,
|
||||
std::vector<const DiscIO::SFileInfo*> fileInfos,
|
||||
const size_t _FirstIndex,
|
||||
const size_t _LastIndex);
|
||||
void ExportDir(const char* _rFullPath, const char* _rExportFilename,
|
||||
const int partitionNum = 0);
|
||||
|
||||
IniFile GameIni;
|
||||
std::string GameIniFile;
|
||||
|
142
Source/Core/DolphinWX/resources/isoprop_disc.xpm
Normal file
142
Source/Core/DolphinWX/resources/isoprop_disc.xpm
Normal file
@ -0,0 +1,142 @@
|
||||
/* XPM */
|
||||
static const char *disc_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 120 2",
|
||||
"o c #AEA0A0",
|
||||
": c #F7F7F7",
|
||||
"2. c #FCC0BE",
|
||||
"z c #878A92",
|
||||
"q c #BCEEC1",
|
||||
"1 c #BDFEC0",
|
||||
"D c #A5A5A5",
|
||||
"W c #B4B4B4",
|
||||
"B c #E1E1E0",
|
||||
"& c #FAC3C0",
|
||||
"M c #E1E1E1",
|
||||
"O. c #C8BBA7",
|
||||
"3. c #95A389",
|
||||
"*. c #F5B9BA",
|
||||
"w c #C6BEA6",
|
||||
"@ c #E9E9E9",
|
||||
">. c #F8F8F8",
|
||||
"=. c #D6DABA",
|
||||
"b c #979797",
|
||||
":. c #B5B5B5",
|
||||
"( c #D0CFE8",
|
||||
"+ c #E2E2E2",
|
||||
"&. c #E6D0D1",
|
||||
"I c #545454",
|
||||
"F c #818180",
|
||||
"s c #A4A3A3",
|
||||
"_ c #CCCCCC",
|
||||
"U c #A9A7A7",
|
||||
"j c #DBDBDA",
|
||||
"H c #EAEAEA",
|
||||
"7. c #E0DFDF",
|
||||
"= c #DBD8D8",
|
||||
"3 c #F4BABB",
|
||||
"* c #F2C3C5",
|
||||
"u c #C9C8EE",
|
||||
"l c #9090A7",
|
||||
"S c #A7A7A7",
|
||||
"p c #7B8A7F",
|
||||
"i c #A7B3CF",
|
||||
"O c #CACCCC",
|
||||
"N c #E3E3E3",
|
||||
"P c #555555",
|
||||
";. c #8BA696",
|
||||
"K c #828282",
|
||||
"~ c #AAABAA",
|
||||
"! c #AAABAB",
|
||||
"%. c #E1E3E4",
|
||||
"/ c #8E8DAC",
|
||||
"h c #CDCDCC",
|
||||
"5. c #DCDCDC",
|
||||
"| c #C2C1F6",
|
||||
"m c #FAFAFA",
|
||||
"<. c #DCD9D9",
|
||||
" . c #9B9CAF",
|
||||
"] c #968C88",
|
||||
"C c #7B7B7A",
|
||||
"T c #7B7B7D",
|
||||
"' c #999999",
|
||||
"v c #A8A8A8",
|
||||
"a c #8F8B86",
|
||||
"$. c #B7B7B7",
|
||||
"- c #DFE0E0",
|
||||
" c None",
|
||||
"E c #E4E4E4",
|
||||
"o. c #AC8D8E",
|
||||
"x c #ABACAB",
|
||||
"X. c #7E7C7C",
|
||||
"` c #A1A1A1",
|
||||
". c #BFBFBF",
|
||||
"% c #9BAD8F",
|
||||
"[ c #7D8F7D",
|
||||
".. c #818383",
|
||||
"< c #91A8A3",
|
||||
",. c #E0E1E1",
|
||||
"R c #E5E5E2",
|
||||
"V c #E5E5E3",
|
||||
"A c #484848",
|
||||
"k c #D6D6E3",
|
||||
"^ c #898B97",
|
||||
"+. c #BCF2BC",
|
||||
"6 c #EDEDED",
|
||||
"7 c #FCFCFC",
|
||||
"} c #BAB8F6",
|
||||
"2 c #D3DDB9",
|
||||
"Q c #AAAAAA",
|
||||
"4. c #B9B9B9",
|
||||
"Z c #A5A3A5",
|
||||
"6. c #E6E6E6",
|
||||
"d c #A3A3A3",
|
||||
"Y c #A3A3A4",
|
||||
"t c #B2B2B2",
|
||||
"#. c #C0C3FD",
|
||||
"# c #DFDFDF",
|
||||
"9. c #AA9B9B",
|
||||
"G c #EEEEEE",
|
||||
"$ c #A3A3B0",
|
||||
"9 c #C0C0FE",
|
||||
"r c #7E7E7E",
|
||||
"4 c #E6D1D1",
|
||||
"; c #E7E7E7",
|
||||
") c #D8D8DD",
|
||||
"1. c #F4C4C5",
|
||||
"{ c #A7BAC9",
|
||||
"f c #959595",
|
||||
"L c #A4A4A3",
|
||||
"8. c #C7C9C9",
|
||||
"c c #A4A4A4",
|
||||
"5 c #E0E3E3",
|
||||
"n c #B3B3B3",
|
||||
"y c #C2C2C2",
|
||||
"J c #EFEFEF",
|
||||
"> c #FEFEFE",
|
||||
"8 c #BCBAF4",
|
||||
"X c #A88C8C",
|
||||
"0 c #B9D0DF",
|
||||
"g c #9D9D9D",
|
||||
"-. c #BFFEBE",
|
||||
"e c #7A7879",
|
||||
"@. c #BADAD6",
|
||||
", c #BBBBBB",
|
||||
/* pixels */
|
||||
" . . . . ",
|
||||
" X o O + @ # . . ",
|
||||
" $ % & * = - ; : > > , . ",
|
||||
" < 1 2 3 4 5 6 7 > > > . ",
|
||||
" 8 9 0 q w X e r t @ > > > y ",
|
||||
" $ u 8 i p a s d f g @ > > y ",
|
||||
". h j k l z x c d v b n > m M . ",
|
||||
". N B V C Z v A A S D F G @ H . ",
|
||||
". H H J K L S P I U Y T R B E . ",
|
||||
". + m > W b D Q ! ~ ^ / ( ) _ . ",
|
||||
" . > > H ` ' d s ] [ { } | . ",
|
||||
" . > > > @ W ..X.o.O.+.@.#./ ",
|
||||
" $.> > > 7 G %.&.*.=.-.;. ",
|
||||
" . :.> > >.@ ,.<.1.2.3.@. ",
|
||||
" 4.4.5.6.7.8.9.X. ",
|
||||
" . . . . "
|
||||
};
|
66
Source/Core/DolphinWX/resources/isoprop_file.xpm
Normal file
66
Source/Core/DolphinWX/resources/isoprop_file.xpm
Normal file
@ -0,0 +1,66 @@
|
||||
/* XPM */
|
||||
static const char *file_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 44 1",
|
||||
"$ c #D9D9D9",
|
||||
"9 c #E8E8E8",
|
||||
"O c #FFFFFF",
|
||||
"o c #626262",
|
||||
"q c #ADADAD",
|
||||
"t c #BCBCBC",
|
||||
"* c #DADADA",
|
||||
"7 c #A6A6A6",
|
||||
"1 c #B5B5B5",
|
||||
"g c #E2E2E2",
|
||||
"& c #F1F1F1",
|
||||
"2 c #9F9F9F",
|
||||
"% c #F9F9F9",
|
||||
"e c #C5C5C5",
|
||||
"= c #AFAFAF",
|
||||
"r c #BEBEBE",
|
||||
" c None",
|
||||
"y c #B7B7B7",
|
||||
"# c #D5D5D5",
|
||||
", c #E4E4E4",
|
||||
"+ c #F3F3F3",
|
||||
"p c #CECECE",
|
||||
"@ c #ECECEC",
|
||||
"u c #FBFBFB",
|
||||
"h c #C7C7C7",
|
||||
"- c #F4F4F4",
|
||||
"< c #CFCFCF",
|
||||
"5 c #DEDEDE",
|
||||
"> c #FCFCFC",
|
||||
"X c #AAAAAA",
|
||||
"f c #C8C8C8",
|
||||
"d c #D7D7D7",
|
||||
"4 c #E6E6E6",
|
||||
"s c #F5F5F5",
|
||||
"8 c #A3A3A3",
|
||||
"a c #C1C1C1",
|
||||
"i c #EEEEEE",
|
||||
"3 c #FDFDFD",
|
||||
". c #ABABAB",
|
||||
"6 c #BABABA",
|
||||
"0 c #B3B3B3",
|
||||
"w c #D1D1D1",
|
||||
"; c #E0E0E0",
|
||||
": c #616161",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ..XXXXXXo ",
|
||||
" XOOO+@#$Xo ",
|
||||
" XOOO%&*$X=o ",
|
||||
" XOOO%-;$o:o: ",
|
||||
" XOOO>+,$<12: ",
|
||||
" XOOO3%45678o ",
|
||||
" XOOOO%9$0qXo ",
|
||||
" XOO3-@werty: ",
|
||||
" XO3ui5<pear: ",
|
||||
" XOs9,;$dwpfo ",
|
||||
" XO@9,g5dwph: ",
|
||||
" XO94g;*d<pho ",
|
||||
" .%99,;$dwpho ",
|
||||
" oo:oooo:o::o ",
|
||||
" "
|
||||
};
|
162
Source/Core/DolphinWX/resources/isoprop_folder.xpm
Normal file
162
Source/Core/DolphinWX/resources/isoprop_folder.xpm
Normal file
@ -0,0 +1,162 @@
|
||||
/* XPM */
|
||||
static const char *folder_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 140 2",
|
||||
"7 c #FFE790",
|
||||
"B c #FCDA87",
|
||||
"h c #C0B08F",
|
||||
"E c #DEBC6E",
|
||||
"i c #FFE48D",
|
||||
"j. c #AFA181",
|
||||
"@. c #B9AC8D",
|
||||
"=. c #B4A279",
|
||||
"y. c #6C5E32",
|
||||
"~ c #F0CF80",
|
||||
"1. c #E1C074",
|
||||
"&. c #E6C477",
|
||||
"T c #FFFFFF",
|
||||
";. c #AD9B6F",
|
||||
"5. c #B2A27C",
|
||||
"I c #BCAA80",
|
||||
"H c #C1B7A2",
|
||||
"N c #FDDB87",
|
||||
"r c #EEF3FF",
|
||||
"( c #F8D480",
|
||||
"X c #E7DDBB",
|
||||
"W c #AB9560",
|
||||
"8 c #FEE891",
|
||||
"q c #FEE892",
|
||||
"o. c #B09C71",
|
||||
"j c #C4B89D",
|
||||
"+. c #E2C176",
|
||||
"@ c #E7DABD",
|
||||
"- c #F1D087",
|
||||
"Z c #F9DB85",
|
||||
"2. c #E0C175",
|
||||
"| c #EAC97B",
|
||||
"X. c #EAEAEA",
|
||||
"q. c #E0BE71",
|
||||
"t. c #A28B4A",
|
||||
"% c #FFEC8E",
|
||||
"8. c #AC9C72",
|
||||
"G c #A28E5F",
|
||||
"z. c #BBAE8E",
|
||||
"l. c #B1A385",
|
||||
"e. c #DEBE72",
|
||||
"O. c #CFAF65",
|
||||
"b c #E3E9F5",
|
||||
"Y c #D9D8D8",
|
||||
"K c #F7D584",
|
||||
"+ c #E3D1AA",
|
||||
"2 c #DCD6B9",
|
||||
"i. c #AA9666",
|
||||
"O c #E1D4B0",
|
||||
"S c #B4B6BC",
|
||||
"k. c #AFA080",
|
||||
"<. c #B9AB8D",
|
||||
"} c #EBCA7B",
|
||||
"^ c #F0CE80",
|
||||
".. c #B7A57B",
|
||||
"J c #BCAF91",
|
||||
" c None",
|
||||
"V c #FDDA86",
|
||||
"$. c #E4C378",
|
||||
" . c #F3CF7B",
|
||||
"r. c #E9C77A",
|
||||
"3 c #F1FCFF",
|
||||
"o c #E7DFBC",
|
||||
"< c #FEEA93",
|
||||
"d. c #BAAC8C",
|
||||
"u c #C9BEA3",
|
||||
"! c #BAAC8E",
|
||||
"0 c #FEE791",
|
||||
"; c #D8CDB2",
|
||||
"[ c #ECCB7C",
|
||||
"7. c #F1F3F7",
|
||||
"` c #ECECEC",
|
||||
"4. c #E7C474",
|
||||
"* c #E5D08E",
|
||||
"g. c #B3A585",
|
||||
"z c #FEDE8A",
|
||||
"l c #FEDE8B",
|
||||
"3. c #E0C075",
|
||||
"#. c #E5C477",
|
||||
"1 c #FFEB8B",
|
||||
"w c #FFEB8C",
|
||||
"4 c #DBB978",
|
||||
"U c #8E929B",
|
||||
"e c #D4CAA9",
|
||||
"_ c #93969E",
|
||||
"h. c #AC9E7E",
|
||||
"M c #C0B497",
|
||||
"f. c #BBAD8D",
|
||||
"a. c #CAAA62",
|
||||
">. c #DEBD73",
|
||||
"*. c #EDC977",
|
||||
"x c #FFDF8A",
|
||||
") c #B9A77D",
|
||||
"v c #BEB192",
|
||||
"k c #FFDF8B",
|
||||
"m c #B9AA88",
|
||||
"L c #F5D484",
|
||||
"5 c #CDBD9C",
|
||||
"n c #CDB47F",
|
||||
"f c #EBF0FD",
|
||||
"0. c #DCBA6F",
|
||||
"g c #CDB179",
|
||||
"-. c #94979E",
|
||||
"p. c #947C45",
|
||||
"' c #B2A073",
|
||||
"R c #B7A477",
|
||||
"u. c #A38E61",
|
||||
"s. c #C1AF86",
|
||||
"# c #DAD2BD",
|
||||
"9. c #C6A760",
|
||||
":. c #CBAB62",
|
||||
"y c #C6B694",
|
||||
"w. c #DFBE72",
|
||||
"= c #F3DDAB",
|
||||
"C c #FDD986",
|
||||
". c #E7DEBA",
|
||||
", c #FEE993",
|
||||
": c #D3CBB4",
|
||||
"6 c #CEC4AC",
|
||||
"] c #D3B368",
|
||||
"9 c #FEE691",
|
||||
"c c #FEE388",
|
||||
"p c #FEE38E",
|
||||
"a c #FEE38F",
|
||||
"t c #D3B373",
|
||||
"d c #CCC1A0",
|
||||
"& c #FFF08D",
|
||||
"{ c #B8AB8C",
|
||||
",. c #B8AB8D",
|
||||
"Q c #C2B9A3",
|
||||
"F c #C2AD7C",
|
||||
"/ c #EFCE80",
|
||||
"P c #FEDA84",
|
||||
"$ c #FFED8D",
|
||||
"D c #FEFEFE",
|
||||
"%. c #E5C378",
|
||||
"> c #FFEA92",
|
||||
"s c #FFE78A",
|
||||
"6. c #989CA9",
|
||||
"A c #BBAC89",
|
||||
/* pixels */
|
||||
" ",
|
||||
" . X X X X X o O + @ ",
|
||||
" # $ % % % % % & * = - ; ",
|
||||
" : > , < < , , 1 2 3 4 5 ",
|
||||
" 6 7 8 8 9 0 q w e r t y ",
|
||||
" u i p p a p p s d f g h ",
|
||||
" j k l l l z x c v b n m ",
|
||||
" M N B V B C Z A S D F G H ",
|
||||
" J K L L L P I U Y T R E W Q ",
|
||||
" ! ~ ^ ^ / ( ) _ ` T ' ] [ { ",
|
||||
" ! } | | | ..._ X.T o.O.+.@. ",
|
||||
" @.#.$.%.&.*.=.-.X.T ;.:.>.,. ",
|
||||
" <.1.2.2.3.4.5.6.7.T 8.9.0.,. ",
|
||||
" <.q.w.e.e.r.t.y.u.i.p.a.s. ",
|
||||
" d.d.d.d.f.g.h.j.k.l.z. ",
|
||||
" "
|
||||
};
|
Loading…
Reference in New Issue
Block a user