working on localization tool

This commit is contained in:
Chris Danford
2005-12-29 02:40:09 +00:00
parent 2d7ae984e2
commit df984aef76
15 changed files with 397 additions and 35 deletions
+2 -26
View File
@@ -14,6 +14,7 @@
#include "EditInsallations.h"
#include "IniFile.h"
#include "RageFileDriverMemory.h"
#include "archutils/Win32/SpecialDirs.h"
#include <vector>
#include <algorithm>
@@ -92,31 +93,6 @@ RString ReplaceInvalidFileNameChars( RString sOldFileName )
return sNewFileName;
}
RString GetDesktopPath()
{
static TCHAR strNull[2] = _T("");
static TCHAR strPath[MAX_PATH];
DWORD dwType;
DWORD dwSize = MAX_PATH;
HKEY hKey;
// Open the appropriate registry key
LONG lResult = RegOpenKeyEx( HKEY_CURRENT_USER,
_T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"),
0, KEY_READ, &hKey );
if( ERROR_SUCCESS != lResult )
return strNull;
lResult = RegQueryValueEx( hKey, _T("Desktop"), NULL,
&dwType, (BYTE*)strPath, &dwSize );
RegCloseKey( hKey );
if( ERROR_SUCCESS != lResult )
return strNull;
return strPath;
}
static bool ExportPackage( RString sPackageName, const vector<RString>& asDirectoriesToExport, RString sComment )
{
CZipArchive zip;
@@ -124,7 +100,7 @@ static bool ExportPackage( RString sPackageName, const vector<RString>& asDirect
//
// Create the package zip file
//
const RString sPackagePath = GetDesktopPath() + "\\" + sPackageName;
const RString sPackagePath = "Desktop/" + sPackageName;
try
{
zip.Open( sPackagePath, CZipArchive::zipCreate );