diff --git a/src/CommandLineActions.cpp b/src/CommandLineActions.cpp index adec3f04e7..9a95a8a84e 100644 --- a/src/CommandLineActions.cpp +++ b/src/CommandLineActions.cpp @@ -13,15 +13,15 @@ #include "RageFileManager.h" #include "SpecialFiles.h" +// only used for Version() #if defined(_WINDOWS) -// fuck you #include #include #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 ) { @@ -39,7 +39,7 @@ static void GetPackageFilesToInstall( vector &vs ) for( int i = 1; iMount( "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() ) { @@ -129,7 +129,7 @@ void CommandLineActions::Nsis() RageFile out; if( !out.Open( "nsis_strings_temp.inc", RageFile::WRITE ) ) RageException::Throw( "Error opening file for write." ); - + vector vs; GetDirListing( INSTALLER_LANGUAGES_DIR + "*.ini", vs, false, false ); FOREACH_CONST( RString, vs, s ) @@ -137,10 +137,10 @@ void CommandLineActions::Nsis() RString sThrowAway, sLangCode; splitpath( *s, sThrowAway, sLangCode, sThrowAway ); const LanguageInfo *pLI = GetLanguageInfo( sLangCode ); - + RString sLangNameUpper = pLI->szEnglishName; sLangNameUpper.MakeUpper(); - + IniFile ini; if( !ini.ReadFile( INSTALLER_LANGUAGES_DIR + *s ) ) RageException::Throw( "Error opening file for read." ); @@ -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 }