mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 00:30:19 +00:00
Use a single marshal file for entire project
This commit is contained in:
@@ -62,7 +62,7 @@ endif
|
||||
noinst_PROGRAMS = make-te
|
||||
|
||||
libhexchatcommon_a_SOURCES = cfgfiles.c chanopt.c ctcp.c dcc.c hexchat.c \
|
||||
history.c ignore.c inbound.c modes.c $(msproxy_c) network.c notify.c \
|
||||
history.c ignore.c inbound.c marshal.c modes.c $(msproxy_c) network.c notify.c \
|
||||
outbound.c plugin.c plugin-timer.c proto-irc.c server.c servlist.c \
|
||||
$(ssl_c) text.c tree.c url.c userlist.c util.c
|
||||
libhexchatcommon_a_CFLAGS = $(LIBPROXY_CFLAGS)
|
||||
@@ -72,4 +72,13 @@ textenums.h: textevents.h
|
||||
textevents.h: textevents.in make-te
|
||||
$(AM_V_GEN) ./make-te < textevents.in > textevents.h 2> textenums.h
|
||||
|
||||
BUILT_SOURCES = textenums.h textevents.h
|
||||
marshal.h: marshalers.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_hexchat_marshal --header $(srcdir)/marshalers.list > $@
|
||||
|
||||
marshal.c: marshalers.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=_hexchat_marshal --body $(srcdir)/marshalers.list > $@
|
||||
|
||||
|
||||
BUILT_SOURCES = textenums.h textevents.h marshal.c marshal.h
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<ClInclude Include="ignore.h" />
|
||||
<ClInclude Include="inbound.h" />
|
||||
<ClInclude Include="inet.h" />
|
||||
<ClInclude Include="marshal.h" />
|
||||
<ClInclude Include="modes.h" />
|
||||
<ClInclude Include="msproxy.h" />
|
||||
<ClInclude Include="network.h" />
|
||||
@@ -56,6 +57,7 @@
|
||||
<ClCompile Include="identd.c" />
|
||||
<ClCompile Include="ignore.c" />
|
||||
<ClCompile Include="inbound.c" />
|
||||
<ClCompile Include="marshal.c" />
|
||||
<ClCompile Include="modes.c" />
|
||||
<ClCompile Include="msproxy.c" />
|
||||
<ClCompile Include="network.c" />
|
||||
@@ -156,15 +158,16 @@
|
||||
</ImportGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
<![CDATA[
|
||||
<Command><![CDATA[
|
||||
SET SOLUTIONDIR=$(SolutionDir)..\
|
||||
powershell "$(SolutionDir)..\version-template.ps1" "$(SolutionDir)..\config-win32.h.tt" "$(SolutionDir)..\config-win32.h"
|
||||
powershell "$(SolutionDir)..\version-template.ps1" "$(SolutionDir)..\win32\version.txt.tt" "$(SolutionDir)..\win32\version.txt.tmp"
|
||||
REM version.txt must be in UTF-8 without trailing newline
|
||||
powershell "[string] $content = Get-Content '$(SolutionDir)..\win32\version.txt.tmp' -Encoding UTF8; [System.IO.File]::WriteAllText('$(SolutionDir)..\win32\version.txt', $content); Remove-Item '$(SolutionDir)..\win32\version.txt.tmp';"
|
||||
]]>
|
||||
</Command>
|
||||
"$(DepsRoot)\bin\glib-genmarshal.exe" --prefix=_hexchat_marshal --header "$(ProjectDir)marshalers.list" > "$(ProjectDir)marshal.h"
|
||||
"$(DepsRoot)\bin\glib-genmarshal.exe" --prefix=_hexchat_marshal --body "$(ProjectDir)marshalers.list" > "$(ProjectDir)marshal.c"
|
||||
|
||||
]]></Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
@@ -110,6 +110,9 @@
|
||||
<ClInclude Include="typedef.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="marshal.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="cfgfiles.c">
|
||||
@@ -187,5 +190,11 @@
|
||||
<ClCompile Include="hexchat.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="marshal.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\config-win32.h.tt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -7,12 +7,10 @@ libhexchatdbus_a_SOURCES = \
|
||||
|
||||
EXTRA_DIST = \
|
||||
remote-object.xml \
|
||||
marshallers.list \
|
||||
example.py \
|
||||
org.hexchat.service.service.in
|
||||
|
||||
BUILT_SOURCES = \
|
||||
marshallers.h \
|
||||
remote-object-glue.h
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
@@ -20,15 +18,12 @@ CLEANFILES = $(BUILT_SOURCES)
|
||||
AM_CPPFLAGS = $(COMMON_CFLAGS) $(DBUS_CFLAGS)
|
||||
|
||||
noinst_PROGRAMS = example
|
||||
example_SOURCES = example.c
|
||||
example_SOURCES = example.c
|
||||
example_LDADD = $(DBUS_LIBS) $(GLIB_LIBS)
|
||||
|
||||
remote-object-glue.h: remote-object.xml
|
||||
$(AM_V_GEN) $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=remote_object --mode=glib-server --output=$@ $<
|
||||
|
||||
marshallers.h: marshallers.list
|
||||
$(AM_V_GEN) $(LIBTOOL) --mode=execute $(GLIB_GENMARSHAL) --header --body $< > $@
|
||||
|
||||
# Dbus service file
|
||||
servicedir = $(DBUS_SERVICES_DIR)
|
||||
service_in_files = org.hexchat.service.service.in
|
||||
|
||||
@@ -241,7 +241,7 @@ static gboolean remote_object_send_modes (RemoteObject *obj,
|
||||
GError **error);
|
||||
|
||||
#include "remote-object-glue.h"
|
||||
#include "marshallers.h"
|
||||
#include "../marshal.h"
|
||||
|
||||
/* Useful functions */
|
||||
|
||||
@@ -317,7 +317,7 @@ remote_object_class_init (RemoteObjectClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT_UINT,
|
||||
_hexchat_marshal_VOID__POINTER_POINTER_UINT_UINT,
|
||||
G_TYPE_NONE,
|
||||
4, G_TYPE_STRV, G_TYPE_STRV, G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
@@ -327,7 +327,7 @@ remote_object_class_init (RemoteObjectClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT_UINT,
|
||||
_hexchat_marshal_VOID__POINTER_POINTER_UINT_UINT,
|
||||
G_TYPE_NONE,
|
||||
4, G_TYPE_STRV, G_TYPE_STRV, G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
@@ -337,7 +337,7 @@ remote_object_class_init (RemoteObjectClass *klass)
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT_UINT,
|
||||
_hexchat_marshal_VOID__POINTER_POINTER_UINT_UINT,
|
||||
G_TYPE_NONE,
|
||||
3, G_TYPE_STRV, G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <config.h>
|
||||
#include <dbus/dbus-glib.h>
|
||||
#include <stdlib.h>
|
||||
#include "marshallers.h"
|
||||
#include "../marshal.c"
|
||||
|
||||
#define DBUS_SERVICE "org.hexchat.service"
|
||||
#define DBUS_REMOTE "/org/hexchat/Remote"
|
||||
@@ -159,7 +159,7 @@ main (int argc, char **argv)
|
||||
g_print ("Server hook id=%d\n", server_id);
|
||||
|
||||
dbus_g_object_register_marshaller (
|
||||
g_cclosure_user_marshal_VOID__POINTER_POINTER_UINT_UINT,
|
||||
_hexchat_marshal_VOID__POINTER_POINTER_UINT_UINT,
|
||||
G_TYPE_NONE,
|
||||
G_TYPE_STRV, G_TYPE_STRV, G_TYPE_UINT, G_TYPE_UINT,
|
||||
G_TYPE_INVALID);
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
VOID:POINTER,POINTER,UINT,UINT
|
||||
8
src/common/marshalers.list
Normal file
8
src/common/marshalers.list
Normal file
@@ -0,0 +1,8 @@
|
||||
# xtext
|
||||
VOID:OBJECT,OBJECT
|
||||
VOID:POINTER,POINTER
|
||||
# sexy-entry
|
||||
BOOLEAN:STRING
|
||||
OBJECT:OBJECT,OBJECT
|
||||
# dbus-plugin & dbus-example
|
||||
VOID:POINTER,POINTER,UINT,UINT
|
||||
Reference in New Issue
Block a user