preparing for future additions

This commit is contained in:
AJ Kelly
2010-08-11 02:14:01 -05:00
parent a647a04600
commit cccd8d0a16
+6 -5
View File
@@ -13,15 +13,15 @@
#include "RageFileManager.h"
#include "SpecialFiles.h"
// only used for Version()
#if defined(_WINDOWS)
// fuck you
#include <windows.h>
#include <conio.h>
#endif
const RString INSTALLER_LANGUAGES_DIR = "Themes/_Installer/Languages/";
static const RString TEMP_MOUNT_POINT = "/@tempinstallpackage/";
static const RString TEMP_ZIP_MOUNT_POINT = "/@temp-zip/";
static bool IsPackageFile( RString sFile )
{
@@ -85,17 +85,17 @@ void CommandLineActions::Install()
RString sOsDir, sFilename, sExt;
splitpath( *s, sOsDir, sFilename, sExt );
FILEMAN->Mount( "dir", sOsDir, TEMP_MOUNT_POINT );
FILEMAN->Mount( "dir", sOsDir, TEMP_ZIP_MOUNT_POINT );
// TODO: Validate that this zip contains files for this version of StepMania
bool bFileExists = DoesFileExist( SpecialFiles::USER_PACKAGES_DIR + sFilename + sExt );
if( FileCopy( TEMP_MOUNT_POINT + sFilename + sExt, SpecialFiles::USER_PACKAGES_DIR + sFilename + sExt ) )
if( FileCopy( TEMP_ZIP_MOUNT_POINT + sFilename + sExt, SpecialFiles::USER_PACKAGES_DIR + sFilename + sExt ) )
vSucceeded.push_back( FileCopyResult(*s,bFileExists ? "overwrote existing file" : "") );
else
vFailed.push_back( FileCopyResult(*s,ssprintf("error copying file to '%s'",sOsDir.c_str())) );
FILEMAN->Unmount( "dir", sOsDir, TEMP_MOUNT_POINT );
FILEMAN->Unmount( "dir", sOsDir, TEMP_ZIP_MOUNT_POINT );
}
if( vSucceeded.empty() && vFailed.empty() )
{
@@ -196,6 +196,7 @@ void CommandLineActions::Version()
freopen( "CONOUT$","wb", stderr );
fprintf(stdout, "Version Information:\n%s %s\n", sProductID.c_str(), sVersion.c_str() );
fprintf(stdout, "Press any key to exit." );
_getch();
#endif // WIN32 && !_XBOX
}