Partially fixed linux build

master
Yevgen Muntyan 2016-10-03 00:15:41 -07:00
parent fa4dbfbf36
commit 4509273d08
20 changed files with 51 additions and 62 deletions

View File

@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0048 NEW) cmake_policy(SET CMP0048 NEW)
include(cmake/PrecompiledHeader.cmake) if(WIN32)
include(cmake/PrecompiledHeader.cmake)
endif()
list(APPEND EXTRA_DIST list(APPEND EXTRA_DIST
tools/genenums.py tools/genenums.py

View File

@ -17,6 +17,8 @@ endif
CLEANFILES = CLEANFILES =
MOO_INTL
include plat/win32/Makefile.incl include plat/win32/Makefile.incl
if MOO_OS_WIN32 if MOO_OS_WIN32

View File

@ -49,10 +49,10 @@ SET(source_files
../moo/mooedit/mooeditaction.h ../moo/mooedit/mooeditaction.h
../moo/mooedit/mooeditbookmark.c ../moo/mooedit/mooeditbookmark.c
../moo/mooedit/mooeditbookmark.h ../moo/mooedit/mooeditbookmark.h
../moo/mooedit/mooedit.c ../moo/mooedit/mooedit.cpp
../moo/mooedit/mooeditconfig.c ../moo/mooedit/mooeditconfig.c
../moo/mooedit/mooeditconfig.h ../moo/mooedit/mooeditconfig.h
../moo/mooedit/mooeditdialogs.c ../moo/mooedit/mooeditdialogs.cpp
../moo/mooedit/mooeditdialogs.h ../moo/mooedit/mooeditdialogs.h
../moo/mooedit/mooedit-enum-types.c ../moo/mooedit/mooedit-enum-types.c
../moo/mooedit/mooedit-enum-types.h ../moo/mooedit/mooedit-enum-types.h
@ -60,7 +60,7 @@ SET(source_files
../moo/mooedit/mooeditfileinfo.c ../moo/mooedit/mooeditfileinfo.c
../moo/mooedit/mooeditfileinfo.c ../moo/mooedit/mooeditfileinfo.c
../moo/mooedit/mooeditfileinfo.h ../moo/mooedit/mooeditfileinfo.h
../moo/mooedit/mooedit-fileops.c ../moo/mooedit/mooedit-fileops.cpp
../moo/mooedit/mooedit-fileops.h ../moo/mooedit/mooedit-fileops.h
../moo/mooedit/mooeditfiltersettings.c ../moo/mooedit/mooeditfiltersettings.c
../moo/mooedit/mooeditfiltersettings.h ../moo/mooedit/mooeditfiltersettings.h
@ -197,7 +197,7 @@ SET(source_files
../moo/mooutils/mooencodings.c ../moo/mooutils/mooencodings.c
../moo/mooutils/mooencodings-data.h ../moo/mooutils/mooencodings-data.h
../moo/mooutils/mooencodings.h ../moo/mooutils/mooencodings.h
../moo/mooutils/mooentry.c ../moo/mooutils/mooentry.cpp
../moo/mooutils/mooentry.h ../moo/mooutils/mooentry.h
../moo/mooutils/moo-environ.h ../moo/mooutils/moo-environ.h
../moo/mooutils/moofiledialog.c ../moo/mooutils/moofiledialog.c
@ -278,12 +278,12 @@ SET(source_files
../moo/mooutils/mooutils-macros.h ../moo/mooutils/mooutils-macros.h
../moo/mooutils/mooutils-mem.h ../moo/mooutils/mooutils-mem.h
../moo/mooutils/mooutils-messages.h ../moo/mooutils/mooutils-messages.h
../moo/mooutils/mooutils-misc.c ../moo/mooutils/mooutils-misc.cpp
../moo/mooutils/mooutils-misc.h ../moo/mooutils/mooutils-misc.h
../moo/mooutils/mooutils-script.c ../moo/mooutils/mooutils-script.c
../moo/mooutils/mooutils-script.h ../moo/mooutils/mooutils-script.h
../moo/mooutils/mooutils-tests.h ../moo/mooutils/mooutils-tests.h
../moo/mooutils/mooutils-thread.c ../moo/mooutils/mooutils-thread.cpp
../moo/mooutils/mooutils-thread.h ../moo/mooutils/mooutils-thread.h
../moo/mooutils/mooutils-treeview.c ../moo/mooutils/mooutils-treeview.c
../moo/mooutils/mooutils-treeview.h ../moo/mooutils/mooutils-treeview.h

View File

@ -19,10 +19,10 @@ source_files = \
../moo/mooedit/mooeditaction.h\ ../moo/mooedit/mooeditaction.h\
../moo/mooedit/mooeditbookmark.c\ ../moo/mooedit/mooeditbookmark.c\
../moo/mooedit/mooeditbookmark.h\ ../moo/mooedit/mooeditbookmark.h\
../moo/mooedit/mooedit.c\ ../moo/mooedit/mooedit.cpp\
../moo/mooedit/mooeditconfig.c\ ../moo/mooedit/mooeditconfig.c\
../moo/mooedit/mooeditconfig.h\ ../moo/mooedit/mooeditconfig.h\
../moo/mooedit/mooeditdialogs.c\ ../moo/mooedit/mooeditdialogs.cpp\
../moo/mooedit/mooeditdialogs.h\ ../moo/mooedit/mooeditdialogs.h\
../moo/mooedit/mooedit-enum-types.c\ ../moo/mooedit/mooedit-enum-types.c\
../moo/mooedit/mooedit-enum-types.h\ ../moo/mooedit/mooedit-enum-types.h\
@ -30,7 +30,7 @@ source_files = \
../moo/mooedit/mooeditfileinfo.c\ ../moo/mooedit/mooeditfileinfo.c\
../moo/mooedit/mooeditfileinfo.c\ ../moo/mooedit/mooeditfileinfo.c\
../moo/mooedit/mooeditfileinfo.h\ ../moo/mooedit/mooeditfileinfo.h\
../moo/mooedit/mooedit-fileops.c\ ../moo/mooedit/mooedit-fileops.cpp\
../moo/mooedit/mooedit-fileops.h\ ../moo/mooedit/mooedit-fileops.h\
../moo/mooedit/mooeditfiltersettings.c\ ../moo/mooedit/mooeditfiltersettings.c\
../moo/mooedit/mooeditfiltersettings.h\ ../moo/mooedit/mooeditfiltersettings.h\
@ -167,7 +167,7 @@ source_files = \
../moo/mooutils/mooencodings.c\ ../moo/mooutils/mooencodings.c\
../moo/mooutils/mooencodings-data.h\ ../moo/mooutils/mooencodings-data.h\
../moo/mooutils/mooencodings.h\ ../moo/mooutils/mooencodings.h\
../moo/mooutils/mooentry.c\ ../moo/mooutils/mooentry.cpp\
../moo/mooutils/mooentry.h\ ../moo/mooutils/mooentry.h\
../moo/mooutils/moo-environ.h\ ../moo/mooutils/moo-environ.h\
../moo/mooutils/moofiledialog.c\ ../moo/mooutils/moofiledialog.c\
@ -248,12 +248,12 @@ source_files = \
../moo/mooutils/mooutils-macros.h\ ../moo/mooutils/mooutils-macros.h\
../moo/mooutils/mooutils-mem.h\ ../moo/mooutils/mooutils-mem.h\
../moo/mooutils/mooutils-messages.h\ ../moo/mooutils/mooutils-messages.h\
../moo/mooutils/mooutils-misc.c\ ../moo/mooutils/mooutils-misc.cpp\
../moo/mooutils/mooutils-misc.h\ ../moo/mooutils/mooutils-misc.h\
../moo/mooutils/mooutils-script.c\ ../moo/mooutils/mooutils-script.c\
../moo/mooutils/mooutils-script.h\ ../moo/mooutils/mooutils-script.h\
../moo/mooutils/mooutils-tests.h\ ../moo/mooutils/mooutils-tests.h\
../moo/mooutils/mooutils-thread.c\ ../moo/mooutils/mooutils-thread.cpp\
../moo/mooutils/mooutils-thread.h\ ../moo/mooutils/mooutils-thread.h\
../moo/mooutils/mooutils-treeview.c\ ../moo/mooutils/mooutils-treeview.c\
../moo/mooutils/mooutils-treeview.h\ ../moo/mooutils/mooutils-treeview.h\

View File

@ -84,7 +84,7 @@ if test x$MOO_DEV_MODE = "xyes" -a "x$XSLTPROC" = "x"; then
AC_MSG_ERROR([xsltproc not found]) AC_MSG_ERROR([xsltproc not found])
fi fi
AC_DEFINE(MOO_CONFIG_H_INCLUDED, 1) AC_DEFINE_UNQUOTED(MOO_CONFIG_H_INCLUDED, 1, MOO_CONFIG_H_INCLUDED)
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])
AH_TOP([#ifndef __CONFIG_H__ AH_TOP([#ifndef __CONFIG_H__
#define __CONFIG_H__]) #define __CONFIG_H__])

View File

@ -10,6 +10,8 @@ output = output.replace('\r\n', '\n').replace('\r', '\n')
filename = sys.argv[1] filename = sys.argv[1]
tmp = filename + '.tmp' tmp = filename + '.tmp'
if not os.path.exists(os.path.dirname(tmp)):
os.makedirs(os.path.dirname(tmp))
with open(tmp, 'w') as f: with open(tmp, 'w') as f:
f.write(output) f.write(output)
if os.path.exists(filename): if os.path.exists(filename):

View File

@ -98,7 +98,9 @@ if(MOO_ENABLE_PYTHON)
endif() endif()
ADD_MODULE(medit-app) ADD_MODULE(medit-app)
include_directories(${PROJECT_SOURCE_DIR}/moo/mooutils/moowin32/ms) if(WIN32)
include_directories(${PROJECT_SOURCE_DIR}/moo/mooutils/moowin32/ms)
endif()
include_directories( include_directories(
${PROJECT_BINARY_DIR} ${PROJECT_BINARY_DIR}
@ -112,7 +114,7 @@ source_group("generated\\sources" REGULAR_EXPRESSION ".*\\.c(pp)?$")
source_group("generated\\headers" REGULAR_EXPRESSION ".*\\.h$") source_group("generated\\headers" REGULAR_EXPRESSION ".*\\.h$")
source_group("misc\\glade" REGULAR_EXPRESSION ".*\\.glade$") source_group("misc\\glade" REGULAR_EXPRESSION ".*\\.glade$")
set(MOO_USE_PCH TRUE) set(MOO_USE_PCH ${WIN32})
if(MOO_USE_PCH) if(MOO_USE_PCH)
set(MEDIT_PCH_SOURCES set(MEDIT_PCH_SOURCES
moo-pch.c moo-pch.c

View File

@ -39,7 +39,7 @@ medit_SOURCES = \
medit-app/mem-debug.h \ medit-app/mem-debug.h \
medit-app/run-tests.h \ medit-app/run-tests.h \
medit-app/parse.h \ medit-app/parse.h \
medit-app/main.c \ medit-app/main.cpp \
$(moo_sources) \ $(moo_sources) \
$(plugins_sources) $(plugins_sources)

View File

@ -34,13 +34,13 @@ moo_sources += \
mooedit/mooeditaction-factory.c \ mooedit/mooeditaction-factory.c \
mooedit/mooeditaction-factory.h \ mooedit/mooeditaction-factory.h \
mooedit/mooeditbookmark.c \ mooedit/mooeditbookmark.c \
mooedit/mooedit.c \ mooedit/mooedit.cpp \
mooedit/mooeditconfig.c \ mooedit/mooeditconfig.c \
mooedit/mooeditdialogs.c \ mooedit/mooeditdialogs.cpp \
mooedit/mooedit-enum-types.c \ mooedit/mooedit-enum-types.c \
mooedit/mooedit-enum-types.h \ mooedit/mooedit-enum-types.h \
mooedit/mooedit-enums.h \ mooedit/mooedit-enums.h \
mooedit/mooedit-fileops.c \ mooedit/mooedit-fileops.cpp \
mooedit/mooedit-fileops.h \ mooedit/mooedit-fileops.h \
mooedit/mooeditfiltersettings.c \ mooedit/mooeditfiltersettings.c \
mooedit/mooedithistoryitem.c \ mooedit/mooedithistoryitem.c \

View File

@ -83,7 +83,7 @@ _moo_edit_open_dialog (GtkWidget *widget,
info_array = moo_open_info_array_new (); info_array = moo_open_info_array_new ();
for (i = 0; i < files->n_elms; ++i) for (i = 0; i < files->n_elms; ++i)
moo_open_info_array_take (info_array, moo_open_info_new_file (files->elms[i], encoding, -1, 0)); moo_open_info_array_take (info_array, moo_open_info_new_file (files->elms[i], encoding, -1, MooOpenFlags (0)));
g_object_unref (start); g_object_unref (start);
start = g_file_get_parent (files->elms[0]); start = g_file_get_parent (files->elms[0]);

View File

@ -76,7 +76,8 @@ static void convert_g_stat_buf (const GStatBuf* gbuf, MgwStatBuf* mbuf)
#ifndef _MSC_VER #ifndef _MSC_VER
#define call_with_errno(err__, func__, rtype__, ...) \
#define _call_with_errno(err__, func__, rtype__, ...) \
({ \ ({ \
rtype__ result__; \ rtype__ result__; \
errno = 0; \ errno = 0; \
@ -85,6 +86,7 @@ static void convert_g_stat_buf (const GStatBuf* gbuf, MgwStatBuf* mbuf)
(err__)->value = errno; \ (err__)->value = errno; \
result__; \ result__; \
}) })
#else // _MSC_VER #else // _MSC_VER
#define _call_with_errno(what__, result__) \ #define _call_with_errno(what__, result__) \
@ -93,6 +95,8 @@ static void convert_g_stat_buf (const GStatBuf* gbuf, MgwStatBuf* mbuf)
if (err != NULL) \ if (err != NULL) \
err->value = errno; \ err->value = errno; \
#endif // _MSC_VER
#define call_with_errno0(func__, result__) \ #define call_with_errno0(func__, result__) \
_call_with_errno((func__)(), result__) _call_with_errno((func__)(), result__)
@ -108,8 +112,6 @@ static void convert_g_stat_buf (const GStatBuf* gbuf, MgwStatBuf* mbuf)
#define call_with_errno4(func__, result__, a1__, a2__, a3__, a4__) \ #define call_with_errno4(func__, result__, a1__, a2__, a3__, a4__) \
_call_with_errno((func__)((a1__), (a2__), (a3__), (a4__)), result__) _call_with_errno((func__)((a1__), (a2__), (a3__), (a4__)), result__)
#endif // _MSC_VER
const char * const char *
mgw_strerror (mgw_errno_t err) mgw_strerror (mgw_errno_t err)

View File

@ -8,6 +8,9 @@ include_directories(${PYTHON_INCLUDE_DIR})
set(MOO_PYTHON_LIB_DIR ${CMAKE_INSTALL_PREFIX}/bin/Lib) set(MOO_PYTHON_LIB_DIR ${CMAKE_INSTALL_PREFIX}/bin/Lib)
set(MOO_GTK_DIR /usr)
set(PYGOBJECT_DEFS_DIR ${MOO_GTK_DIR}/share/pygobject/2.0/defs) set(PYGOBJECT_DEFS_DIR ${MOO_GTK_DIR}/share/pygobject/2.0/defs)
set(PYGTK_DEFS_DIR ${MOO_GTK_DIR}/share/pygtk/2.0/defs) set(PYGTK_DEFS_DIR ${MOO_GTK_DIR}/share/pygtk/2.0/defs)
set(PYGTK_INCLUDE_DIR "${MOO_GTK_DIR}/include/pygtk-2.0") set(PYGTK_INCLUDE_DIR "${MOO_GTK_DIR}/include/pygtk-2.0")
@ -47,14 +50,14 @@ list(APPEND built_moopython_sources
) )
if(WIN32) if(WIN32)
set(codegen_platform --platform win32) set(codegen_platform --platform win32)
endif() endif()
list(APPEND built_moopython_sources moopython/pygtk/moo.defs) list(APPEND built_moopython_sources moopython/pygtk/moo.defs)
add_custom_command(OUTPUT moopython/pygtk/moo.defs add_custom_command(OUTPUT moopython/pygtk/moo.defs
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/getoutput.py moopython/pygtk/moo.defs COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/getoutput.py moopython/pygtk/moo.defs
${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/api/gendefs.py ${CMAKE_SOURCE_DIR}/api/moo.xml ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/api/gendefs.py ${CMAKE_SOURCE_DIR}/api/moo.xml
DEPENDS ${gendefs_files} ${CMAKE_SOURCE_DIR}/api/moo.xml) DEPENDS ${gendefs_files} ${CMAKE_SOURCE_DIR}/api/moo.xml)
set(codegen_files set(codegen_files
moopython/codegen/codegen.py moopython/codegen/codegen.py

View File

@ -5,7 +5,7 @@ version=@MOO_MODULE_MAJOR_VERSION@.@MOO_MODULE_MINOR_VERSION@
[plugin] [plugin]
id=Python id=Python
name=Python _name=Python
description=Python support _description=Python support
author=Yevgen Muntyan <emuntyan@users.sourceforge.net> author=Yevgen Muntyan <emuntyan@users.sourceforge.net>
version=@MOO_VERSION@ version=@MOO_VERSION@

View File

@ -1,11 +0,0 @@
[module]
type=Python
file=python.py
version=@MOO_MODULE_MAJOR_VERSION@.@MOO_MODULE_MINOR_VERSION@
[plugin]
id=Python
_name=Python
_description=Python support
author=Yevgen Muntyan <emuntyan@users.sourceforge.net>
version=@MOO_VERSION@

View File

@ -5,7 +5,7 @@ version=@MOO_MODULE_MAJOR_VERSION@.@MOO_MODULE_MINOR_VERSION@
[plugin] [plugin]
id=Terminal id=Terminal
name=Terminal _name=Terminal
description=Terminal plugin _description=Terminal plugin
author=Yevgen Muntyan <emuntyan@users.sourceforge.net> author=Yevgen Muntyan <emuntyan@users.sourceforge.net>
version=@MOO_VERSION@ version=@MOO_VERSION@

View File

@ -1,11 +0,0 @@
[module]
type=Python
file=terminal.py
version=@MOO_MODULE_MAJOR_VERSION@.@MOO_MODULE_MINOR_VERSION@
[plugin]
id=Terminal
_name=Terminal
_description=Terminal plugin
author=Yevgen Muntyan <emuntyan@users.sourceforge.net>
version=@MOO_VERSION@

View File

@ -13,8 +13,6 @@ gendefs_files = \
moo_override_files = \ moo_override_files = \
moopython/pygtk/mooutils.override \ moopython/pygtk/mooutils.override \
moopython/pygtk/moopaned.override \
moopython/pygtk/mooedit.override \
moopython/pygtk/moo.override moopython/pygtk/moo.override
EXTRA_DIST += \ EXTRA_DIST += \

View File

@ -7,7 +7,7 @@ moo_utils_enum_headers = \
moo_sources += \ moo_sources += \
$(moo_utils_enum_headers) \ $(moo_utils_enum_headers) \
mooutils/mooarray.h \ mooutils/mooarray.h \
mooutils/mooutils-thread.c \ mooutils/mooutils-thread.cpp \
mooutils/mooutils-thread.h \ mooutils/mooutils-thread.h \
mooutils/moohistorymgr.c \ mooutils/moohistorymgr.c \
mooutils/moohistorymgr.h \ mooutils/moohistorymgr.h \
@ -49,7 +49,7 @@ moo_sources += \
mooutils/mooencodings-data.h \ mooutils/mooencodings-data.h \
mooutils/mooencodings.c \ mooutils/mooencodings.c \
mooutils/mooencodings.h \ mooutils/mooencodings.h \
mooutils/mooentry.c \ mooutils/mooentry.cpp \
mooutils/mooentry.h \ mooutils/mooentry.h \
mooutils/moofiledialog.c \ mooutils/moofiledialog.c \
mooutils/moofileicon.c \ mooutils/moofileicon.c \
@ -122,7 +122,7 @@ moo_sources += \
mooutils/mooutils-macros.h \ mooutils/mooutils-macros.h \
mooutils/mooutils-mem.h \ mooutils/mooutils-mem.h \
mooutils/mooutils-messages.h \ mooutils/mooutils-messages.h \
mooutils/mooutils-misc.c \ mooutils/mooutils-misc.cpp \
mooutils/mooutils-misc.h \ mooutils/mooutils-misc.h \
mooutils/mooutils-script.c \ mooutils/mooutils-script.c \
mooutils/mooutils-script.h \ mooutils/mooutils-script.h \

View File

@ -181,7 +181,7 @@ array_type##_sort (ArrayType *ar, GCompareFunc func) \
\ \
g_qsort_with_data (ar->elms, ar->n_elms, sizeof (*ar->elms), \ g_qsort_with_data (ar->elms, ar->n_elms, sizeof (*ar->elms), \
array_type##_gcompare_data_func, \ array_type##_gcompare_data_func, \
func); \ (gpointer) func); \
} \ } \
\ \
gssize array_type##_find (const ArrayType *ar, ElmType *elm) \ gssize array_type##_find (const ArrayType *ar, ElmType *elm) \

View File

@ -277,7 +277,7 @@ find_by_xid (GSList *windows, XID w)
for (l = windows; l != NULL; l = l->next) for (l = windows; l != NULL; l = l->next)
if (GDK_WINDOW_XID (GTK_WIDGET(l->data)->window) == w) if (GDK_WINDOW_XID (GTK_WIDGET(l->data)->window) == w)
return l->data; return (GtkWindow*) l->data;
return NULL; return NULL;
} }
@ -303,7 +303,7 @@ _moo_get_top_window (GSList *windows)
g_return_val_if_fail (windows != NULL, NULL); g_return_val_if_fail (windows != NULL, NULL);
if (!windows->next) if (!windows->next)
return windows->data; return (GtkWindow*) windows->data;
for (l = windows; l != NULL; l = l->next) for (l = windows; l != NULL; l = l->next)
{ {