Merge pull request #21 from merlin1991/Q3-gamepack-fix

copy shaderlist for Q3 if missing and make sure the config folder for *.game files exists
This commit is contained in:
Timothee "TTimo" Besset 2012-03-26 06:56:22 -07:00
commit 686a211fc3
1 changed files with 9 additions and 0 deletions

View File

@ -3408,6 +3408,9 @@ void CGameInstall::Run() {
// write out the game file // write out the game file
Str gameFilePath = g_strAppPath.GetBuffer(); Str gameFilePath = g_strAppPath.GetBuffer();
gameFilePath += "games/"; gameFilePath += "games/";
if(CheckFile(gameFilePath) != PATH_DIRECTORY) {
radCreateDirectory(gameFilePath);
}
gameFilePath += m_strName.GetBuffer(); gameFilePath += m_strName.GetBuffer();
gameFilePath += ".game"; gameFilePath += ".game";
Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() ); Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() );
@ -3441,6 +3444,12 @@ void CGameInstall::Run() {
source += "/install/"; source += "/install/";
Str dest = m_strEngine.GetBuffer(); Str dest = m_strEngine.GetBuffer();
CopyTree( source.GetBuffer(), dest.GetBuffer() ); CopyTree( source.GetBuffer(), dest.GetBuffer() );
// Hardcoded fix for "missing" shaderlist in gamepack
dest += "/baseq3/scripts/shaderlist.txt";
if(CheckFile(dest.GetBuffer()) != PATH_FILE) {
source += "baseq3/scripts/default_shaderlist.txt";
radCopyFile(source.GetBuffer(),dest.GetBuffer());
}
fprintf( fg, " basegame=\"baseq3\"\n" ); fprintf( fg, " basegame=\"baseq3\"\n" );
break; break;
} }