]> source.dussan.org Git - tigervnc.git/commitdiff
Add a resource file to vncviewer.exe so we can get an icon.
authorPierre Ossman <ossman@cendio.se>
Tue, 27 Mar 2012 12:30:19 +0000 (12:30 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 27 Mar 2012 12:30:19 +0000 (12:30 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4876 3789f03b-4d11-0410-bbf8-ca57d06f2519

vncviewer/CMakeLists.txt
vncviewer/resource.h [new file with mode: 0644]
vncviewer/vncviewer.rc.in [new file with mode: 0644]

index dbd2d02689037770c69ef42c587f898d8e1b48a2..f6b6d0bea53c78cc4723b01451d2bb60d9fd4100 100644 (file)
@@ -16,10 +16,18 @@ set(VNCVIEWER_SOURCES
   vncviewer.cxx)
 
 if(WIN32)
-  set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} win32.c)
+  # Since vncviewer.rc is generated, local includes will be looking
+  # in the wrong directory. We need to help it out.
+  include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+  configure_file(vncviewer.rc.in vncviewer.rc)
+  set(VNCVIEWER_SOURCES
+    ${VNCVIEWER_SOURCES}
+    ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.rc)
 endif()
 
-if(APPLE)
+if(WIN32)
+  set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} win32.c)
+elseif(APPLE)
   set(VNCVIEWER_SOURCES ${VNCVIEWER_SOURCES} cocoa.mm)
 endif()
 
diff --git a/vncviewer/resource.h b/vncviewer/resource.h
new file mode 100644 (file)
index 0000000..e599826
--- /dev/null
@@ -0,0 +1,7 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by vncviewer.rc
+//
+#define IDR_MANIFEST                    1
+#define IDI_ICON                        101
+
diff --git a/vncviewer/vncviewer.rc.in b/vncviewer/vncviewer.rc.in
new file mode 100644 (file)
index 0000000..a538e4b
--- /dev/null
@@ -0,0 +1,82 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "windows.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.K.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @RCVERSION@
+ PRODUCTVERSION @RCVERSION@
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "080904b0"
+        BEGIN
+            VALUE "Comments", "\0"
+            VALUE "CompanyName", "TigerVNC Project\0"
+            #ifdef WIN64
+            VALUE "FileDescription", "TigerVNC Client for Win64\0"
+            VALUE "ProductName", "TigerVNC Client for Win64\0"
+            #else
+            VALUE "FileDescription", "TigerVNC Client for Win32\0"
+            VALUE "ProductName", "TigerVNC Client for Win32\0"
+            #endif
+            VALUE "FileVersion", "@RCVERSION@\0"
+            VALUE "InternalName", "vncviewer\0"
+            VALUE "LegalCopyright", "Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)\0"
+            VALUE "LegalTrademarks", "TigerVNC\0"
+            VALUE "OriginalFilename", "vncviewer.exe\0"
+            VALUE "PrivateBuild", "\0"
+            VALUE "ProductVersion", "@VERSION@\0"
+            VALUE "SpecialBuild", "\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x809, 1200
+    END
+END
+
+#endif    // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON                ICON    DISCARDABLE     "@CMAKE_SOURCE_DIR@/media/tigervnc.ico"
+
+#endif    // English (U.K.) resources
+/////////////////////////////////////////////////////////////////////////////
+