Revision: 2007 http://geany.svn.sourceforge.net/geany/?rev=2007&view=rev Author: eht16 Date: 2007-11-02 05:58:38 -0700 (Fri, 02 Nov 2007)
Log Message: ----------- Add exit code detection for Windows.
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c trunk/src/makefile.win32
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-01 16:33:06 UTC (rev 2006) +++ trunk/ChangeLog 2007-11-02 12:58:38 UTC (rev 2007) @@ -1,3 +1,8 @@ +2007-11-02 Enrico Tröger enrico.troeger@uvena.de + + * src/build.c, src/makefile.win32: Add exit code detection for Windows. + + 2007-11-01 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/win32.c:
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2007-11-01 16:33:06 UTC (rev 2006) +++ trunk/src/build.c 2007-11-02 12:58:38 UTC (rev 2007) @@ -39,6 +39,8 @@ # include <sys/types.h> # include <sys/wait.h> # include <signal.h> +#else +# include <windows.h> #endif
#include "prefs.h" @@ -908,11 +910,7 @@ } else { -#ifdef G_OS_UNIX msg = _("Compilation finished successfully."); -#else - msg = _("Compilation finished."); // we don't know what the result was on Windows -#endif msgwin_compiler_add(COLOR_BLUE, msg); if (! ui_prefs.msgwindow_visible || gtk_notebook_get_current_page(GTK_NOTEBOOK(msgwindow.notebook)) != MSG_COMPILER) @@ -942,7 +940,10 @@ } show_build_result_message(failure); #else - show_build_result_message(FALSE); + DWORD exit_code; + GetExitCodeProcess(child_pid, &exit_code); + // not sure whether the cast to int is necessary, no idea what DWORD really is (seems like int) + show_build_result_message((int) exit_code); #endif
utils_beep();
Modified: trunk/src/makefile.win32 =================================================================== --- trunk/src/makefile.win32 2007-11-01 16:33:06 UTC (rev 2006) +++ trunk/src/makefile.win32 2007-11-02 12:58:38 UTC (rev 2007) @@ -36,6 +36,7 @@ -L"$(PREFIX)/lib" \ -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 \ -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv + #-lcairo -lpangocairo-1.0 # these things are for GTK >= 2.8 # (should be same as with MSYS: pkg-config --libs gtk+-2.0 gthread-2.0) #"$(PREFIX)/lib/libcairo.dll.a" \ @@ -46,8 +47,8 @@
OBJS = about.o build.o callbacks.o dialogs.o document.o editor.o encodings.o filetypes.o \ geanyobject.o highlighting.o interface.o keybindings.o keyfile.o main.o msgwindow.o \ - navqueue.o notebook.o plugins.o prefs.o project.o sciwrappers.o search.o socket.o \ - support.o symbols.o templates.o treeviews.o tools.o ui_utils.o utils.o win32.o + navqueue.o notebook.o plugins.o prefs.o project.o sciwrappers.o search.o \ + socket.o support.o symbols.o templates.o treeviews.o tools.o ui_utils.o utils.o win32.o
.c.o: $(CC) $(CCFLAGS) -c $< @@ -72,7 +73,7 @@ $(TARGET): $(OBJS) $(RES) ../scintilla/scintilla.a ../tagmanager/tagmanager.a $(CXX) $(OBJS) $(RES) -o $(TARGET) \ ../scintilla/scintilla.a ../tagmanager/tagmanager.a $(ALL_GTK_LIBS) \ - -mwindows -limm32 -lshell32 -lole32 -luuid -lcomdlg32 -lcomctl32 -liberty -lwsock32 + -mwindows -lkernel32 -limm32 -lshell32 -lole32 -luuid -lcomdlg32 -lcomctl32 -liberty -lwsock32
deps.mak: $(CC) -MM $(CCFLAGS) *.c >deps.mak
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.