]> source.dussan.org Git - tigervnc.git/commitdiff
Basic support for building Windows vncviewer using MinGW. This patch
authorPeter Åstrand <astrand@cendio.se>
Tue, 9 Dec 2008 10:27:33 +0000 (10:27 +0000)
committerPeter Åstrand <astrand@cendio.se>
Tue, 9 Dec 2008 10:27:33 +0000 (10:27 +0000)
includes non-intrusive changes, more tweaks will follow. Details:

* Defining WINVER and _WIN32_IE in both common and win modules.

* Need to build CFTMsgWriter and CFTMsgReader.

* Added configure script and Makefiles.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3326 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/configure.ac
common/rfb/Makefile.am
win/Makefile.am [new file with mode: 0644]
win/configure.ac [new file with mode: 0644]
win/rfb_win32/Makefile.am [new file with mode: 0644]
win/vncviewer/Makefile.am [new file with mode: 0644]

index 25aa5f094a970ee406abcd8bca20f3de8b9f856a..d590e051e8cc8874d975c69f2c65b60a13e361bb 100644 (file)
@@ -25,6 +25,12 @@ case "`(uname -sr) 2>/dev/null`" in
   ;;
 esac
 
+case "$host_os" in
+    mingw*)
+        CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_IE=0x0500"
+        ;;
+esac
+
 dnl FIXME: Remove duplication between this script and ../unix/configure.in
 if test "$GCC" = yes; then
   CFLAGS="$CFLAGS -Wall"
index 29ffc9505ffd6fd7a65e768d58a11b3cb3225071..25df0007796933bdcaf30fcd5289e667ea8c4860 100644 (file)
@@ -26,7 +26,7 @@ HDRS = Blacklist.h CapsContainer.h CapsList.h CConnection.h CFTMsgReader.h \
        VNCServer.h VNCServerST.h zrleDecode.h ZRLEDecoder.h zrleEncode.h \
        ZRLEEncoder.h
 
-librfb_la_SOURCES = $(HDRS) Blacklist.cxx CConnection.cxx CMsgHandler.cxx \
+librfb_la_SOURCES = $(HDRS) Blacklist.cxx CConnection.cxx CFTMsgReader.cxx CFTMsgWriter.cxx CMsgHandler.cxx \
        CMsgReader.cxx CMsgReaderV3.cxx CMsgWriter.cxx CMsgWriterV3.cxx \
        CSecurityVncAuth.cxx CapsContainer.cxx CapsList.cxx \
        ComparingUpdateTracker.cxx Configuration.cxx ConnParams.cxx \
@@ -46,7 +46,7 @@ librfb_la_SOURCES = $(HDRS) Blacklist.cxx CConnection.cxx CMsgHandler.cxx \
        VNCServerST.cxx ZRLEEncoder.cxx ZRLEDecoder.cxx encodings.cxx \
        secTypes.cxx util.cxx
 
-librfb_la_CPPFLAGS = -I$(top_srcdir)
+librfb_la_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/../win
 librfb_la_LIBADD =
 
 if IRIX_COMPRESS
