diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-10-12 21:30:18 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-10-12 21:30:18 +0000 |
commit | 11278c50dc78f3cd3701ace2614d2a74f315dd47 (patch) | |
tree | 01b1ed533e3923fa90caf91b883776ce067ae371 | |
parent | 7f2f25bb45ae0ec08975a7cff8a3208f29ff2583 (diff) | |
download | tigervnc-11278c50dc78f3cd3701ace2614d2a74f315dd47.tar.gz tigervnc-11278c50dc78f3cd3701ace2614d2a74f315dd47.zip |
Fix Java viewer integration when building WinVNC with MinGW
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4727 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | win/winvnc/CMakeLists.txt | 8 | ||||
-rw-r--r-- | win/winvnc/JavaViewer.cxx | 4 | ||||
-rw-r--r-- | win/winvnc/winvnc.rc.in | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/win/winvnc/CMakeLists.txt b/win/winvnc/CMakeLists.txt index 3b576a7b..dc567b12 100644 --- a/win/winvnc/CMakeLists.txt +++ b/win/winvnc/CMakeLists.txt @@ -7,11 +7,11 @@ endif() add_library(wm_hooks SHARED ../wm_hooks/wm_hooks.cxx - ../wm_hooks/wm_hooks.def - ../wm_hooks/wm_hooks.rc) + ../wm_hooks/wm_hooks.def + ../wm_hooks/wm_hooks.rc) -string(REGEX REPLACE "/" "\\\\\\\\" CMAKE_WIN_BINARY_DIR ${CMAKE_BINARY_DIR}) -string(REGEX REPLACE "/" "\\\\\\\\" CMAKE_WIN_SOURCE_DIR ${CMAKE_SOURCE_DIR}) +set(VNCVIEWER_JAR_PATH ${CMAKE_BINARY_DIR}/java/VncViewer.jar) +set(INDEX_VNC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/index.vnc) configure_file(winvnc.rc.in winvnc.rc) diff --git a/win/winvnc/JavaViewer.cxx b/win/winvnc/JavaViewer.cxx index 39ff915a..6f9f6de5 100644 --- a/win/winvnc/JavaViewer.cxx +++ b/win/winvnc/JavaViewer.cxx @@ -45,6 +45,10 @@ rdr::InStream* JavaViewerServer::getFile(const char* name, { if (strcmp(name, "/") == 0) name = "/index.vnc"; + if (strcmp(name, "/VncViewer.jar") == 0) + name = "VncViewer.jar"; + if (strcmp(name, "/index.vnc") == 0) + name = "index.vnc"; HRSRC resource = FindResource(0, TStr(name), _T("HTTPFILE")); if (!resource) return 0; diff --git a/win/winvnc/winvnc.rc.in b/win/winvnc/winvnc.rc.in index 3c484ed7..b59befde 100644 --- a/win/winvnc/winvnc.rc.in +++ b/win/winvnc/winvnc.rc.in @@ -223,8 +223,8 @@ END #cmakedefine BUILD_JAVA #ifdef BUILD_JAVA -/VNCVIEWER.JAR HTTPFILE DISCARDABLE "@CMAKE_WIN_BINARY_DIR@\\java\\VncViewer.jar" -/INDEX.VNC HTTPFILE DISCARDABLE "@CMAKE_WIN_SOURCE_DIR@\\win\\winvnc\\index.vnc" +VNCVIEWER.JAR HTTPFILE DISCARDABLE "@VNCVIEWER_JAR_PATH@" +INDEX.VNC HTTPFILE DISCARDABLE "@INDEX_VNC_PATH@" #endif ///////////////////////////////////////////////////////////////////////////// |