From ebe887ed03623b97508eb5a6959ba043fd2faa19 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 4 Feb 2008 00:16:33 +0000 Subject: [PATCH] added console IPC sample (part of patch 1833150) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51537 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 20 +- configure.in | 3 + samples/ipc/Makefile.in | 112 +++- samples/ipc/baseclient.cpp | 306 +++++++++ samples/ipc/baseserver.cpp | 329 ++++++++++ samples/ipc/ipc.bkl | 24 +- samples/ipc/ipc_baseipcclient.dsp | 243 +++++++ samples/ipc/ipc_baseipcserver.dsp | 243 +++++++ samples/ipc/ipc_vc7_baseipcclient.vcproj | 636 ++++++++++++++++++ samples/ipc/ipc_vc7_baseipcserver.vcproj | 636 ++++++++++++++++++ samples/ipc/ipc_vc8_baseipcclient.vcproj | 795 +++++++++++++++++++++++ samples/ipc/ipc_vc8_baseipcserver.vcproj | 795 +++++++++++++++++++++++ samples/ipc/makefile.bcc | 164 +++-- samples/ipc/makefile.gcc | 140 ++-- samples/ipc/makefile.unx | 24 +- samples/ipc/makefile.vc | 206 ++++-- samples/ipc/makefile.wat | 148 +++-- 17 files changed, 4561 insertions(+), 263 deletions(-) create mode 100644 samples/ipc/baseclient.cpp create mode 100644 samples/ipc/baseserver.cpp create mode 100644 samples/ipc/ipc_baseipcclient.dsp create mode 100644 samples/ipc/ipc_baseipcserver.dsp create mode 100644 samples/ipc/ipc_vc7_baseipcclient.vcproj create mode 100644 samples/ipc/ipc_vc7_baseipcserver.vcproj create mode 100644 samples/ipc/ipc_vc8_baseipcclient.vcproj create mode 100644 samples/ipc/ipc_vc8_baseipcserver.vcproj diff --git a/configure b/configure index 119a5cf971..90f34a391d 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 51251 2008-01-16 16:09:00Z SC . +# From configure.in Id: configure.in 51259 2008-01-17 05:17:24Z PC . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0. # @@ -871,6 +871,7 @@ COND_PLATFORM_MACOSX_1_TOOLKIT_X11 COND_PLATFORM_MACOSX_1_USE_GUI_1 COND_PLATFORM_MACOSX_1_USE_SOVERSION_1 COND_PLATFORM_MACOS_1 +COND_PLATFORM_MAC_0 COND_PLATFORM_MAC_1 COND_PLATFORM_MSDOS_0 COND_PLATFORM_MSDOS_1 @@ -46403,6 +46404,9 @@ else if test "$wxUSE_SOCKETS" = "yes" ; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets" fi + if test "$wxUSE_IPC" = "yes" ; then + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ipc" + fi fi @@ -48638,7 +48642,7 @@ fi BAKEFILE_BAKEFILE_M4_VERSION="0.2.2" -BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.2" +BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.3" @@ -49164,6 +49168,11 @@ EOF COND_PLATFORM_MACOS_1="" fi + COND_PLATFORM_MAC_0="#" + if test "x$PLATFORM_MAC" = "x0" ; then + COND_PLATFORM_MAC_0="" + fi + COND_PLATFORM_MAC_1="#" if test "x$PLATFORM_MAC" = "x1" ; then COND_PLATFORM_MAC_1="" @@ -51107,6 +51116,7 @@ COND_PLATFORM_MACOSX_1_TOOLKIT_X11!$COND_PLATFORM_MACOSX_1_TOOLKIT_X11$ac_delim COND_PLATFORM_MACOSX_1_USE_GUI_1!$COND_PLATFORM_MACOSX_1_USE_GUI_1$ac_delim COND_PLATFORM_MACOSX_1_USE_SOVERSION_1!$COND_PLATFORM_MACOSX_1_USE_SOVERSION_1$ac_delim COND_PLATFORM_MACOS_1!$COND_PLATFORM_MACOS_1$ac_delim +COND_PLATFORM_MAC_0!$COND_PLATFORM_MAC_0$ac_delim COND_PLATFORM_MAC_1!$COND_PLATFORM_MAC_1$ac_delim COND_PLATFORM_MSDOS_0!$COND_PLATFORM_MSDOS_0$ac_delim COND_PLATFORM_MSDOS_1!$COND_PLATFORM_MSDOS_1$ac_delim @@ -51142,7 +51152,6 @@ COND_TOOLKIT_DFB_USE_GUI_1!$COND_TOOLKIT_DFB_USE_GUI_1$ac_delim COND_TOOLKIT_GTK!$COND_TOOLKIT_GTK$ac_delim COND_TOOLKIT_GTK_TOOLKIT_VERSION_!$COND_TOOLKIT_GTK_TOOLKIT_VERSION_$ac_delim COND_TOOLKIT_GTK_TOOLKIT_VERSION_2!$COND_TOOLKIT_GTK_TOOLKIT_VERSION_2$ac_delim -COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1!$COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -51184,6 +51193,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1!$COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1$ac_delim COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0!$COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0$ac_delim COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_WXUNIV_0!$COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_WXUNIV_0$ac_delim COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1!$COND_TOOLKIT_GTK_TOOLKIT_VERSION__USE_GUI_1$ac_delim @@ -51280,7 +51290,6 @@ WX_VERSION_TAG!$WX_VERSION_TAG$ac_delim RESCOMP!$RESCOMP$ac_delim RESFLAGS!$RESFLAGS$ac_delim RESPROGRAMOBJ!$RESPROGRAMOBJ$ac_delim -WX_RESOURCES_MACOSX_ASCII!$WX_RESOURCES_MACOSX_ASCII$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -51322,6 +51331,7 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +WX_RESOURCES_MACOSX_ASCII!$WX_RESOURCES_MACOSX_ASCII$ac_delim WX_RESOURCES_MACOSX_DATA!$WX_RESOURCES_MACOSX_DATA$ac_delim LIBWXMACRES!$LIBWXMACRES$ac_delim POSTLINK_COMMAND!$POSTLINK_COMMAND$ac_delim @@ -51333,7 +51343,7 @@ LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 10; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/configure.in b/configure.in index 3fb37d26b4..7db5767d29 100644 --- a/configure.in +++ b/configure.in @@ -7241,6 +7241,9 @@ else if test "$wxUSE_SOCKETS" = "yes" ; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets" fi + if test "$wxUSE_IPC" = "yes" ; then + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS ipc" + fi fi diff --git a/samples/ipc/Makefile.in b/samples/ipc/Makefile.in index d2d47dbb27..986fceb13d 100644 --- a/samples/ipc/Makefile.in +++ b/samples/ipc/Makefile.in @@ -60,6 +60,18 @@ IPCSERVER_OBJECTS = \ $(__ipcserver___win32rc) \ $(__ipc) \ ipcserver_server.o +BASEIPCCLIENT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ + -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CXXWARNINGS) $(CPPFLAGS) \ + $(CXXFLAGS) +BASEIPCCLIENT_OBJECTS = \ + baseipcclient_baseclient.o +BASEIPCSERVER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \ + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \ + -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CXXWARNINGS) $(CPPFLAGS) \ + $(CXXFLAGS) +BASEIPCSERVER_OBJECTS = \ + baseipcserver_baseserver.o ### Conditionally set variables: ### @@ -76,6 +88,7 @@ IPCSERVER_OBJECTS = \ @COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI) @COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI) @COND_MONOLITHIC_1@EXTRALIBS_FOR_GUI = +@COND_USE_GUI_1@__ipcclient___depname = ipcclient$(EXEEXT) @COND_PLATFORM_MAC_0@__ipcclient___mac_setfilecmd = @true @COND_PLATFORM_MAC_1@__ipcclient___mac_setfilecmd = \ @COND_PLATFORM_MAC_1@ $(SETFILE) -a C ipcclient$(EXEEXT) @@ -89,6 +102,7 @@ COND_PLATFORM_OS2_1___ipcclient___os2_emxbindcmd = $(NM) ipcclient$(EXEEXT) | \ @COND_TOOLKIT_COCOA@ ipcclient.app/Contents/PkgInfo @COND_TOOLKIT_MAC@____ipcclient_BUNDLE_TGT_REF_DEP = \ @COND_TOOLKIT_MAC@ ipcclient.app/Contents/PkgInfo +@COND_USE_GUI_1@__ipcserver___depname = ipcserver$(EXEEXT) @COND_PLATFORM_MAC_0@__ipcserver___mac_setfilecmd = @true @COND_PLATFORM_MAC_1@__ipcserver___mac_setfilecmd = \ @COND_PLATFORM_MAC_1@ $(SETFILE) -a C ipcserver$(EXEEXT) @@ -102,6 +116,12 @@ COND_PLATFORM_OS2_1___ipcserver___os2_emxbindcmd = $(NM) ipcserver$(EXEEXT) | \ @COND_TOOLKIT_COCOA@ ipcserver.app/Contents/PkgInfo @COND_TOOLKIT_MAC@____ipcserver_BUNDLE_TGT_REF_DEP = \ @COND_TOOLKIT_MAC@ ipcserver.app/Contents/PkgInfo +@COND_PLATFORM_MAC_0@__baseipcclient___mac_setfilecmd = @true +@COND_PLATFORM_MAC_1@__baseipcclient___mac_setfilecmd \ +@COND_PLATFORM_MAC_1@ = $(SETFILE) -t APPL baseipcclient$(EXEEXT) +@COND_PLATFORM_MAC_0@__baseipcserver___mac_setfilecmd = @true +@COND_PLATFORM_MAC_1@__baseipcserver___mac_setfilecmd \ +@COND_PLATFORM_MAC_1@ = $(SETFILE) -t APPL baseipcserver$(EXEEXT) COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_2 = $(REZ) -d __DARWIN__ -t APPL -d \ __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) \ $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) -i $(srcdir) $(__DLLFLAG_p_0) -i \ @@ -114,21 +134,16 @@ COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_3 = $(REZ) -d __DARWIN__ -t APPL -d \ $(srcdir)/../../samples $(__RCDEFDIR_p) -i $(top_srcdir)/include -o \ ipcserver$(EXEEXT) Carbon.r sample.r @COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_3 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_3) -@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ @COND_WXUNIV_1@__WXUNIV_DEFINE_p_0 = -d __WXUNIVERSAL__ -@COND_WXUNIV_1@__WXUNIV_DEFINE_p_6 = --define __WXUNIVERSAL__ -@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS +@COND_WXUNIV_1@__WXUNIV_DEFINE_p_7 = --define __WXUNIVERSAL__ @COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_0 = -d wxNO_EXCEPTIONS -@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_6 = --define wxNO_EXCEPTIONS -@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI +@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_7 = --define wxNO_EXCEPTIONS @COND_USE_RTTI_0@__RTTI_DEFINE_p_0 = -d wxNO_RTTI -@COND_USE_RTTI_0@__RTTI_DEFINE_p_6 = --define wxNO_RTTI -@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS +@COND_USE_RTTI_0@__RTTI_DEFINE_p_7 = --define wxNO_RTTI @COND_USE_THREADS_0@__THREAD_DEFINE_p_0 = -d wxNO_THREADS -@COND_USE_THREADS_0@__THREAD_DEFINE_p_6 = --define wxNO_THREADS -@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL +@COND_USE_THREADS_0@__THREAD_DEFINE_p_7 = --define wxNO_THREADS @COND_SHARED_1@__DLLFLAG_p_0 = -d WXUSINGDLL -@COND_SHARED_1@__DLLFLAG_p_6 = --define WXUSINGDLL +@COND_SHARED_1@__DLLFLAG_p_7 = --define WXUSINGDLL @COND_TOOLKIT_MSW@__RCDEFDIR_p = -i \ @COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME) @COND_TOOLKIT_MSW@__RCDEFDIR_p_0 = --include-dir \ @@ -137,15 +152,6 @@ COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_3 = $(REZ) -d __DARWIN__ -t APPL -d \ COND_MONOLITHIC_0___WXLIB_CORE_p = \ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX) @COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p) -COND_MONOLITHIC_0___WXLIB_NET_p = \ - -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_NET_p = $(COND_MONOLITHIC_0___WXLIB_NET_p) -COND_MONOLITHIC_0___WXLIB_BASE_p = \ - -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) -@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p) -COND_MONOLITHIC_1___WXLIB_MONO_p = \ - -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) -@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \ @COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \ @COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) @@ -155,6 +161,20 @@ COND_MONOLITHIC_1___WXLIB_MONO_p = \ @COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \ @COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \ @COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) +@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ +@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS +@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI +@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS +@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL +COND_MONOLITHIC_0___WXLIB_NET_p = \ + -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_NET_p = $(COND_MONOLITHIC_0___WXLIB_NET_p) +COND_MONOLITHIC_0___WXLIB_BASE_p = \ + -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) +@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p) +COND_MONOLITHIC_1___WXLIB_MONO_p = \ + -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) +@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p) @COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \ @COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \ @@ -165,7 +185,7 @@ COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \ ### Targets: ### -all: ipcclient$(EXEEXT) $(__ipcclient_bundle___depname) ipcserver$(EXEEXT) $(__ipcserver_bundle___depname) +all: $(__ipcclient___depname) $(__ipcclient_bundle___depname) $(__ipcserver___depname) $(__ipcserver_bundle___depname) baseipcclient$(EXEEXT) baseipcserver$(EXEEXT) install: all @@ -180,18 +200,20 @@ clean: rm -rf ipcclient.app rm -f ipcserver$(EXEEXT) rm -rf ipcserver.app + rm -f baseipcclient$(EXEEXT) + rm -f baseipcserver$(EXEEXT) distclean: clean rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile -ipcclient$(EXEEXT): $(IPCCLIENT_OBJECTS) $(__ipcclient___win32rc) - $(CXX) -o $@ $(IPCCLIENT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) - $(__ipcclient___mac_rezcmd) - $(__ipcclient___mac_setfilecmd) - $(__ipcclient___os2_emxbindcmd) - $(SAMPLES_RPATH_POSTLINK) +@COND_USE_GUI_1@ipcclient$(EXEEXT): $(IPCCLIENT_OBJECTS) $(__ipcclient___win32rc) +@COND_USE_GUI_1@ $(CXX) -o $@ $(IPCCLIENT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) +@COND_USE_GUI_1@ $(__ipcclient___mac_rezcmd) +@COND_USE_GUI_1@ $(__ipcclient___mac_setfilecmd) +@COND_USE_GUI_1@ $(__ipcclient___os2_emxbindcmd) +@COND_USE_GUI_1@ $(SAMPLES_RPATH_POSTLINK) -ipcclient.app/Contents/PkgInfo: ipcclient$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns +ipcclient.app/Contents/PkgInfo: $(__ipcclient___depname) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns mkdir -p ipcclient.app/Contents mkdir -p ipcclient.app/Contents/MacOS mkdir -p ipcclient.app/Contents/Resources @@ -213,14 +235,14 @@ ipcclient.app/Contents/PkgInfo: ipcclient$(EXEEXT) $(top_srcdir)/src/mac/carbon/ @COND_PLATFORM_MACOSX_1@ipcclient_bundle: $(____ipcclient_BUNDLE_TGT_REF_DEP) -ipcserver$(EXEEXT): $(IPCSERVER_OBJECTS) $(__ipcserver___win32rc) - $(CXX) -o $@ $(IPCSERVER_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) - $(__ipcserver___mac_rezcmd) - $(__ipcserver___mac_setfilecmd) - $(__ipcserver___os2_emxbindcmd) - $(SAMPLES_RPATH_POSTLINK) +@COND_USE_GUI_1@ipcserver$(EXEEXT): $(IPCSERVER_OBJECTS) $(__ipcserver___win32rc) +@COND_USE_GUI_1@ $(CXX) -o $@ $(IPCSERVER_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) +@COND_USE_GUI_1@ $(__ipcserver___mac_rezcmd) +@COND_USE_GUI_1@ $(__ipcserver___mac_setfilecmd) +@COND_USE_GUI_1@ $(__ipcserver___os2_emxbindcmd) +@COND_USE_GUI_1@ $(SAMPLES_RPATH_POSTLINK) -ipcserver.app/Contents/PkgInfo: ipcserver$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns +ipcserver.app/Contents/PkgInfo: $(__ipcserver___depname) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns mkdir -p ipcserver.app/Contents mkdir -p ipcserver.app/Contents/MacOS mkdir -p ipcserver.app/Contents/Resources @@ -242,18 +264,36 @@ ipcserver.app/Contents/PkgInfo: ipcserver$(EXEEXT) $(top_srcdir)/src/mac/carbon/ @COND_PLATFORM_MACOSX_1@ipcserver_bundle: $(____ipcserver_BUNDLE_TGT_REF_DEP) +baseipcclient$(EXEEXT): $(BASEIPCCLIENT_OBJECTS) + $(CXX) -o $@ $(BASEIPCCLIENT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) + + $(__baseipcclient___mac_setfilecmd) + $(SAMPLES_RPATH_POSTLINK) + +baseipcserver$(EXEEXT): $(BASEIPCSERVER_OBJECTS) + $(CXX) -o $@ $(BASEIPCSERVER_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) + + $(__baseipcserver___mac_setfilecmd) + $(SAMPLES_RPATH_POSTLINK) + ipcclient_sample_rc.o: $(srcdir)/../../samples/sample.rc - $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_6) $(__EXCEPTIONS_DEFINE_p_6) $(__RTTI_DEFINE_p_6) $(__THREAD_DEFINE_p_6) --include-dir $(srcdir) $(__DLLFLAG_p_6) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_0) --include-dir $(top_srcdir)/include + $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_7) $(__EXCEPTIONS_DEFINE_p_7) $(__RTTI_DEFINE_p_7) $(__THREAD_DEFINE_p_7) --include-dir $(srcdir) $(__DLLFLAG_p_7) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_0) --include-dir $(top_srcdir)/include ipcclient_client.o: $(srcdir)/client.cpp $(CXXC) -c -o $@ $(IPCCLIENT_CXXFLAGS) $(srcdir)/client.cpp ipcserver_sample_rc.o: $(srcdir)/../../samples/sample.rc - $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_6) $(__EXCEPTIONS_DEFINE_p_6) $(__RTTI_DEFINE_p_6) $(__THREAD_DEFINE_p_6) --include-dir $(srcdir) $(__DLLFLAG_p_6) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_0) --include-dir $(top_srcdir)/include + $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_7) $(__EXCEPTIONS_DEFINE_p_7) $(__RTTI_DEFINE_p_7) $(__THREAD_DEFINE_p_7) --include-dir $(srcdir) $(__DLLFLAG_p_7) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_0) --include-dir $(top_srcdir)/include ipcserver_server.o: $(srcdir)/server.cpp $(CXXC) -c -o $@ $(IPCSERVER_CXXFLAGS) $(srcdir)/server.cpp +baseipcclient_baseclient.o: $(srcdir)/baseclient.cpp + $(CXXC) -c -o $@ $(BASEIPCCLIENT_CXXFLAGS) $(srcdir)/baseclient.cpp + +baseipcserver_baseserver.o: $(srcdir)/baseserver.cpp + $(CXXC) -c -o $@ $(BASEIPCSERVER_CXXFLAGS) $(srcdir)/baseserver.cpp + # Include dependency info, if present: @IF_GNU_MAKE@-include .deps/*.d diff --git a/samples/ipc/baseclient.cpp b/samples/ipc/baseclient.cpp new file mode 100644 index 0000000000..91c887b709 --- /dev/null +++ b/samples/ipc/baseclient.cpp @@ -0,0 +1,306 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: samples/ipc/baseclient.cpp +// Purpose: IPC sample: console client +// Author: Anders Larsen +// Most of the code was stolen from: samples/ipc/client.cpp +// (c) Julian Smart, Jurgen Doornik +// Created: 2007-11-08 +// RCS-ID: $Id$ +// Copyright: (c) 2007 Anders Larsen +// License: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +// Settings common to both executables: determines whether +// we're using TCP/IP or real DDE. +#include "ipcsetup.h" + +#include "wx/timer.h" +#include "wx/datetime.h" + +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- + + +// Define a new application +class MyClient; +class MyConnection; + +class MyApp: public wxApp +{ +public: + virtual bool OnInit(); + virtual int OnExit(); + +protected: + MyClient *m_client; +}; + +class MyConnection: public wxConnection +{ +public: + MyConnection(); + virtual ~MyConnection(); + virtual bool DoExecute(const void *data, size_t size, wxIPCFormat format); + virtual const void *Request(const wxString& item, size_t *size = NULL, wxIPCFormat format = wxIPC_TEXT); + virtual bool DoPoke(const wxString& item, const void* data, size_t size, wxIPCFormat format); + virtual bool OnAdvise(const wxString& topic, const wxString& item, const void *data, size_t size, wxIPCFormat format); + virtual bool OnDisconnect(); + +protected: + void Log(const wxString& command, const wxString& topic, + const wxString& item, const void *data, size_t size, wxIPCFormat format); +}; + +class MyClient: public wxClient, public wxTimer +{ +public: + MyClient(); + virtual ~MyClient(); + bool Connect(const wxString& sHost, const wxString& sService, const wxString& sTopic); + void Disconnect(); + wxConnectionBase *OnMakeConnection(); + bool IsConnected() { return m_connection != NULL; }; + virtual void Notify(); + +protected: + MyConnection *m_connection; + int m_step; +}; + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_APP(MyApp) + +// ---------------------------------------------------------------------------- +// MyApp +// ---------------------------------------------------------------------------- + +// The `main program' equivalent, creating the windows and returning the +// main frame +bool MyApp::OnInit() +{ + if ( !wxApp::OnInit() ) + return false; + + delete wxLog::SetActiveTarget(new wxLogStderr); + + // Create a new client + m_client = new MyClient; + bool retval = m_client->Connect("localhost", "4242", "IPC TEST"); + + wxLogMessage(_T("Client host=\"localhost\" port=\"4242\" topic=\"IPC TEST\" %s"), + retval ? _T("connected") : _T("failed to connect")); + + return retval; +} + +int MyApp::OnExit() +{ + delete m_client; + + return 0; +} + +// ---------------------------------------------------------------------------- +// MyClient +// ---------------------------------------------------------------------------- + +MyClient::MyClient() : wxClient() +{ + m_connection = NULL; + m_step = 0; +} + +bool MyClient::Connect(const wxString& sHost, const wxString& sService, const wxString& sTopic) +{ + // suppress the log messages from MakeConnection() + wxLogNull nolog; + + m_connection = (MyConnection *)MakeConnection(sHost, sService, sTopic); + if (m_connection) + Start(1000, false); + return m_connection != NULL; +} + +wxConnectionBase *MyClient::OnMakeConnection() +{ + return new MyConnection; +} + +void MyClient::Disconnect() +{ + if (m_connection) + { + m_connection->Disconnect(); + delete m_connection; + m_connection = NULL; + wxLogMessage(_T("Client disconnected from server")); + } + wxGetApp().ExitMainLoop(); +} + +MyClient::~MyClient() +{ + Disconnect(); +} + +void MyClient::Notify() +{ + switch (m_step++) + { + case 0: + { + size_t size; + m_connection->Request(_T("Date")); + m_connection->Request(_T("Date+len"), &size); + m_connection->Request(_T("bytes[3]"), &size, wxIPC_PRIVATE); + break; + } + case 1: + { + wxString s = wxDateTime::Now().Format(); + m_connection->Poke(_T("Date"), s); + s = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate(); + m_connection->Poke(_T("Date"), (const char *)s.c_str(), s.length() + 1); + char bytes[3]; + bytes[0] = '1'; bytes[1] = '2'; bytes[2] = '3'; + m_connection->Poke(_T("bytes[3]"), bytes, 3, wxIPC_PRIVATE); + break; + } + case 2: + { + wxString s = _T("Date"); + m_connection->Execute(s); + m_connection->Execute((const char *)s.c_str(), s.length() + 1); +#if wxUSE_DDE_FOR_IPC + wxLogMessage(_T("DDE Execute can only be used to send text strings, not arbitrary data.\nThe type argument will be ignored, text truncated, converted to Unicode and null terminated.")); +#endif + char bytes[3]; + bytes[0] = '1'; bytes[1] = '2'; bytes[2] = '3'; + m_connection->Execute(bytes, 3, wxIPC_PRIVATE); + break; + } + case 3: + wxLogMessage(_T("StartAdvise(\"something\")")); + m_connection->StartAdvise(_T("something")); + break; + case 10: + wxLogMessage(_T("StopAdvise(\"something\")")); + m_connection->StopAdvise(_T("something")); + break; + case 15: + Disconnect(); + break; + } +} + +// ---------------------------------------------------------------------------- +// MyConnection +// ---------------------------------------------------------------------------- + +MyConnection::MyConnection() +{ +} + +MyConnection::~MyConnection() +{ +} + +void MyConnection::Log(const wxString& command, const wxString& topic, + const wxString& item, const void *data, size_t size, wxIPCFormat format) +{ + wxString s; + if (topic.IsEmpty() && item.IsEmpty()) + s.Printf(_T("%s("), command.c_str()); + else if (topic.IsEmpty()) + s.Printf(_T("%s(item=\"%s\","), command.c_str(), item.c_str()); + else if (item.IsEmpty()) + s.Printf(_T("%s(topic=\"%s\","), command.c_str(), topic.c_str()); + else + s.Printf(_T("%s(topic=\"%s\",item=\"%s\","), command.c_str(), topic.c_str(), item.c_str()); + + switch (format) + { + case wxIPC_TEXT: + case wxIPC_UTF8TEXT: +#if !wxUSE_UNICODE || wxUSE_UNICODE_UTF8 + wxLogMessage(_T("%s\"%s\",%d)"), s.c_str(), data, size); +#else + wxLogMessage(_T("%s\"%s\",%d)"), s.c_str(), wxConvUTF8.cMB2WC((const char*)data), size); +#endif + break; + case wxIPC_PRIVATE: + if (size == 3) + { + char *bytes = (char *)data; + wxLogMessage(_T("%s'%c%c%c',%d)"), s.c_str(), bytes[0], bytes[1], bytes[2], size); + } + else + wxLogMessage(_T("%s...,%d)"), s.c_str(), size); + break; + case wxIPC_INVALID: + wxLogMessage(_T("%s[invalid data],%d)"), s.c_str(), size); + break; + default: + wxLogMessage(_T("%s[unknown data],%d)"), s.c_str(), size); + break; + } +} + +bool MyConnection::OnAdvise(const wxString& topic, const wxString& item, const void *data, + size_t size, wxIPCFormat format) +{ + Log(_T("OnAdvise"), topic, item, data, size, format); + return true; +} + +bool MyConnection::OnDisconnect() +{ + wxLogMessage(_T("OnDisconnect()")); + wxGetApp().ExitMainLoop(); + return true; +} + +bool MyConnection::DoExecute(const void *data, size_t size, wxIPCFormat format) +{ + Log(_T("Execute"), wxEmptyString, wxEmptyString, data, size, format); + bool retval = wxConnection::DoExecute(data, size, format); + if (!retval) + wxLogMessage(_T("Execute failed!")); + return retval; +} + +const void *MyConnection::Request(const wxString& item, size_t *size, wxIPCFormat format) +{ + const void *data = wxConnection::Request(item, size, format); + Log(_T("Request"), wxEmptyString, item, data, size ? *size : wxNO_LEN, format); + return data; +} + +bool MyConnection::DoPoke(const wxString& item, const void *data, size_t size, wxIPCFormat format) +{ + Log(_T("Poke"), wxEmptyString, item, data, size, format); + return wxConnection::DoPoke(item, data, size, format); +} diff --git a/samples/ipc/baseserver.cpp b/samples/ipc/baseserver.cpp new file mode 100644 index 0000000000..ee900de13f --- /dev/null +++ b/samples/ipc/baseserver.cpp @@ -0,0 +1,329 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: samples/ipc/baseserver.cpp +// Purpose: IPC sample: console server +// Author: Anders Larsen +// Most of the code was stolen from: samples/ipc/server.cpp +// (c) Julian Smart, Jurgen Doornik +// Created: 2007-11-08 +// RCS-ID: $Id$ +// Copyright: (c) 2007 Anders Larsen +// License: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +// Settings common to both executables: determines whether +// we're using TCP/IP or real DDE. +#include "ipcsetup.h" + +#include "wx/timer.h" +#include "wx/datetime.h" + +// ---------------------------------------------------------------------------- +// wxWin macros +// ---------------------------------------------------------------------------- + +// Define a new application +class MyServer; +class MyConnection; + +class MyApp : public wxApp +{ +public: + virtual bool OnInit(); + virtual int OnExit(); + +protected: + MyServer *m_server; +}; + +DECLARE_APP(MyApp) + +class MyConnection : public wxConnection, public wxTimer +{ +public: + MyConnection(); + virtual ~MyConnection(); + + virtual bool Disconnect() { return wxConnection::Disconnect(); } + virtual bool OnExecute(const wxString& topic, const void *data, size_t size, wxIPCFormat format); + virtual const void *OnRequest(const wxString& topic, const wxString& item, size_t *size, wxIPCFormat format); + virtual bool OnPoke(const wxString& topic, const wxString& item, const void *data, size_t size, wxIPCFormat format); + virtual bool OnStartAdvise(const wxString& topic, const wxString& item); + virtual bool OnStopAdvise(const wxString& topic, const wxString& item); + virtual bool DoAdvise(const wxString& item, const void *data, size_t size, wxIPCFormat format); + virtual bool OnDisconnect(); + virtual void Notify(); + +protected: + void Log(const wxString& command, const wxString& topic, const wxString& item, const void *data, size_t size, wxIPCFormat format); + +public: + wxString m_sAdvise; + +protected: + wxString m_sRequestDate; + char m_achRequestBytes[3]; +}; + +class MyServer: public wxServer +{ +public: + MyServer(); + virtual ~MyServer(); + void Disconnect(); + bool IsConnected() { return m_connection != NULL; }; + MyConnection *GetConnection() { return m_connection; }; + wxConnectionBase *OnAcceptConnection(const wxString& topic); + +protected: + MyConnection *m_connection; +}; + +// ============================================================================ +// implementation +// ============================================================================ + +IMPLEMENT_APP(MyApp) + +// ---------------------------------------------------------------------------- +// MyApp +// ---------------------------------------------------------------------------- + +bool MyApp::OnInit() +{ + if ( !wxApp::OnInit() ) + return false; + + delete wxLog::SetActiveTarget(new wxLogStderr); + + // Create a new server + m_server = new MyServer; + if (m_server->Create("4242")) + { + wxLogMessage(_T("Server 4242 started")); +#if wxUSE_DDE_FOR_IPC + wxLogMessage(_T("Server uses DDE")); +#else // !wxUSE_DDE_FOR_IPC + wxLogMessage(_T("Server uses TCP")); +#endif // wxUSE_DDE_FOR_IPC/!wxUSE_DDE_FOR_IPC + return true; + } + else + { + wxLogMessage(_T("Server 4242 failed to start")); + delete m_server; + return false; + } +} + +int MyApp::OnExit() +{ + return 0; +} + +// ---------------------------------------------------------------------------- +// MyServer +// ---------------------------------------------------------------------------- + +MyServer::MyServer() +{ + m_connection = NULL; +} + +MyServer::~MyServer() +{ + Disconnect(); +} + +wxConnectionBase *MyServer::OnAcceptConnection(const wxString& topic) +{ + wxLogMessage(_T("OnAcceptConnection(\"%s\")"), topic.c_str()); + + if ( topic == IPC_TOPIC ) + { + m_connection = new MyConnection; + wxLogMessage(_T("Connection accepted")); + return m_connection; + } + // unknown topic + return NULL; +} + +void MyServer::Disconnect() +{ + if (m_connection) + { + m_connection->Disconnect(); + delete m_connection; + m_connection = NULL; + wxLogMessage(_T("Disconnected client")); + } +} + +// ---------------------------------------------------------------------------- +// MyConnection +// ---------------------------------------------------------------------------- + +MyConnection::MyConnection() +{ +} + +MyConnection::~MyConnection() +{ +} + +bool MyConnection::OnExecute(const wxString& topic, + const void *data, size_t size, wxIPCFormat format) +{ + Log(_T("OnExecute"), topic, _T(""), data, size, format); + return true; +} + +bool MyConnection::OnPoke(const wxString& topic, + const wxString& item, const void *data, size_t size, wxIPCFormat format) +{ + Log(_T("OnPoke"), topic, item, data, size, format); + return wxConnection::OnPoke(topic, item, data, size, format); +} + +const void *MyConnection::OnRequest(const wxString& topic, + const wxString& item, size_t *size, wxIPCFormat format) +{ + const void *data; + if (item == _T("Date")) + { + m_sRequestDate = wxDateTime::Now().Format(); + data = m_sRequestDate.c_str(); + *size = wxNO_LEN; + } + else if (item == _T("Date+len")) + { + m_sRequestDate = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate(); + data = m_sRequestDate.c_str(); + *size = m_sRequestDate.Length() + 1; + } + else if (item == _T("bytes[3]")) + { + data = m_achRequestBytes; + m_achRequestBytes[0] = '1'; m_achRequestBytes[1] = '2'; m_achRequestBytes[2] = '3'; + *size = 3; + } + else + { + data = NULL; + *size = 0; + } + Log(_T("OnRequest"), topic, item, data, *size, format); + return data; +} + +bool MyConnection::OnStartAdvise(const wxString& topic, + const wxString& item) +{ + wxLogMessage(_T("OnStartAdvise(\"%s\",\"%s\")"), topic.c_str(), item.c_str()); + wxLogMessage(_T("Returning true")); + m_sAdvise = item; + Start(3000, false); + return true; +} + +bool MyConnection::OnStopAdvise(const wxString& topic, + const wxString& item) +{ + wxLogMessage(_T("OnStopAdvise(\"%s\",\"%s\")"), topic.c_str(), item.c_str()); + wxLogMessage(_T("Returning true")); + m_sAdvise.Empty(); + Stop(); + return true; +} + +void MyConnection::Notify() +{ + if (!m_sAdvise.IsEmpty()) + { + wxString s = wxDateTime::Now().Format(); + Advise(m_sAdvise, s); + s = wxDateTime::Now().FormatTime() + _T(" ") + wxDateTime::Now().FormatDate(); + Advise(m_sAdvise, (const char *)s.c_str(), s.Length() + 1); + +#if wxUSE_DDE_FOR_IPC + wxLogMessage(_T("DDE Advise type argument cannot be wxIPC_PRIVATE. The client will receive it as wxIPC_TEXT, and receive the correct no of bytes, but not print a correct log entry.")); +#endif + char bytes[3]; + bytes[0] = '1'; bytes[1] = '2'; bytes[2] = '3'; + Advise(m_sAdvise, bytes, 3, wxIPC_PRIVATE); + // this works, but the log treats it as a string now +// m_connection->Advise(m_connection->m_sAdvise, bytes, 3, wxIPC_TEXT ); + } +} + +void MyConnection::Log(const wxString& command, const wxString& topic, + const wxString& item, const void *data, size_t size, wxIPCFormat format) +{ + wxString s; + if (topic.IsEmpty() && item.IsEmpty()) + s.Printf(_T("%s("), command.c_str()); + else if (topic.IsEmpty()) + s.Printf(_T("%s(\"%s\","), command.c_str(), item.c_str()); + else if (item.IsEmpty()) + s.Printf(_T("%s(\"%s\","), command.c_str(), topic.c_str()); + else + s.Printf(_T("%s(\"%s\",\"%s\","), command.c_str(), topic.c_str(), item.c_str()); + + switch (format) + { + case wxIPC_TEXT: + case wxIPC_UTF8TEXT: +#if !wxUSE_UNICODE || wxUSE_UNICODE_UTF8 + wxLogMessage(_T("%s\"%s\",%d)"), s.c_str(), data, size); +#else + wxLogMessage(_T("%s\"%s\",%d)"), s.c_str(), wxConvUTF8.cMB2WC((const char*)data), size); +#endif + break; + case wxIPC_PRIVATE: + if (size == 3) + { + char *bytes = (char *)data; + wxLogMessage(_T("%s'%c%c%c',%d)"), s.c_str(), bytes[0], bytes[1], bytes[2], size); + } + else + wxLogMessage(_T("%s...,%d)"), s.c_str(), size); + break; + case wxIPC_INVALID: + wxLogMessage(_T("%s[invalid data],%d)"), s.c_str(), size); + break; + default: + wxLogMessage(_T("%s[unknown data],%d)"), s.c_str(), size); + break; + } +} + +bool MyConnection::DoAdvise(const wxString& item, const void *data, size_t size, wxIPCFormat format) +{ + Log(_T("Advise"), _T(""), item, data, size, format); + return wxConnection::DoAdvise(item, data, size, format); +} + +bool MyConnection::OnDisconnect() +{ + wxLogMessage(_T("OnDisconnect()")); + return true; +} diff --git a/samples/ipc/ipc.bkl b/samples/ipc/ipc.bkl index 6d840e0300..52f95f6d40 100644 --- a/samples/ipc/ipc.bkl +++ b/samples/ipc/ipc.bkl @@ -3,18 +3,38 @@ - + + + 1 + + + USE_GUI=='1' + + + client.cpp core net base - + server.cpp core net base + + baseclient.cpp + net + base + + + + baseserver.cpp + net + base + + diff --git a/samples/ipc/ipc_baseipcclient.dsp b/samples/ipc/ipc_baseipcclient.dsp new file mode 100644 index 0000000000..e6a203d41c --- /dev/null +++ b/samples/ipc/ipc_baseipcclient.dsp @@ -0,0 +1,243 @@ +# Microsoft Developer Studio Project File - Name="ipc_baseipcclient" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=baseipcclient - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ipc_baseipcclient.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ipc_baseipcclient.mak" CFG="baseipcclient - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "baseipcclient - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcclient - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcclient - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcclient - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcclient - Win32 Universal Release" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcclient - Win32 Universal Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcclient - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcclient - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "baseipcclient - Win32 DLL Universal Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswunivudll" +# PROP BASE Intermediate_Dir "vc_mswunivudll\baseipcclient" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswunivudll" +# PROP Intermediate_Dir "vc_mswunivudll\baseipcclient" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\baseipcclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\baseipcclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\baseipcclient.exe" /debug /pdb:"vc_mswunivudll\baseipcclient.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console +# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\baseipcclient.exe" /debug /pdb:"vc_mswunivudll\baseipcclient.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcclient - Win32 DLL Universal Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswunivuddll" +# PROP BASE Intermediate_Dir "vc_mswunivuddll\baseipcclient" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswunivuddll" +# PROP Intermediate_Dir "vc_mswunivuddll\baseipcclient" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\baseipcclient.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\baseipcclient.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\baseipcclient.exe" /debug /pdb:"vc_mswunivuddll\baseipcclient.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console +# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\baseipcclient.exe" /debug /pdb:"vc_mswunivuddll\baseipcclient.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcclient - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswudll" +# PROP BASE Intermediate_Dir "vc_mswudll\baseipcclient" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswudll" +# PROP Intermediate_Dir "vc_mswudll\baseipcclient" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswudll\baseipcclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswudll\baseipcclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\baseipcclient.exe" /debug /pdb:"vc_mswudll\baseipcclient.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console +# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\baseipcclient.exe" /debug /pdb:"vc_mswudll\baseipcclient.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcclient - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswuddll" +# PROP BASE Intermediate_Dir "vc_mswuddll\baseipcclient" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswuddll" +# PROP Intermediate_Dir "vc_mswuddll\baseipcclient" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\baseipcclient.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\baseipcclient.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\baseipcclient.exe" /debug /pdb:"vc_mswuddll\baseipcclient.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console +# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\baseipcclient.exe" /debug /pdb:"vc_mswuddll\baseipcclient.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcclient - Win32 Universal Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswunivu" +# PROP BASE Intermediate_Dir "vc_mswunivu\baseipcclient" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswunivu" +# PROP Intermediate_Dir "vc_mswunivu\baseipcclient" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\baseipcclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\baseipcclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\baseipcclient.exe" /debug /pdb:"vc_mswunivu\baseipcclient.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console +# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\baseipcclient.exe" /debug /pdb:"vc_mswunivu\baseipcclient.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcclient - Win32 Universal Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswunivud" +# PROP BASE Intermediate_Dir "vc_mswunivud\baseipcclient" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswunivud" +# PROP Intermediate_Dir "vc_mswunivud\baseipcclient" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\baseipcclient.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\baseipcclient.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\baseipcclient.exe" /debug /pdb:"vc_mswunivud\baseipcclient.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console +# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\baseipcclient.exe" /debug /pdb:"vc_mswunivud\baseipcclient.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcclient - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswu" +# PROP BASE Intermediate_Dir "vc_mswu\baseipcclient" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswu" +# PROP Intermediate_Dir "vc_mswu\baseipcclient" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswu\baseipcclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswu\baseipcclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\baseipcclient.exe" /debug /pdb:"vc_mswu\baseipcclient.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console +# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\baseipcclient.exe" /debug /pdb:"vc_mswu\baseipcclient.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcclient - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswud" +# PROP BASE Intermediate_Dir "vc_mswud\baseipcclient" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswud" +# PROP Intermediate_Dir "vc_mswud\baseipcclient" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswud\baseipcclient.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswud\baseipcclient.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\baseipcclient.exe" /debug /pdb:"vc_mswud\baseipcclient.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console +# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\baseipcclient.exe" /debug /pdb:"vc_mswud\baseipcclient.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console + +!ENDIF + +# Begin Target + +# Name "baseipcclient - Win32 DLL Universal Release" +# Name "baseipcclient - Win32 DLL Universal Debug" +# Name "baseipcclient - Win32 DLL Release" +# Name "baseipcclient - Win32 DLL Debug" +# Name "baseipcclient - Win32 Universal Release" +# Name "baseipcclient - Win32 Universal Debug" +# Name "baseipcclient - Win32 Release" +# Name "baseipcclient - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\baseclient.cpp +# End Source File +# End Group +# End Target +# End Project + diff --git a/samples/ipc/ipc_baseipcserver.dsp b/samples/ipc/ipc_baseipcserver.dsp new file mode 100644 index 0000000000..9903bd15ea --- /dev/null +++ b/samples/ipc/ipc_baseipcserver.dsp @@ -0,0 +1,243 @@ +# Microsoft Developer Studio Project File - Name="ipc_baseipcserver" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=baseipcserver - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "ipc_baseipcserver.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "ipc_baseipcserver.mak" CFG="baseipcserver - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "baseipcserver - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcserver - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcserver - Win32 DLL Release" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcserver - Win32 DLL Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcserver - Win32 Universal Release" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcserver - Win32 Universal Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcserver - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "baseipcserver - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "baseipcserver - Win32 DLL Universal Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswunivudll" +# PROP BASE Intermediate_Dir "vc_mswunivudll\baseipcserver" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswunivudll" +# PROP Intermediate_Dir "vc_mswunivudll\baseipcserver" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\baseipcserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\baseipcserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\baseipcserver.exe" /debug /pdb:"vc_mswunivudll\baseipcserver.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console +# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\baseipcserver.exe" /debug /pdb:"vc_mswunivudll\baseipcserver.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcserver - Win32 DLL Universal Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswunivuddll" +# PROP BASE Intermediate_Dir "vc_mswunivuddll\baseipcserver" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswunivuddll" +# PROP Intermediate_Dir "vc_mswunivuddll\baseipcserver" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\baseipcserver.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\baseipcserver.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\baseipcserver.exe" /debug /pdb:"vc_mswunivuddll\baseipcserver.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console +# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\baseipcserver.exe" /debug /pdb:"vc_mswunivuddll\baseipcserver.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcserver - Win32 DLL Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswudll" +# PROP BASE Intermediate_Dir "vc_mswudll\baseipcserver" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswudll" +# PROP Intermediate_Dir "vc_mswudll\baseipcserver" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswudll\baseipcserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswudll\baseipcserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\baseipcserver.exe" /debug /pdb:"vc_mswudll\baseipcserver.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console +# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\baseipcserver.exe" /debug /pdb:"vc_mswudll\baseipcserver.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcserver - Win32 DLL Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswuddll" +# PROP BASE Intermediate_Dir "vc_mswuddll\baseipcserver" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswuddll" +# PROP Intermediate_Dir "vc_mswuddll\baseipcserver" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\baseipcserver.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\baseipcserver.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\baseipcserver.exe" /debug /pdb:"vc_mswuddll\baseipcserver.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console +# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\baseipcserver.exe" /debug /pdb:"vc_mswuddll\baseipcserver.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcserver - Win32 Universal Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswunivu" +# PROP BASE Intermediate_Dir "vc_mswunivu\baseipcserver" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswunivu" +# PROP Intermediate_Dir "vc_mswunivu\baseipcserver" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\baseipcserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\baseipcserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\baseipcserver.exe" /debug /pdb:"vc_mswunivu\baseipcserver.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console +# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\baseipcserver.exe" /debug /pdb:"vc_mswunivu\baseipcserver.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcserver - Win32 Universal Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswunivud" +# PROP BASE Intermediate_Dir "vc_mswunivud\baseipcserver" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswunivud" +# PROP Intermediate_Dir "vc_mswunivud\baseipcserver" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\baseipcserver.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\baseipcserver.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\baseipcserver.exe" /debug /pdb:"vc_mswunivud\baseipcserver.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console +# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\baseipcserver.exe" /debug /pdb:"vc_mswunivud\baseipcserver.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcserver - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswu" +# PROP BASE Intermediate_Dir "vc_mswu\baseipcserver" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswu" +# PROP Intermediate_Dir "vc_mswu\baseipcserver" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswu\baseipcserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswu\baseipcserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\baseipcserver.exe" /debug /pdb:"vc_mswu\baseipcserver.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console +# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\baseipcserver.exe" /debug /pdb:"vc_mswu\baseipcserver.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console + +!ELSEIF "$(CFG)" == "baseipcserver - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "vc_mswud" +# PROP BASE Intermediate_Dir "vc_mswud\baseipcserver" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "vc_mswud" +# PROP Intermediate_Dir "vc_mswud\baseipcserver" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswud\baseipcserver.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswud\baseipcserver.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\baseipcserver.exe" /debug /pdb:"vc_mswud\baseipcserver.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console +# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\baseipcserver.exe" /debug /pdb:"vc_mswud\baseipcserver.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console + +!ENDIF + +# Begin Target + +# Name "baseipcserver - Win32 DLL Universal Release" +# Name "baseipcserver - Win32 DLL Universal Debug" +# Name "baseipcserver - Win32 DLL Release" +# Name "baseipcserver - Win32 DLL Debug" +# Name "baseipcserver - Win32 Universal Release" +# Name "baseipcserver - Win32 Universal Debug" +# Name "baseipcserver - Win32 Release" +# Name "baseipcserver - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=.\baseserver.cpp +# End Source File +# End Group +# End Target +# End Project + diff --git a/samples/ipc/ipc_vc7_baseipcclient.vcproj b/samples/ipc/ipc_vc7_baseipcclient.vcproj new file mode 100644 index 0000000000..5f5df1181c --- /dev/null +++ b/samples/ipc/ipc_vc7_baseipcclient.vcproj @@ -0,0 +1,636 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/ipc/ipc_vc7_baseipcserver.vcproj b/samples/ipc/ipc_vc7_baseipcserver.vcproj new file mode 100644 index 0000000000..1f9e1abf8c --- /dev/null +++ b/samples/ipc/ipc_vc7_baseipcserver.vcproj @@ -0,0 +1,636 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/ipc/ipc_vc8_baseipcclient.vcproj b/samples/ipc/ipc_vc8_baseipcclient.vcproj new file mode 100644 index 0000000000..84802672c3 --- /dev/null +++ b/samples/ipc/ipc_vc8_baseipcclient.vcproj @@ -0,0 +1,795 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/ipc/ipc_vc8_baseipcserver.vcproj b/samples/ipc/ipc_vc8_baseipcserver.vcproj new file mode 100644 index 0000000000..66baf4e3ea --- /dev/null +++ b/samples/ipc/ipc_vc8_baseipcserver.vcproj @@ -0,0 +1,795 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/ipc/makefile.bcc b/samples/ipc/makefile.bcc index 454f46b74c..819e51f050 100644 --- a/samples/ipc/makefile.bcc +++ b/samples/ipc/makefile.bcc @@ -29,7 +29,7 @@ LIBDIRNAME = .\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG) SETUPHDIR = \ $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG) IPCCLIENT_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ - $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -I. $(__DLLFLAG_p) \ @@ -37,13 +37,29 @@ IPCCLIENT_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ IPCCLIENT_OBJECTS = \ $(OBJS)\ipcclient_client.obj IPCSERVER_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ - $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -I. $(__DLLFLAG_p) \ -I.\..\..\samples -DNOPCH $(CPPFLAGS) $(CXXFLAGS) IPCSERVER_OBJECTS = \ $(OBJS)\ipcserver_server.obj +BASEIPCCLIENT_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -I. $(__DLLFLAG_p) \ + -DwxUSE_GUI=0 $(CPPFLAGS) $(CXXFLAGS) +BASEIPCCLIENT_OBJECTS = \ + $(OBJS)\baseipcclient_baseclient.obj +BASEIPCSERVER_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \ + $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -I. $(__DLLFLAG_p) \ + -DwxUSE_GUI=0 $(CPPFLAGS) $(CXXFLAGS) +BASEIPCSERVER_OBJECTS = \ + $(OBJS)\baseipcserver_baseserver.obj ### Conditionally set variables: ### @@ -80,6 +96,58 @@ EXTRALIBS_FOR_BASE = !if "$(MONOLITHIC)" == "1" EXTRALIBS_FOR_BASE = !endif +!if "$(USE_GUI)" == "1" +__ipcclient___depname = $(OBJS)\ipcclient.exe +!endif +!if "$(USE_GUI)" == "1" +__ipcserver___depname = $(OBJS)\ipcserver.exe +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p_0 = -d__WXUNIVERSAL__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_0 = -d__WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_0 = -d__WXDEBUG__ +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p_0 = -dwxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p_0 = -dwxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p_0 = -dwxNO_THREADS +!endif +!if "$(UNICODE)" == "0" +__UNICODE_DEFINE_p_0 = -dwxUSE_UNICODE=0 +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p_0 = -d_UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p_0 = -dwxUSE_UNICODE_MSLU=1 +!endif +!if "$(USE_GDIPLUS)" == "1" +__GFXCTX_DEFINE_p_0 = -dwxUSE_GRAPHICS_CONTEXT=1 +!endif +!if "$(SHARED)" == "1" +__DLLFLAG_p_0 = -dWXUSINGDLL +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" __OPTIMIZEFLAG = -Od !endif @@ -93,10 +161,10 @@ __THREADSFLAG = __THREADSFLAG = mt !endif !if "$(USE_THREADS)" == "0" -__THREADSFLAG_0 = +__THREADSFLAG_2 = !endif !if "$(USE_THREADS)" == "1" -__THREADSFLAG_0 = -tWM +__THREADSFLAG_2 = -tWM !endif !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS = -tWR @@ -105,81 +173,44 @@ __RUNTIME_LIBS = -tWR __RUNTIME_LIBS = !endif !if "$(RUNTIME_LIBS)" == "dynamic" -__RUNTIME_LIBS_0 = i +__RUNTIME_LIBS_2 = i !endif !if "$(RUNTIME_LIBS)" == "static" -__RUNTIME_LIBS_0 = +__RUNTIME_LIBS_2 = !endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ !endif -!if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_0 = -d__WXUNIVERSAL__ -!endif !if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif !if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p = -D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" -__DEBUG_DEFINE_p_0 = -d__WXDEBUG__ -!endif -!if "$(DEBUG_FLAG)" == "1" -__DEBUG_DEFINE_p_0 = -d__WXDEBUG__ -!endif !if "$(USE_EXCEPTIONS)" == "0" __EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS !endif -!if "$(USE_EXCEPTIONS)" == "0" -__EXCEPTIONS_DEFINE_p_0 = -dwxNO_EXCEPTIONS -!endif !if "$(USE_RTTI)" == "0" __RTTI_DEFINE_p = -DwxNO_RTTI !endif -!if "$(USE_RTTI)" == "0" -__RTTI_DEFINE_p_0 = -dwxNO_RTTI -!endif !if "$(USE_THREADS)" == "0" __THREAD_DEFINE_p = -DwxNO_THREADS !endif -!if "$(USE_THREADS)" == "0" -__THREAD_DEFINE_p_0 = -dwxNO_THREADS -!endif !if "$(UNICODE)" == "0" __UNICODE_DEFINE_p = -DwxUSE_UNICODE=0 !endif !if "$(UNICODE)" == "1" __UNICODE_DEFINE_p = -D_UNICODE !endif -!if "$(UNICODE)" == "0" -__UNICODE_DEFINE_p_0 = -dwxUSE_UNICODE=0 -!endif -!if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_0 = -d_UNICODE -!endif !if "$(MSLU)" == "1" __MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1 !endif -!if "$(MSLU)" == "1" -__MSLU_DEFINE_p_0 = -dwxUSE_UNICODE_MSLU=1 -!endif !if "$(USE_GDIPLUS)" == "1" __GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1 !endif -!if "$(USE_GDIPLUS)" == "1" -__GFXCTX_DEFINE_p_0 = -dwxUSE_GRAPHICS_CONTEXT=1 -!endif !if "$(SHARED)" == "1" __DLLFLAG_p = -DWXUSINGDLL !endif -!if "$(SHARED)" == "1" -__DLLFLAG_p_0 = -dWXUSINGDLL -!endif -!if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = \ - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib -!endif !if "$(MONOLITHIC)" == "0" __WXLIB_NET_p = \ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib @@ -192,15 +223,6 @@ __WXLIB_BASE_p = \ __WXLIB_MONO_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib !endif -!if "$(USE_GUI)" == "1" -__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib -!endif -!if "$(USE_GUI)" == "1" -__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib -!endif -!if "$(USE_GUI)" == "1" -__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib -!endif !if "$(MSLU)" == "1" __UNICOWS_LIB_p = unicows.lib !endif @@ -227,7 +249,7 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\ipcclient.exe $(OBJS)\ipcserver.exe +all: $(__ipcclient___depname) $(__ipcserver___depname) $(OBJS)\baseipcclient.exe $(OBJS)\baseipcserver.exe clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -245,15 +267,41 @@ clean: -if exist $(OBJS)\ipcserver.ild del $(OBJS)\ipcserver.ild -if exist $(OBJS)\ipcserver.ilf del $(OBJS)\ipcserver.ilf -if exist $(OBJS)\ipcserver.ils del $(OBJS)\ipcserver.ils + -if exist $(OBJS)\baseipcclient.exe del $(OBJS)\baseipcclient.exe + -if exist $(OBJS)\baseipcclient.tds del $(OBJS)\baseipcclient.tds + -if exist $(OBJS)\baseipcclient.ilc del $(OBJS)\baseipcclient.ilc + -if exist $(OBJS)\baseipcclient.ild del $(OBJS)\baseipcclient.ild + -if exist $(OBJS)\baseipcclient.ilf del $(OBJS)\baseipcclient.ilf + -if exist $(OBJS)\baseipcclient.ils del $(OBJS)\baseipcclient.ils + -if exist $(OBJS)\baseipcserver.exe del $(OBJS)\baseipcserver.exe + -if exist $(OBJS)\baseipcserver.tds del $(OBJS)\baseipcserver.tds + -if exist $(OBJS)\baseipcserver.ilc del $(OBJS)\baseipcserver.ilc + -if exist $(OBJS)\baseipcserver.ild del $(OBJS)\baseipcserver.ild + -if exist $(OBJS)\baseipcserver.ilf del $(OBJS)\baseipcserver.ilf + -if exist $(OBJS)\baseipcserver.ils del $(OBJS)\baseipcserver.ils +!if "$(USE_GUI)" == "1" $(OBJS)\ipcclient.exe: $(IPCCLIENT_OBJECTS) $(OBJS)\ipcclient_sample.res ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| - c0w32.obj $(IPCCLIENT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_0).lib,, $(OBJS)\ipcclient_sample.res + c0w32.obj $(IPCCLIENT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, $(OBJS)\ipcclient_sample.res | +!endif +!if "$(USE_GUI)" == "1" $(OBJS)\ipcserver.exe: $(IPCSERVER_OBJECTS) $(OBJS)\ipcserver_sample.res ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&| - c0w32.obj $(IPCSERVER_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_0).lib,, $(OBJS)\ipcserver_sample.res + c0w32.obj $(IPCSERVER_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, $(OBJS)\ipcserver_sample.res +| +!endif + +$(OBJS)\baseipcclient.exe: $(BASEIPCCLIENT_OBJECTS) + ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap @&&| + c0x32.obj $(BASEIPCCLIENT_OBJECTS),$@,, $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, +| + +$(OBJS)\baseipcserver.exe: $(BASEIPCSERVER_OBJECTS) + ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap @&&| + c0x32.obj $(BASEIPCSERVER_OBJECTS),$@,, $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, | $(OBJS)\ipcclient_sample.res: .\..\..\samples\sample.rc @@ -268,3 +316,9 @@ $(OBJS)\ipcserver_sample.res: .\..\..\samples\sample.rc $(OBJS)\ipcserver_server.obj: .\server.cpp $(CXX) -q -c -P -o$@ $(IPCSERVER_CXXFLAGS) .\server.cpp +$(OBJS)\baseipcclient_baseclient.obj: .\baseclient.cpp + $(CXX) -q -c -P -o$@ $(BASEIPCCLIENT_CXXFLAGS) .\baseclient.cpp + +$(OBJS)\baseipcserver_baseserver.obj: .\baseserver.cpp + $(CXX) -q -c -P -o$@ $(BASEIPCSERVER_CXXFLAGS) .\baseserver.cpp + diff --git a/samples/ipc/makefile.gcc b/samples/ipc/makefile.gcc index 235a8851a9..09ee006fcd 100644 --- a/samples/ipc/makefile.gcc +++ b/samples/ipc/makefile.gcc @@ -40,6 +40,24 @@ IPCSERVER_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ IPCSERVER_OBJECTS = \ $(OBJS)\ipcserver_sample_rc.o \ $(OBJS)\ipcserver_server.o +BASEIPCCLIENT_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -W -Wall -I. \ + $(__DLLFLAG_p) -DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +BASEIPCCLIENT_OBJECTS = \ + $(OBJS)\baseipcclient_baseclient.o +BASEIPCSERVER_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \ + $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -W -Wall -I. \ + $(__DLLFLAG_p) -DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \ + -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS) +BASEIPCSERVER_OBJECTS = \ + $(OBJS)\baseipcserver_baseserver.o ### Conditionally set variables: ### @@ -81,6 +99,60 @@ endif ifeq ($(MONOLITHIC),1) EXTRALIBS_FOR_BASE = endif +ifeq ($(USE_GUI),1) +__ipcclient___depname = $(OBJS)\ipcclient.exe +endif +ifeq ($(USE_GUI),1) +__ipcserver___depname = $(OBJS)\ipcserver.exe +endif +ifeq ($(WXUNIV),1) +__WXUNIV_DEFINE_p_0 = --define __WXUNIVERSAL__ +endif +ifeq ($(BUILD),debug) +ifeq ($(DEBUG_FLAG),default) +__DEBUG_DEFINE_p_0 = --define __WXDEBUG__ +endif +endif +ifeq ($(DEBUG_FLAG),1) +__DEBUG_DEFINE_p_0 = --define __WXDEBUG__ +endif +ifeq ($(USE_EXCEPTIONS),0) +__EXCEPTIONS_DEFINE_p_0 = --define wxNO_EXCEPTIONS +endif +ifeq ($(USE_RTTI),0) +__RTTI_DEFINE_p_0 = --define wxNO_RTTI +endif +ifeq ($(USE_THREADS),0) +__THREAD_DEFINE_p_0 = --define wxNO_THREADS +endif +ifeq ($(UNICODE),0) +__UNICODE_DEFINE_p_0 = --define wxUSE_UNICODE=0 +endif +ifeq ($(UNICODE),1) +__UNICODE_DEFINE_p_0 = --define _UNICODE +endif +ifeq ($(MSLU),1) +__MSLU_DEFINE_p_0 = --define wxUSE_UNICODE_MSLU=1 +endif +ifeq ($(USE_GDIPLUS),1) +__GFXCTX_DEFINE_p_0 = --define wxUSE_GRAPHICS_CONTEXT=1 +endif +ifeq ($(SHARED),1) +__DLLFLAG_p_0 = --define WXUSINGDLL +endif +ifeq ($(MONOLITHIC),0) +__WXLIB_CORE_p = \ + -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core +endif +ifeq ($(USE_GUI),1) +__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) +endif +ifeq ($(USE_GUI),1) +__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) +endif ifeq ($(BUILD),debug) __OPTIMIZEFLAG = -O0 endif @@ -102,9 +174,6 @@ endif ifeq ($(WXUNIV),1) __WXUNIV_DEFINE_p = -D__WXUNIVERSAL__ endif -ifeq ($(WXUNIV),1) -__WXUNIV_DEFINE_p_0 = --define __WXUNIVERSAL__ -endif ifeq ($(BUILD),debug) ifeq ($(DEBUG_FLAG),default) __DEBUG_DEFINE_p = -D__WXDEBUG__ @@ -113,66 +182,30 @@ endif ifeq ($(DEBUG_FLAG),1) __DEBUG_DEFINE_p = -D__WXDEBUG__ endif -ifeq ($(BUILD),debug) -ifeq ($(DEBUG_FLAG),default) -__DEBUG_DEFINE_p_0 = --define __WXDEBUG__ -endif -endif -ifeq ($(DEBUG_FLAG),1) -__DEBUG_DEFINE_p_0 = --define __WXDEBUG__ -endif ifeq ($(USE_EXCEPTIONS),0) __EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS endif -ifeq ($(USE_EXCEPTIONS),0) -__EXCEPTIONS_DEFINE_p_0 = --define wxNO_EXCEPTIONS -endif ifeq ($(USE_RTTI),0) __RTTI_DEFINE_p = -DwxNO_RTTI endif -ifeq ($(USE_RTTI),0) -__RTTI_DEFINE_p_0 = --define wxNO_RTTI -endif ifeq ($(USE_THREADS),0) __THREAD_DEFINE_p = -DwxNO_THREADS endif -ifeq ($(USE_THREADS),0) -__THREAD_DEFINE_p_0 = --define wxNO_THREADS -endif ifeq ($(UNICODE),0) __UNICODE_DEFINE_p = -DwxUSE_UNICODE=0 endif ifeq ($(UNICODE),1) __UNICODE_DEFINE_p = -D_UNICODE endif -ifeq ($(UNICODE),0) -__UNICODE_DEFINE_p_0 = --define wxUSE_UNICODE=0 -endif -ifeq ($(UNICODE),1) -__UNICODE_DEFINE_p_0 = --define _UNICODE -endif ifeq ($(MSLU),1) __MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1 endif -ifeq ($(MSLU),1) -__MSLU_DEFINE_p_0 = --define wxUSE_UNICODE_MSLU=1 -endif ifeq ($(USE_GDIPLUS),1) __GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1 endif -ifeq ($(USE_GDIPLUS),1) -__GFXCTX_DEFINE_p_0 = --define wxUSE_GRAPHICS_CONTEXT=1 -endif ifeq ($(SHARED),1) __DLLFLAG_p = -DWXUSINGDLL endif -ifeq ($(SHARED),1) -__DLLFLAG_p_0 = --define WXUSINGDLL -endif -ifeq ($(MONOLITHIC),0) -__WXLIB_CORE_p = \ - -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core -endif ifeq ($(MONOLITHIC),0) __WXLIB_NET_p = \ -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net @@ -185,15 +218,6 @@ ifeq ($(MONOLITHIC),1) __WXLIB_MONO_p = \ -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR) endif -ifeq ($(USE_GUI),1) -__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG) -endif -ifeq ($(USE_GUI),1) -__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG) -endif -ifeq ($(USE_GUI),1) -__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG) -endif ifeq ($(MSLU),1) __UNICOWS_LIB_p = -lunicows endif @@ -230,19 +254,31 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\ipcclient.exe $(OBJS)\ipcserver.exe +all: $(__ipcclient___depname) $(__ipcserver___depname) $(OBJS)\baseipcclient.exe $(OBJS)\baseipcserver.exe clean: -if exist $(OBJS)\*.o del $(OBJS)\*.o -if exist $(OBJS)\*.d del $(OBJS)\*.d -if exist $(OBJS)\ipcclient.exe del $(OBJS)\ipcclient.exe -if exist $(OBJS)\ipcserver.exe del $(OBJS)\ipcserver.exe + -if exist $(OBJS)\baseipcclient.exe del $(OBJS)\baseipcclient.exe + -if exist $(OBJS)\baseipcserver.exe del $(OBJS)\baseipcserver.exe +ifeq ($(USE_GUI),1) $(OBJS)\ipcclient.exe: $(IPCCLIENT_OBJECTS) $(OBJS)\ipcclient_sample_rc.o $(CXX) -o $@ $(IPCCLIENT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +endif +ifeq ($(USE_GUI),1) $(OBJS)\ipcserver.exe: $(IPCSERVER_OBJECTS) $(OBJS)\ipcserver_sample_rc.o $(CXX) -o $@ $(IPCSERVER_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 +endif + +$(OBJS)\baseipcclient.exe: $(BASEIPCCLIENT_OBJECTS) + $(CXX) -o $@ $(BASEIPCCLIENT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 + +$(OBJS)\baseipcserver.exe: $(BASEIPCSERVER_OBJECTS) + $(CXX) -o $@ $(BASEIPCSERVER_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 $(OBJS)\ipcclient_sample_rc.o: ./../../samples/sample.rc windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) $(__MSLU_DEFINE_p_0) $(__GFXCTX_DEFINE_p_0) --include-dir $(SETUPHDIR) --include-dir ./../../include --include-dir . $(__DLLFLAG_p_0) --include-dir ./../../samples --define NOPCH @@ -256,6 +292,12 @@ $(OBJS)\ipcserver_sample_rc.o: ./../../samples/sample.rc $(OBJS)\ipcserver_server.o: ./server.cpp $(CXX) -c -o $@ $(IPCSERVER_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\baseipcclient_baseclient.o: ./baseclient.cpp + $(CXX) -c -o $@ $(BASEIPCCLIENT_CXXFLAGS) $(CPPDEPS) $< + +$(OBJS)\baseipcserver_baseserver.o: ./baseserver.cpp + $(CXX) -c -o $@ $(BASEIPCSERVER_CXXFLAGS) $(CPPDEPS) $< + .PHONY: all clean diff --git a/samples/ipc/makefile.unx b/samples/ipc/makefile.unx index bebdb9b05f..67e91bbab2 100644 --- a/samples/ipc/makefile.unx +++ b/samples/ipc/makefile.unx @@ -62,6 +62,14 @@ IPCSERVER_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \ $(CPPFLAGS) $(CXXFLAGS) IPCSERVER_OBJECTS = \ ipcserver_server.o +BASEIPCCLIENT_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \ + $(CPPFLAGS) $(CXXFLAGS) +BASEIPCCLIENT_OBJECTS = \ + baseipcclient_baseclient.o +BASEIPCSERVER_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \ + $(CPPFLAGS) $(CXXFLAGS) +BASEIPCSERVER_OBJECTS = \ + baseipcserver_baseserver.o ### Conditionally set variables: ### @@ -87,7 +95,7 @@ endif ### Targets: ### -all: test_for_selected_wxbuild ipcclient ipcserver +all: test_for_selected_wxbuild ipcclient ipcserver baseipcclient baseipcserver install: all @@ -98,6 +106,8 @@ clean: rm -f ./*.d rm -f ipcclient rm -f ipcserver + rm -f baseipcclient + rm -f baseipcserver test_for_selected_wxbuild: @$(WX_CONFIG) $(WX_CONFIG_FLAGS) @@ -108,12 +118,24 @@ ipcclient: $(IPCCLIENT_OBJECTS) ipcserver: $(IPCSERVER_OBJECTS) $(CXX) -o $@ $(IPCSERVER_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,net,base` +baseipcclient: $(BASEIPCCLIENT_OBJECTS) + $(CXX) -o $@ $(BASEIPCCLIENT_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs net,base` + +baseipcserver: $(BASEIPCSERVER_OBJECTS) + $(CXX) -o $@ $(BASEIPCSERVER_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs net,base` + ipcclient_client.o: ./client.cpp $(CXX) -c -o $@ $(IPCCLIENT_CXXFLAGS) $(CPPDEPS) $< ipcserver_server.o: ./server.cpp $(CXX) -c -o $@ $(IPCSERVER_CXXFLAGS) $(CPPDEPS) $< +baseipcclient_baseclient.o: ./baseclient.cpp + $(CXX) -c -o $@ $(BASEIPCCLIENT_CXXFLAGS) $(CPPDEPS) $< + +baseipcserver_baseserver.o: ./baseserver.cpp + $(CXX) -c -o $@ $(BASEIPCSERVER_CXXFLAGS) $(CPPDEPS) $< + .PHONY: all install uninstall clean diff --git a/samples/ipc/makefile.vc b/samples/ipc/makefile.vc index 2ebfd25283..3b3b05519e 100644 --- a/samples/ipc/makefile.vc +++ b/samples/ipc/makefile.vc @@ -42,6 +42,26 @@ IPCSERVER_CXXFLAGS = /M$(__RUNTIME_LIBS_22)$(__DEBUGRUNTIME) /DWIN32 \ IPCSERVER_OBJECTS = \ $(OBJS)\ipcserver_sample.res \ $(OBJS)\ipcserver_server.obj +BASEIPCCLIENT_CXXFLAGS = /M$(__RUNTIME_LIBS_36)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) /Fd$(OBJS)\baseipcclient.pdb $(____DEBUGRUNTIME) \ + $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + $(__GFXCTX_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\include /W4 /I. $(__DLLFLAG_p) \ + /D_CONSOLE /DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) \ + $(CXXFLAGS) +BASEIPCCLIENT_OBJECTS = \ + $(OBJS)\baseipcclient_baseclient.obj +BASEIPCSERVER_CXXFLAGS = /M$(__RUNTIME_LIBS_50)$(__DEBUGRUNTIME) /DWIN32 \ + $(__DEBUGINFO) /Fd$(OBJS)\baseipcserver.pdb $(____DEBUGRUNTIME) \ + $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \ + $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \ + $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \ + $(__GFXCTX_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\include /W4 /I. $(__DLLFLAG_p) \ + /D_CONSOLE /DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) \ + $(CXXFLAGS) +BASEIPCSERVER_OBJECTS = \ + $(OBJS)\baseipcserver_baseserver.obj ### Conditionally set variables: ### @@ -102,18 +122,100 @@ EXTRALIBS_FOR_BASE = !if "$(MONOLITHIC)" == "1" EXTRALIBS_FOR_BASE = !endif +!if "$(USE_GUI)" == "1" +__ipcclient___depname = $(OBJS)\ipcclient.exe +!endif !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS_8 = D !endif !if "$(RUNTIME_LIBS)" == "static" __RUNTIME_LIBS_8 = $(__THREADSFLAG) !endif +!if "$(USE_GUI)" == "1" +__ipcserver___depname = $(OBJS)\ipcserver.exe +!endif !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS_22 = D !endif !if "$(RUNTIME_LIBS)" == "static" __RUNTIME_LIBS_22 = $(__THREADSFLAG) !endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_36 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_36 = $(__THREADSFLAG) +!endif +!if "$(RUNTIME_LIBS)" == "dynamic" +__RUNTIME_LIBS_50 = D +!endif +!if "$(RUNTIME_LIBS)" == "static" +__RUNTIME_LIBS_50 = $(__THREADSFLAG) +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_0 = /d _DEBUG +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" +____DEBUGRUNTIME_0 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "0" +____DEBUGRUNTIME_0 = +!endif +!if "$(DEBUG_RUNTIME_LIBS)" == "1" +____DEBUGRUNTIME_0 = /d _DEBUG +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" +__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__ +!endif +!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" +__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__ +!endif +!if "$(WXUNIV)" == "1" +__WXUNIV_DEFINE_p_0 = /d __WXUNIVERSAL__ +!endif +!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" +__DEBUG_DEFINE_p_0 = /d __WXDEBUG__ +!endif +!if "$(DEBUG_FLAG)" == "1" +__DEBUG_DEFINE_p_0 = /d __WXDEBUG__ +!endif +!if "$(USE_EXCEPTIONS)" == "0" +__EXCEPTIONS_DEFINE_p_0 = /d wxNO_EXCEPTIONS +!endif +!if "$(USE_RTTI)" == "0" +__RTTI_DEFINE_p_0 = /d wxNO_RTTI +!endif +!if "$(USE_THREADS)" == "0" +__THREAD_DEFINE_p_0 = /d wxNO_THREADS +!endif +!if "$(UNICODE)" == "0" +__UNICODE_DEFINE_p_0 = /d wxUSE_UNICODE=0 +!endif +!if "$(UNICODE)" == "1" +__UNICODE_DEFINE_p_0 = /d _UNICODE +!endif +!if "$(MSLU)" == "1" +__MSLU_DEFINE_p_0 = /d wxUSE_UNICODE_MSLU=1 +!endif +!if "$(USE_GDIPLUS)" == "1" +__GFXCTX_DEFINE_p_0 = /d wxUSE_GRAPHICS_CONTEXT=1 +!endif +!if "$(SHARED)" == "1" +__DLLFLAG_p_0 = /d WXUSINGDLL +!endif +!if "$(MONOLITHIC)" == "0" +__WXLIB_CORE_p = \ + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +!if "$(USE_GUI)" == "1" +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" __DEBUGINFO = /Zi !endif @@ -127,16 +229,16 @@ __DEBUGINFO = __DEBUGINFO = /Zi !endif !if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_1 = /DEBUG +__DEBUGINFO_3 = /DEBUG !endif !if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default" -__DEBUGINFO_1 = +__DEBUGINFO_3 = !endif !if "$(DEBUG_INFO)" == "0" -__DEBUGINFO_1 = +__DEBUGINFO_3 = !endif !if "$(DEBUG_INFO)" == "1" -__DEBUGINFO_1 = /DEBUG +__DEBUGINFO_3 = /DEBUG !endif !if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" ____DEBUGRUNTIME = /D_DEBUG @@ -151,18 +253,6 @@ ____DEBUGRUNTIME = ____DEBUGRUNTIME = /D_DEBUG !endif !if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" -____DEBUGRUNTIME_0 = /d _DEBUG -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" -____DEBUGRUNTIME_0 = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "0" -____DEBUGRUNTIME_0 = -!endif -!if "$(DEBUG_RUNTIME_LIBS)" == "1" -____DEBUGRUNTIME_0 = /d _DEBUG -!endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default" __DEBUGRUNTIME = d !endif !if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default" @@ -204,82 +294,39 @@ __NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ !if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" __NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__ !endif -!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0" -__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__ -!endif -!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1" -__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__ -!endif !if "$(WXUNIV)" == "1" __WXUNIV_DEFINE_p = /D__WXUNIVERSAL__ !endif -!if "$(WXUNIV)" == "1" -__WXUNIV_DEFINE_p_0 = /d __WXUNIVERSAL__ -!endif !if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif !if "$(DEBUG_FLAG)" == "1" __DEBUG_DEFINE_p = /D__WXDEBUG__ !endif -!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default" -__DEBUG_DEFINE_p_0 = /d __WXDEBUG__ -!endif -!if "$(DEBUG_FLAG)" == "1" -__DEBUG_DEFINE_p_0 = /d __WXDEBUG__ -!endif !if "$(USE_EXCEPTIONS)" == "0" __EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS !endif -!if "$(USE_EXCEPTIONS)" == "0" -__EXCEPTIONS_DEFINE_p_0 = /d wxNO_EXCEPTIONS -!endif !if "$(USE_RTTI)" == "0" __RTTI_DEFINE_p = /DwxNO_RTTI !endif -!if "$(USE_RTTI)" == "0" -__RTTI_DEFINE_p_0 = /d wxNO_RTTI -!endif !if "$(USE_THREADS)" == "0" __THREAD_DEFINE_p = /DwxNO_THREADS !endif -!if "$(USE_THREADS)" == "0" -__THREAD_DEFINE_p_0 = /d wxNO_THREADS -!endif !if "$(UNICODE)" == "0" __UNICODE_DEFINE_p = /DwxUSE_UNICODE=0 !endif !if "$(UNICODE)" == "1" __UNICODE_DEFINE_p = /D_UNICODE !endif -!if "$(UNICODE)" == "0" -__UNICODE_DEFINE_p_0 = /d wxUSE_UNICODE=0 -!endif -!if "$(UNICODE)" == "1" -__UNICODE_DEFINE_p_0 = /d _UNICODE -!endif !if "$(MSLU)" == "1" __MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1 !endif -!if "$(MSLU)" == "1" -__MSLU_DEFINE_p_0 = /d wxUSE_UNICODE_MSLU=1 -!endif !if "$(USE_GDIPLUS)" == "1" __GFXCTX_DEFINE_p = /DwxUSE_GRAPHICS_CONTEXT=1 !endif -!if "$(USE_GDIPLUS)" == "1" -__GFXCTX_DEFINE_p_0 = /d wxUSE_GRAPHICS_CONTEXT=1 -!endif !if "$(SHARED)" == "1" __DLLFLAG_p = /DWXUSINGDLL !endif -!if "$(SHARED)" == "1" -__DLLFLAG_p_0 = /d WXUSINGDLL -!endif -!if "$(MONOLITHIC)" == "0" -__WXLIB_CORE_p = \ - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib -!endif !if "$(MONOLITHIC)" == "0" __WXLIB_NET_p = \ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib @@ -292,15 +339,6 @@ __WXLIB_BASE_p = \ __WXLIB_MONO_p = \ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib !endif -!if "$(USE_GUI)" == "1" -__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib -!endif -!if "$(USE_GUI)" == "1" -__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib -!endif -!if "$(USE_GUI)" == "1" -__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib -!endif !if "$(MSLU)" == "1" __UNICOWS_LIB_p = unicows.lib !endif @@ -315,7 +353,7 @@ $(OBJS): ### Targets: ### -all: $(OBJS)\ipcclient.exe $(OBJS)\ipcserver.exe +all: $(__ipcclient___depname) $(__ipcserver___depname) $(OBJS)\baseipcclient.exe $(OBJS)\baseipcserver.exe clean: -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -327,16 +365,36 @@ clean: -if exist $(OBJS)\ipcserver.exe del $(OBJS)\ipcserver.exe -if exist $(OBJS)\ipcserver.ilk del $(OBJS)\ipcserver.ilk -if exist $(OBJS)\ipcserver.pdb del $(OBJS)\ipcserver.pdb + -if exist $(OBJS)\baseipcclient.exe del $(OBJS)\baseipcclient.exe + -if exist $(OBJS)\baseipcclient.ilk del $(OBJS)\baseipcclient.ilk + -if exist $(OBJS)\baseipcclient.pdb del $(OBJS)\baseipcclient.pdb + -if exist $(OBJS)\baseipcserver.exe del $(OBJS)\baseipcserver.exe + -if exist $(OBJS)\baseipcserver.ilk del $(OBJS)\baseipcserver.ilk + -if exist $(OBJS)\baseipcserver.pdb del $(OBJS)\baseipcserver.pdb +!if "$(USE_GUI)" == "1" $(OBJS)\ipcclient.exe: $(IPCCLIENT_OBJECTS) $(OBJS)\ipcclient_sample.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /pdb:"$(OBJS)\ipcclient.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_3) /pdb:"$(OBJS)\ipcclient.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< $(IPCCLIENT_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << +!endif +!if "$(USE_GUI)" == "1" $(OBJS)\ipcserver.exe: $(IPCSERVER_OBJECTS) $(OBJS)\ipcserver_sample.res - link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /pdb:"$(OBJS)\ipcserver.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_3) /pdb:"$(OBJS)\ipcserver.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<< $(IPCSERVER_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib << +!endif + +$(OBJS)\baseipcclient.exe: $(BASEIPCCLIENT_OBJECTS) + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_3) /pdb:"$(OBJS)\baseipcclient.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE @<< + $(BASEIPCCLIENT_OBJECTS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +<< + +$(OBJS)\baseipcserver.exe: $(BASEIPCSERVER_OBJECTS) + link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_3) /pdb:"$(OBJS)\baseipcserver.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE @<< + $(BASEIPCSERVER_OBJECTS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib +<< $(OBJS)\ipcclient_sample.res: .\..\..\samples\sample.rc rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_0) $(__NO_VC_CRTDBG_p_0) /d __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) $(__MSLU_DEFINE_p_0) $(__GFXCTX_DEFINE_p_0) /i $(SETUPHDIR) /i .\..\..\include /i . $(__DLLFLAG_p_0) /d _WINDOWS /i .\..\..\samples /d NOPCH .\..\..\samples\sample.rc @@ -350,3 +408,9 @@ $(OBJS)\ipcserver_sample.res: .\..\..\samples\sample.rc $(OBJS)\ipcserver_server.obj: .\server.cpp $(CXX) /c /nologo /TP /Fo$@ $(IPCSERVER_CXXFLAGS) .\server.cpp +$(OBJS)\baseipcclient_baseclient.obj: .\baseclient.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEIPCCLIENT_CXXFLAGS) .\baseclient.cpp + +$(OBJS)\baseipcserver_baseserver.obj: .\baseserver.cpp + $(CXX) /c /nologo /TP /Fo$@ $(BASEIPCSERVER_CXXFLAGS) .\baseserver.cpp + diff --git a/samples/ipc/makefile.wat b/samples/ipc/makefile.wat index 091171f781..48d8149418 100644 --- a/samples/ipc/makefile.wat +++ b/samples/ipc/makefile.wat @@ -69,6 +69,31 @@ EXTRALIBS_FOR_BASE = !ifeq MONOLITHIC 1 EXTRALIBS_FOR_BASE = !endif +__ipcclient___depname = +!ifeq USE_GUI 1 +__ipcclient___depname = $(OBJS)\ipcclient.exe +!endif +__ipcserver___depname = +!ifeq USE_GUI 1 +__ipcserver___depname = $(OBJS)\ipcserver.exe +!endif +__WXLIB_CORE_p = +!ifeq MONOLITHIC 0 +__WXLIB_CORE_p = & + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib +!endif +__LIB_TIFF_p = +!ifeq USE_GUI 1 +__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib +!endif +__LIB_JPEG_p = +!ifeq USE_GUI 1 +__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib +!endif +__LIB_PNG_p = +!ifeq USE_GUI 1 +__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib +!endif __DEBUGINFO = !ifeq BUILD debug !ifeq DEBUG_INFO default @@ -86,22 +111,22 @@ __DEBUGINFO = -d0 !ifeq DEBUG_INFO 1 __DEBUGINFO = -d2 !endif -__DEBUGINFO_1 = +__DEBUGINFO_3 = !ifeq BUILD debug !ifeq DEBUG_INFO default -__DEBUGINFO_1 = debug all +__DEBUGINFO_3 = debug all !endif !endif !ifeq BUILD release !ifeq DEBUG_INFO default -__DEBUGINFO_1 = +__DEBUGINFO_3 = !endif !endif !ifeq DEBUG_INFO 0 -__DEBUGINFO_1 = +__DEBUGINFO_3 = !endif !ifeq DEBUG_INFO 1 -__DEBUGINFO_1 = debug all +__DEBUGINFO_3 = debug all !endif __OPTIMIZEFLAG = !ifeq BUILD debug @@ -138,42 +163,6 @@ __EXCEPTIONSFLAG = !ifeq USE_EXCEPTIONS 1 __EXCEPTIONSFLAG = -xs !endif -__WXLIB_CORE_p = -!ifeq MONOLITHIC 0 -__WXLIB_CORE_p = & - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib -!endif -__WXLIB_NET_p = -!ifeq MONOLITHIC 0 -__WXLIB_NET_p = & - wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib -!endif -__WXLIB_BASE_p = -!ifeq MONOLITHIC 0 -__WXLIB_BASE_p = & - wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib -!endif -__WXLIB_MONO_p = -!ifeq MONOLITHIC 1 -__WXLIB_MONO_p = & - wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib -!endif -__LIB_TIFF_p = -!ifeq USE_GUI 1 -__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib -!endif -__LIB_JPEG_p = -!ifeq USE_GUI 1 -__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib -!endif -__LIB_PNG_p = -!ifeq USE_GUI 1 -__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib -!endif -__GDIPLUS_LIB_p = -!ifeq USE_GDIPLUS 1 -__GDIPLUS_LIB_p = gdiplus.lib -!endif __WXUNIV_DEFINE_p = !ifeq WXUNIV 1 __WXUNIV_DEFINE_p = -d__WXUNIVERSAL__ @@ -214,6 +203,25 @@ __DLLFLAG_p = !ifeq SHARED 1 __DLLFLAG_p = -dWXUSINGDLL !endif +__WXLIB_NET_p = +!ifeq MONOLITHIC 0 +__WXLIB_NET_p = & + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib +!endif +__WXLIB_BASE_p = +!ifeq MONOLITHIC 0 +__WXLIB_BASE_p = & + wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +__WXLIB_MONO_p = +!ifeq MONOLITHIC 1 +__WXLIB_MONO_p = & + wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib +!endif +__GDIPLUS_LIB_p = +!ifeq USE_GDIPLUS 1 +__GDIPLUS_LIB_p = gdiplus.lib +!endif ### Variables: ### @@ -242,6 +250,22 @@ IPCSERVER_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & $(CXXFLAGS) IPCSERVER_OBJECTS = & $(OBJS)\ipcserver_server.obj +BASEIPCCLIENT_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) & + $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) & + -i=.\..\..\include -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) & + -dwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +BASEIPCCLIENT_OBJECTS = & + $(OBJS)\baseipcclient_baseclient.obj +BASEIPCSERVER_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) & + $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) & + $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) & + $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) & + -i=.\..\..\include -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) & + -dwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS) +BASEIPCSERVER_OBJECTS = & + $(OBJS)\baseipcserver_baseserver.obj all : $(OBJS) @@ -250,7 +274,7 @@ $(OBJS) : ### Targets: ### -all : .SYMBOLIC $(OBJS)\ipcclient.exe $(OBJS)\ipcserver.exe +all : .SYMBOLIC $(__ipcclient___depname) $(__ipcserver___depname) $(OBJS)\baseipcclient.exe $(OBJS)\baseipcserver.exe clean : .SYMBOLIC -if exist $(OBJS)\*.obj del $(OBJS)\*.obj @@ -260,30 +284,60 @@ clean : .SYMBOLIC -if exist $(OBJS)\*.pch del $(OBJS)\*.pch -if exist $(OBJS)\ipcclient.exe del $(OBJS)\ipcclient.exe -if exist $(OBJS)\ipcserver.exe del $(OBJS)\ipcserver.exe + -if exist $(OBJS)\baseipcclient.exe del $(OBJS)\baseipcclient.exe + -if exist $(OBJS)\baseipcserver.exe del $(OBJS)\baseipcserver.exe +!ifeq USE_GUI 1 $(OBJS)\ipcclient.exe : $(IPCCLIENT_OBJECTS) $(OBJS)\ipcclient_sample.res @%create $(OBJS)\ipcclient.lbc @%append $(OBJS)\ipcclient.lbc option quiet @%append $(OBJS)\ipcclient.lbc name $^@ @%append $(OBJS)\ipcclient.lbc option caseexact - @%append $(OBJS)\ipcclient.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @%append $(OBJS)\ipcclient.lbc $(LDFLAGS) $(__DEBUGINFO_3) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' @for %i in ($(IPCCLIENT_OBJECTS)) do @%append $(OBJS)\ipcclient.lbc file %i @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\ipcclient.lbc library %i @%append $(OBJS)\ipcclient.lbc option resource=$(OBJS)\ipcclient_sample.res @for %i in () do @%append $(OBJS)\ipcclient.lbc option stack=%i wlink @$(OBJS)\ipcclient.lbc +!endif +!ifeq USE_GUI 1 $(OBJS)\ipcserver.exe : $(IPCSERVER_OBJECTS) $(OBJS)\ipcserver_sample.res @%create $(OBJS)\ipcserver.lbc @%append $(OBJS)\ipcserver.lbc option quiet @%append $(OBJS)\ipcserver.lbc name $^@ @%append $(OBJS)\ipcserver.lbc option caseexact - @%append $(OBJS)\ipcserver.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' + @%append $(OBJS)\ipcserver.lbc $(LDFLAGS) $(__DEBUGINFO_3) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' @for %i in ($(IPCSERVER_OBJECTS)) do @%append $(OBJS)\ipcserver.lbc file %i @for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\ipcserver.lbc library %i @%append $(OBJS)\ipcserver.lbc option resource=$(OBJS)\ipcserver_sample.res @for %i in () do @%append $(OBJS)\ipcserver.lbc option stack=%i wlink @$(OBJS)\ipcserver.lbc +!endif + +$(OBJS)\baseipcclient.exe : $(BASEIPCCLIENT_OBJECTS) + @%create $(OBJS)\baseipcclient.lbc + @%append $(OBJS)\baseipcclient.lbc option quiet + @%append $(OBJS)\baseipcclient.lbc name $^@ + @%append $(OBJS)\baseipcclient.lbc option caseexact + @%append $(OBJS)\baseipcclient.lbc $(LDFLAGS) $(__DEBUGINFO_3) libpath $(LIBDIRNAME) system nt ref 'main_' + @for %i in ($(BASEIPCCLIENT_OBJECTS)) do @%append $(OBJS)\baseipcclient.lbc file %i + @for %i in ( $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\baseipcclient.lbc library %i + @%append $(OBJS)\baseipcclient.lbc + @for %i in () do @%append $(OBJS)\baseipcclient.lbc option stack=%i + wlink @$(OBJS)\baseipcclient.lbc + +$(OBJS)\baseipcserver.exe : $(BASEIPCSERVER_OBJECTS) + @%create $(OBJS)\baseipcserver.lbc + @%append $(OBJS)\baseipcserver.lbc option quiet + @%append $(OBJS)\baseipcserver.lbc name $^@ + @%append $(OBJS)\baseipcserver.lbc option caseexact + @%append $(OBJS)\baseipcserver.lbc $(LDFLAGS) $(__DEBUGINFO_3) libpath $(LIBDIRNAME) system nt ref 'main_' + @for %i in ($(BASEIPCSERVER_OBJECTS)) do @%append $(OBJS)\baseipcserver.lbc file %i + @for %i in ( $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\baseipcserver.lbc library %i + @%append $(OBJS)\baseipcserver.lbc + @for %i in () do @%append $(OBJS)\baseipcserver.lbc option stack=%i + wlink @$(OBJS)\baseipcserver.lbc $(OBJS)\ipcclient_sample.res : .AUTODEPEND .\..\..\samples\sample.rc wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\..\include -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $< @@ -297,3 +351,9 @@ $(OBJS)\ipcserver_sample.res : .AUTODEPEND .\..\..\samples\sample.rc $(OBJS)\ipcserver_server.obj : .AUTODEPEND .\server.cpp $(CXX) -bt=nt -zq -fo=$^@ $(IPCSERVER_CXXFLAGS) $< +$(OBJS)\baseipcclient_baseclient.obj : .AUTODEPEND .\baseclient.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEIPCCLIENT_CXXFLAGS) $< + +$(OBJS)\baseipcserver_baseserver.obj : .AUTODEPEND .\baseserver.cpp + $(CXX) -bt=nt -zq -fo=$^@ $(BASEIPCSERVER_CXXFLAGS) $< + -- 2.45.2