diff --git a/win/Makefile.am b/win/Makefile.am
new file mode 100644 (file)
index 0000000..5ab34c9
--- /dev/null
@@ -0,0 +1,4 @@
+SUBDIRS = ../common rfb_win32 vncviewer
+
+ACLOCAL_AMFLAGS = -I m4
+
diff --git a/win/configure.ac b/win/configure.ac
new file mode 100644 (file)
index 0000000..b3c4e47
--- /dev/null
@@ -0,0 +1,30 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ([2.61])
+AC_INIT([tightvnc], [1.5.0a1], [http://www.tightvnc.com/bugs.html])
+AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
+
+AC_SUBST([COMMON_DIR], ['$(top_srcdir)/../common'])
+
+AC_CONFIG_SUBDIRS([../common])
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+AC_LANG([C++])
+
+if test "$GCC" = yes; then
+  CFLAGS="$CFLAGS -Wall"
+fi
+if test "$GXX" = yes; then
+  CXXFLAGS="$CXXFLAGS -Wall"
+fi
+
+CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_IE=0x0500"
+
+AC_PATH_XTRA
+
+AC_OUTPUT(Makefile
+         vncviewer/Makefile
+        rfb_win32/Makefile
+)
diff --git a/win/rfb_win32/Makefile.am b/win/rfb_win32/Makefile.am
new file mode 100644 (file)
index 0000000..9ba8e4b
--- /dev/null
@@ -0,0 +1,109 @@
+noinst_LTLIBRARIES = librfb_win32.la
+
+HDRS = \
+  AboutDialog.h \
+  BitmapInfo.h \
+  CKeyboard.h \
+  CleanDesktop.h \
+  Clipboard.h \
+  CompatibleBitmap.h \
+  ComputerName.h \
+  CPointer.h \
+  CurrentUser.h \
+  DeviceContext.h \
+  DeviceFrameBuffer.h \
+  Dialog.h \
+  DIBSectionBuffer.h \
+  DynamicFn.h \
+  EventManager.h \
+  FolderManager.h \
+  Handle.h \
+  IconInfo.h \
+  IntervalTimer.h \
+  keymap.h \
+  LaunchProcess.h \
+  ListViewControl.h \
+  LocalMem.h \
+  LogicalPalette.h \
+  LowLevelKeyEvents.h \
+  ModuleFileName.h \
+  MonitorInfo.h \
+  MsgBox.h \
+  MsgWindow.h \
+  OSVersion.h \
+  ProgressControl.h \
+  RegConfig.h \
+  Registry.h \
+  ScaledDIBSectionBuffer.h \
+  SDisplayCoreDriver.h \
+  SDisplayCorePolling.h \
+  SDisplayCoreWMHooks.h \
+  SDisplay.h \
+  Security.h \
+  Service.h \
+  SFileTransferManagerWin32.h \
+  SFileTransferWin32.h \
+  SInput.h \
+  SocketManager.h \
+  TCharArray.h \
+  Threading.h \
+  ToolBar.h \
+  TrayIcon.h \
+  TsSessions.h \
+  Win32Util.h \
+  WMCursor.h \
+  WMHooks.h \
+  WMNotifier.h \
+  WMPoller.h \
+  WMShatter.h \
+  WMWindowCopyRect.h
+
+
+##  CleanDesktop.cxx not built - MinGW does not provide COM
+
+librfb_win32_la_SOURCES = $(HDRS) \
+  AboutDialog.cxx \
+  CKeyboard.cxx \
+  Clipboard.cxx \
+  CPointer.cxx \
+  CurrentUser.cxx \
+  DeviceContext.cxx \
+  DeviceFrameBuffer.cxx \
+  Dialog.cxx \
+  DIBSectionBuffer.cxx \
+  DynamicFn.cxx \
+  EventManager.cxx \
+  FolderManager.cxx \
+  LaunchProcess.cxx \
+  ListViewControl.cxx \
+  LowLevelKeyEvents.cxx \
+  MonitorInfo.cxx \
+  MsgWindow.cxx \
+  OSVersion.cxx \
+  ProgressControl.cxx \
+  RegConfig.cxx \
+  Registry.cxx \
+  ScaledDIBSectionBuffer.cxx \
+  SDisplayCorePolling.cxx \
+  SDisplayCoreWMHooks.cxx \
+  SDisplay.cxx \
+  Security.cxx \
+  Service.cxx \
+  SFileTransferManagerWin32.cxx \
+  SFileTransferWin32.cxx \
+  SInput.cxx \
+  SocketManager.cxx \
+  TCharArray.cxx \
+  Threading.cxx \
+  ToolBar.cxx \
+  TsSessions.cxx \
+  Win32Util.cxx \
+  WMCursor.cxx \
+  WMHooks.cxx \
+  WMNotifier.cxx \
+  WMPoller.cxx \
+  WMShatter.cxx \
+  WMWindowCopyRect.cxx
+
+librfb_win32_la_CPPFLAGS = -I$(top_srcdir) -I$(COMMON_DIR)
+librfb_win32_la_LIBADD =
diff --git a/win/vncviewer/Makefile.am b/win/vncviewer/Makefile.am
new file mode 100644 (file)
index 0000000..ff6a6d6
--- /dev/null
@@ -0,0 +1,50 @@
+bin_PROGRAMS = vncviewer
+
+HDRS = \
+  CConn.h \
+  CConnOptions.h \
+  CConnThread.h \
+  ConnectingDialog.h \
+  ConnectionDialog.h \
+  DesktopWindow.h \
+  FileTransfer.h \
+  FTBrowseDlg.h \
+  FTDialog.h \
+  FTListView.h \
+  FTProgress.h \
+  InfoDialog.h \
+  ListenServer.h \
+  ListenTrayIcon.h \
+  MRU.h \
+  OptionsDialog.h \
+  resource.h \
+  UserPasswdDialog.h \
+  ViewerToolBar.h 
+
+vncviewer_SOURCES = $(HDRS) \
+  buildTime.cxx \
+  CConn.cxx \
+  CConnOptions.cxx \
+  CConnThread.cxx \
+  ConnectingDialog.cxx \
+  ConnectionDialog.cxx \
+  DesktopWindow.cxx \
+  FileTransfer.cxx \
+  FTBrowseDlg.cxx \
+  FTDialog.cxx \
+  FTListView.cxx \
+  FTProgress.cxx \
+  InfoDialog.cxx \
+  OptionsDialog.cxx \
+  UserPasswdDialog.cxx \
+  ViewerToolBar.cxx \
+  vncviewer.cxx
+
+vncviewer_CPPFLAGS = -I$(COMMON_DIR) -I$(top_srcdir)
+
+vncviewer_LDADD = $(COMMON_DIR)/rfb/librfb.la $(top_srcdir)/rfb_win32/librfb_win32.la $(COMMON_DIR)/Xregion/libXregion.la \
+       $(COMMON_DIR)/network/libnetwork.la $(COMMON_DIR)/rdr/librdr.la -lws2_32 -lgdi32 -luser32 -lcomctl32 -lversion -lcomdlg32
+
+vncviewer_LDFLAGS = -I$(top_srcdir)/win 
+
+