mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-28 22:52:15 +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
|
# platforms for which to assemble a setup
|
||||||
self.setup_platforms = [ 'local', 'x86', 'x64', 'win32' ]
|
self.setup_platforms = [ 'local', 'x86', 'x64', 'win32' ]
|
||||||
# paks to assemble in the setup
|
# 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 ):
|
def __repr__( self ):
|
||||||
return 'config: target=%s config=%s' % ( self.target_selected, self.config_selected )
|
return 'config: target=%s config=%s' % ( self.target_selected, self.config_selected )
|
||||||
|
|
|
@ -3335,6 +3335,9 @@ void CGameInstall::BuildDialog() {
|
||||||
case GAME_REACTION:
|
case GAME_REACTION:
|
||||||
gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Reaction Quake 3" ) );
|
gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Reaction Quake 3" ) );
|
||||||
break;
|
break;
|
||||||
|
case GAME_ET:
|
||||||
|
gtk_combo_box_append_text( GTK_COMBO_BOX( combo ), _( "Wolfenstein: Enemy Territory" ) );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
iGame++;
|
iGame++;
|
||||||
}
|
}
|
||||||
|
@ -3443,6 +3446,9 @@ void CGameInstall::Run() {
|
||||||
case GAME_REACTION:
|
case GAME_REACTION:
|
||||||
gameFilePath += "reaction.game";
|
gameFilePath += "reaction.game";
|
||||||
break;
|
break;
|
||||||
|
case GAME_ET:
|
||||||
|
gameFilePath += "et.game";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() );
|
Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() );
|
||||||
|
@ -3584,6 +3590,29 @@ void CGameInstall::Run() {
|
||||||
// for a specific game.
|
// for a specific game.
|
||||||
break;
|
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" );
|
fprintf( fg, "/>\n" );
|
||||||
fclose( fg );
|
fclose( fg );
|
||||||
|
@ -3633,6 +3662,9 @@ void CGameInstall::ScanGames() {
|
||||||
if ( stricmp( dirname, REACTION_PACK ) == 0 ) {
|
if ( stricmp( dirname, REACTION_PACK ) == 0 ) {
|
||||||
m_availGames[ iGame++ ] = GAME_REACTION;
|
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",
|
Sys_Printf( "No installable games found in: %s\n",
|
||||||
pakPaths.GetBuffer() );
|
pakPaths.GetBuffer() );
|
||||||
|
|
|
@ -213,6 +213,7 @@ void Dump();
|
||||||
#define TREMULOUS_PACK "TremulousPack"
|
#define TREMULOUS_PACK "TremulousPack"
|
||||||
#define JA_PACK "JAPack"
|
#define JA_PACK "JAPack"
|
||||||
#define REACTION_PACK "ReactionPack"
|
#define REACTION_PACK "ReactionPack"
|
||||||
|
#define ET_PACK "ETPack"
|
||||||
|
|
||||||
class CGameInstall : public Dialog {
|
class CGameInstall : public Dialog {
|
||||||
public:
|
public:
|
||||||
|
@ -236,6 +237,7 @@ enum gameType_e {
|
||||||
GAME_TREMULOUS,
|
GAME_TREMULOUS,
|
||||||
GAME_JA,
|
GAME_JA,
|
||||||
GAME_REACTION,
|
GAME_REACTION,
|
||||||
|
GAME_ET,
|
||||||
GAME_COUNT
|
GAME_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue