r290 - trunk
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat May 19 01:23:39 EDT 2007
Author: icculus
Date: 2007-05-19 01:23:39 -0400 (Sat, 19 May 2007)
New Revision: 290
Modified:
trunk/CMakeLists.txt
trunk/gui.c
trunk/gui.h
trunk/mojosetup.c
Log:
Try to deinit GUI during a panic().
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2007-05-18 19:55:14 UTC (rev 289)
+++ trunk/CMakeLists.txt 2007-05-19 05:23:39 UTC (rev 290)
@@ -271,6 +271,27 @@
ENDIF(MOJOSETUP_GUI_STDIO_STATIC)
ENDIF(MOJOSETUP_GUI_STDIO)
+# BINARY SIZE += !!! FIXME: check this.
+IF(UNIX) # !!! FIXME: use FindCurses instead...
+IF(NOT BEOS)
+IF(NOT MACOSX)
+OPTION(MOJOSETUP_GUI_NCURSES "Enable ncurses GUI" TRUE)
+IF(MOJOSETUP_GUI_NCURSES)
+ ADD_DEFINITIONS(-DSUPPORT_GUI_NCURSES=1)
+ OPTION(MOJOSETUP_GUI_NCURSES_STATIC "Statically link ncurses GUI" TRUE)
+ IF(MOJOSETUP_GUI_NCURSES_STATIC)
+ ADD_DEFINITIONS(-DGUI_STATIC_LINK_NCURSES=1)
+ SET(OPTIONAL_SRCS ${OPTIONAL_SRCS} gui_ncurses.c)
+ SET(OPTIONAL_LIBS ${OPTIONAL_LIBS} -lncurses) # !!! FIXME
+ ELSE(MOJOSETUP_GUI_NCURSES_STATIC)
+ ADD_LIBRARY(mojosetupgui_ncurses SHARED gui_ncurses.c)
+ TARGET_LINK_LIBRARIES(mojosetupgui_ncurses "-lncurses") # !!! FIXME
+ ENDIF(MOJOSETUP_GUI_NCURSES_STATIC)
+ENDIF(MOJOSETUP_GUI_NCURSES)
+ENDIF(NOT MACOSX)
+ENDIF(NOT BEOS)
+ENDIF(UNIX)
+
IF(MACOSX)
OPTION(MOJOSETUP_GUI_MACOSX "Enable Mac OS X GUI" TRUE)
IF(MOJOSETUP_GUI_MACOSX)
Modified: trunk/gui.c
===================================================================
--- trunk/gui.c 2007-05-18 19:55:14 UTC (rev 289)
+++ trunk/gui.c 2007-05-19 05:23:39 UTC (rev 290)
@@ -32,6 +32,9 @@
#if GUI_STATIC_LINK_GTKPLUS2
MojoGuiPlugin_gtkplus2,
#endif
+#if GUI_STATIC_LINK_NCURSES
+ MojoGuiPlugin_ncurses,
+#endif
NULL
};
Modified: trunk/gui.h
===================================================================
--- trunk/gui.h 2007-05-18 19:55:14 UTC (rev 289)
+++ trunk/gui.h 2007-05-19 05:23:39 UTC (rev 290)
@@ -166,8 +166,8 @@
* some aren't...
*/
-// Probably want to support this always, unless explicitly overridden.
const MojoGui *MojoGuiPlugin_stdio(int rev, const MojoSetupEntryPoints *e);
+const MojoGui *MojoGuiPlugin_ncurses(int rev, const MojoSetupEntryPoints *e);
const MojoGui *MojoGuiPlugin_gtkplus2(int rev, const MojoSetupEntryPoints *e);
const MojoGui *MojoGuiPlugin_macosx(int rev, const MojoSetupEntryPoints *e);
Modified: trunk/mojosetup.c
===================================================================
--- trunk/mojosetup.c 2007-05-18 19:55:14 UTC (rev 289)
+++ trunk/mojosetup.c 2007-05-19 05:23:39 UTC (rev 290)
@@ -380,9 +380,14 @@
else if (panic_runs == 2)
{
- if ((GGui != NULL) && (GGui->msgbox != NULL))
+ boolean domsgbox = ((GGui != NULL) && (GGui->msgbox != NULL));
+ if (domsgbox)
GGui->msgbox(_("PANIC"), err);
- else
+
+ if (GGui->deinit != NULL)
+ GGui->deinit();
+
+ if (!domsgbox)
panic(err); /* no GUI plugin...double-panic. */
} // if
More information about the mojosetup-commits
mailing list