sdl: removed GTK_LITE build option in favor of --nogui runtime option

you can still disbale compiling in gtk with GTK=0
This commit is contained in:
punkrockguy318 2011-03-19 02:28:01 +00:00
parent a7c16f1835
commit 4f1bae8c58
5 changed files with 10 additions and 19 deletions

View File

@ -13,7 +13,6 @@ opts.AddVariables(
BoolVariable('CREATE_AVI', 'Enable avi creation support (SDL only)', 1),
BoolVariable('LOGO', 'Enable a logoscreen when creating avis (SDL only)', '1'),
BoolVariable('GTK', 'Enable GTK2 GUI (SDL only)', 1),
BoolVariable('GTK_LITE', 'Enable GTK2 for dialogs only', 0)
)
env = Environment(options = opts)
@ -57,15 +56,12 @@ else:
if not conf.CheckLib('SDL'):
print 'Did not find libSDL or SDL.lib, exiting!'
Exit(1)
if env['GTK'] or env['GTK_LITE']:
if env['GTK']:
# Add compiler and linker flags from pkg-config
env.ParseConfig('pkg-config --cflags --libs gtk+-2.0')
env.Append(CPPDEFINES=["_GTK2"])
if env['GTK']:
env.Append(CCFLAGS = ["-D_GTK"])
env.Append(CCFLAGS =["-D_GTK_LITE"])
if env['GTK_LITE']:
env.Append(CCFLAGS =["-D_GTK_LITE"])
### Lua platform defines
### Applies to all files even though only lua needs it, but should be ok

View File

@ -1,3 +1,4 @@
18-mar-2011 - prg318 - sdl - removed GTK_LITE; --nogui made it obsolete
12-feb-2010 - mart0258 - Fix input selection for Famicom Expansion port
25-jan-2010 - prg318 - gtk - filechooser now remembers last file opened
25-jan-2010 - prg318 - gtk - fixed xscale/yscale spinbuttons not changing config

View File

@ -19,7 +19,7 @@
#ifndef FCEUX_GUI_H
#define FCEUX_GUI_H
#define GTK_LITE
#define GTK
#include <gtk/gtk.h>
extern GtkWidget* MainWindow;
extern GtkWidget* socket;

View File

@ -39,7 +39,7 @@
#include "../../fceulua.h"
#endif
#ifdef _GTK_LITE
#ifdef _GTK
#include "gui.h"
#ifdef SDL_VIDEO_DRIVER_X11
#include <gdk/gdkx.h>
@ -217,7 +217,7 @@ std::string GetFilename(const char* title, bool save, const char* filter)
fname = GetOpenFileName(&ofn);
#endif
#ifdef _GTK_LITE
#ifdef _GTK
int fullscreen = 0;
g_config->getOption("SDL.Fullscreen", &fullscreen);
if(fullscreen)
@ -272,7 +272,7 @@ std::string GetFilename(const char* title, bool save, const char* filter)
*/
std::string GetUserText(const char* title)
{
#ifdef _GTK_LITE
#ifdef _GTK
GtkWidget* d;
GtkWidget* entry;

View File

@ -13,10 +13,8 @@
#include <limits.h>
#include <math.h>
#ifdef _GTK_LITE
#include <gtk/gtk.h>
#endif
#ifdef _GTK
#include <gtk/gtk.h>
#include "gui.cpp"
#endif
@ -158,7 +156,7 @@ static void ShowUsage(char *prog)
printf("Compiled with SDL version %d.%d.%d\n", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL );
const SDL_version* v = SDL_Linked_Version();
printf("Linked with SDL version %d.%d.%d\n", v->major, v->minor, v->patch);
#ifdef GTK_LITE
#ifdef GTK
printf("Compiled with GTK version %d.%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION );
//printf("Linked with GTK version %d.%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION );
#endif
@ -726,13 +724,9 @@ int main(int argc, char *argv[])
// load the hotkeys from the config life
setHotKeys();
// GTK_LITE: gtk is linked for dialogs
// gtk needs to be started somewhere
// GTK: full gtk GUI. we're starting it here.
#ifdef _GTK_LITE
gtk_init(&argc, &argv);
#endif
#ifdef _GTK
gtk_init(&argc, &argv);
int noGui;
g_config->getOption("SDL.NoGUI", &noGui);
if(noGui == 0)