mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Merge pull request #50 from merlin1991/ETPack
Add support for W:ET to the game setup dialog
This commit is contained in:
commit
377547668d
3 changed files with 35 additions and 1 deletions
|
@ -33,7 +33,7 @@ class Config:
|
|||
# platforms for which to assemble a setup
|
||||
self.setup_platforms = [ 'local', 'x86', 'x64', 'win32' ]
|
||||
# paks to assemble in the setup
|
||||
self.setup_packs = [ 'Q3Pack', 'UrTPack', ] # 'UFOAIPack', 'Q2WPack', 'ReactionPack' ]
|
||||
self.setup_packs = [ 'Q3Pack', 'UrTPack', 'ETPack', ] # 'UFOAIPack', 'Q2WPack', 'ReactionPack' ]
|
||||
|
||||
def __repr__( self ):
|
||||
return 'config: target=%s config=%s' % ( self.target_selected, self.config_selected )
|
||||
|
|
|
@ -3335,6 +3335,9 @@ void CGameInstall::BuildDialog() {
|
|||
case GAME_REACTION:
|
||||
gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Reaction Quake 3" ) );
|
||||
break;
|
||||
case GAME_ET:
|
||||
gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Wolfenstein: Enemy Territory" ) );
|
||||
break;
|
||||
}
|
||||
iGame++;
|
||||
}
|
||||
|
@ -3443,6 +3446,9 @@ void CGameInstall::Run() {
|
|||
case GAME_REACTION:
|
||||
gameFilePath += "reaction.game";
|
||||
break;
|
||||
case GAME_ET:
|
||||
gameFilePath += "et.game";
|
||||
break;
|
||||
}
|
||||
|
||||
Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() );
|
||||
|
@ -3584,6 +3590,29 @@ void CGameInstall::Run() {
|
|||
// for a specific game.
|
||||
break;
|
||||
}
|
||||
case GAME_ET: {
|
||||
#ifdef _WIN32
|
||||
fprintf( fg, " "ENGINE_ATTRIBUTE "=\"ET.exe\"\n");
|
||||
#elif __linux__
|
||||
fprintf( fg, " "ENGINE_ATTRIBUTE "=\"et\"\n" );
|
||||
#endif
|
||||
fprintf( fg, " "TOOLS_ATTRIBUTE "=\"%sinstalls/"ET_PACK "/game\"\n", g_strAppPath.GetBuffer() );
|
||||
fprintf( fg, " prefix=\".etwolf\"\n" );
|
||||
Str source = g_strAppPath.GetBuffer();
|
||||
source += "installs/";
|
||||
source += ET_PACK;
|
||||
source += "/install/";
|
||||
Str dest = m_strEngine.GetBuffer();
|
||||
CopyTree( source.GetBuffer(), dest.GetBuffer() );
|
||||
// Hardcoded fix for "missing" shaderlist in gamepack
|
||||
dest += "/etmain/scripts/shaderlist.txt";
|
||||
if(CheckFile(dest.GetBuffer()) != PATH_FILE) {
|
||||
source += "etmain/scripts/default_shaderlist.txt";
|
||||
radCopyFile(source.GetBuffer(),dest.GetBuffer());
|
||||
}
|
||||
fprintf( fg, " basegame=\"etmain\"\n" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
fprintf( fg, "/>\n" );
|
||||
fclose( fg );
|
||||
|
@ -3633,6 +3662,9 @@ void CGameInstall::ScanGames() {
|
|||
if ( stricmp( dirname, REACTION_PACK ) == 0 ) {
|
||||
m_availGames[ iGame++ ] = GAME_REACTION;
|
||||
}
|
||||
if ( stricmp( dirname, ET_PACK ) == 0 ) {
|
||||
m_availGames[ iGame++ ] = GAME_ET;
|
||||
}
|
||||
}
|
||||
Sys_Printf( "No installable games found in: %s\n",
|
||||
pakPaths.GetBuffer() );
|
||||
|
|
|
@ -213,6 +213,7 @@ void Dump();
|
|||
#define TREMULOUS_PACK "TremulousPack"
|
||||
#define JA_PACK "JAPack"
|
||||
#define REACTION_PACK "ReactionPack"
|
||||
#define ET_PACK "ETPack"
|
||||
|
||||
class CGameInstall : public Dialog {
|
||||
public:
|
||||
|
@ -236,6 +237,7 @@ enum gameType_e {
|
|||
GAME_TREMULOUS,
|
||||
GAME_JA,
|
||||
GAME_REACTION,
|
||||
GAME_ET,
|
||||
GAME_COUNT
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue