Add exit code detection for Windows.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2007 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
79ff87713a
commit
bceb2ce942
@ -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:
|
||||
|
11
src/build.c
11
src/build.c
@ -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 @@ static void show_build_result_message(gboolean failure)
|
||||
}
|
||||
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 @@ static void build_exit_cb(GPid child_pid, gint status, gpointer user_data)
|
||||
}
|
||||
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();
|
||||
|
@ -36,6 +36,7 @@ ALL_GTK_LIBS= \
|
||||
-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 @@ CCFLAGS=-Wall -O2 -g -mms-bitfields $(DEFINES) $(INCLUDEDIRS)
|
||||
|
||||
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 @@ binclean:
|
||||
$(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
|
||||
|
Loading…
x
Reference in New Issue
Block a user