Add character exporting
Compress files in archive that aren't known media types (avi,mp3,etc)
This commit is contained in:
@@ -177,9 +177,21 @@ bool ExportPackage( CString sPackageName, const CStringArray& asDirectoriesToExp
|
|||||||
if( sFilePath.Find("Thumbs.db")!=-1 )
|
if( sFilePath.Find("Thumbs.db")!=-1 )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
|
CString sDir, sFName, sExt;
|
||||||
|
splitrelpath( sFilePath, sDir, sFName, sExt );
|
||||||
|
bool bUseCompression = true;
|
||||||
|
if( sExt.CompareNoCase("avi")==0 ||
|
||||||
|
sExt.CompareNoCase("mpeg")==0 ||
|
||||||
|
sExt.CompareNoCase("mpg")==0 ||
|
||||||
|
sExt.CompareNoCase("ogg")==0 ||
|
||||||
|
sExt.CompareNoCase("gif")==0 ||
|
||||||
|
sExt.CompareNoCase("jpg")==0 ||
|
||||||
|
sExt.CompareNoCase("png")==0 )
|
||||||
|
bUseCompression = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
zip.AddNewFile( sFilePath, Z_NO_COMPRESSION, true );
|
zip.AddNewFile( sFilePath, bUseCompression?Z_BEST_COMPRESSION:Z_NO_COMPRESSION, true );
|
||||||
}
|
}
|
||||||
catch (CException* e)
|
catch (CException* e)
|
||||||
{
|
{
|
||||||
@@ -406,6 +418,15 @@ void CSmpackageExportDlg::RefreshTree()
|
|||||||
m_tree.InsertItem( as1[i], item1 );
|
m_tree.InsertItem( as1[i], item1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add characters
|
||||||
|
{
|
||||||
|
CStringArray as1;
|
||||||
|
HTREEITEM item1 = m_tree.InsertItem( "Characters" );
|
||||||
|
GetDirListing( "Characters\\*.*", as1, true, false );
|
||||||
|
for( int i=0; i<as1.GetSize(); i++ )
|
||||||
|
m_tree.InsertItem( as1[i], item1 );
|
||||||
|
}
|
||||||
|
|
||||||
// Add themes
|
// Add themes
|
||||||
{
|
{
|
||||||
CStringArray as1;
|
CStringArray as1;
|
||||||
|
|||||||
Reference in New Issue
Block a user