From: Václav Slavík <vslavik@fastmail.fm>
Date: Tue, 7 Oct 2003 19:47:02 +0000 (+0000)
Subject: added .chm support for Unix (Markus Sinner)
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c839485c8e2628b4860764b31e8c17cd1380c1e2

added .chm support for Unix (Markus Sinner)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl
index f6fe38d2de..81145a2dac 100644
--- a/build/bakefiles/config.bkl
+++ b/build/bakefiles/config.bkl
@@ -173,6 +173,7 @@ compiled .lib files and setup.h under the lib/ toplevel directory.
         <option name="TOOLCHAIN_NAME"/>
         <option name="EXTRALIBS"/>
         <option name="EXTRALIBS_XML"/>
+        <option name="EXTRALIBS_HTML"/>
         <option name="EXTRALIBS_ODBC"/>
         <option name="EXTRALIBS_GUI"/>
         <option name="EXTRALIBS_OPENGL"/>
@@ -210,6 +211,7 @@ it if SHARED=1 unless you know what you are doing.
         <set var="EXTRACFLAGS"/>
         <set var="EXTRALIBS"/>
         <set var="EXTRALIBS_XML"/>
+        <set var="EXTRALIBS_HTML"/>
         <set var="EXTRALIBS_ODBC"/>
         <set var="EXTRALIBS_GUI"/>
         <set var="EXTRALIBS_OPENGL">
diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl
index 6648f8ac43..e238a68d5e 100644
--- a/build/bakefiles/files.bkl
+++ b/build/bakefiles/files.bkl
@@ -2044,6 +2044,12 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     <if cond="TOOLKIT=='MSW'">
         src/msw/helpbest.cpp
     </if>
+    <if cond="PLATFORM_UNIX=='1'">
+        src/html/chm.cpp
+    </if>
+    <if cond="PLATFORM_MACOSX=='1'">
+        src/html/chm.cpp
+    </if>
 </set>
 <set var="HTML_SRC" hints="files">
     $(HTML_SRC_PLATFORM)
diff --git a/build/bakefiles/monolithic.bkl b/build/bakefiles/monolithic.bkl
index d67fed5f40..80b1ba7fc1 100644
--- a/build/bakefiles/monolithic.bkl
+++ b/build/bakefiles/monolithic.bkl
@@ -17,6 +17,7 @@
         <define>WXMAKINGDLL</define>
         <sources>$(MONOLIB_SRC)</sources>
         <ldlibs>$(EXTRALIBS_XML)</ldlibs>
+        <ldlibs>$(EXTRALIBS_HTML)</ldlibs>
         <ldlibs>$(EXTRALIBS_ODBC)</ldlibs>
         <msvc-headers>$(ALL_HEADERS)</msvc-headers>
     </dll>
diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl
index 2b8881e559..3f0c11451d 100644
--- a/build/bakefiles/multilib.bkl
+++ b/build/bakefiles/multilib.bkl
@@ -148,6 +148,7 @@
         <sources>$(HTML_SRC)</sources>
         <library>coredll</library>
         <library>basedll</library>
+        <ldlibs>$(EXTRALIBS_HTML)</ldlibs>
         <msvc-headers>$(HTML_HDR)</msvc-headers>
     </dll>
     
diff --git a/build/bakefiles/wxwin.py b/build/bakefiles/wxwin.py
index 3aa425cd0a..5c1483e3bc 100644
--- a/build/bakefiles/wxwin.py
+++ b/build/bakefiles/wxwin.py
@@ -41,6 +41,7 @@ LIBS_GUI   = ['core', 'adv', 'html', 'gl', 'dbgrid']
 EXTRALIBS = {
     'gl' : '$(EXTRALIBS_OPENGL)',
     'xml' : '$(EXTRALIBS_XML)',
+    'html' : '$(EXTRALIBS_HTML)',
     'odbc' : '$(EXTRALIBS_ODBC)',
 }
 
diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h
index afbb474124..4d5fd211a2 100644
--- a/include/wx/chkconf.h
+++ b/include/wx/chkconf.h
@@ -403,6 +403,19 @@
 #   endif
 #endif /* !defined(wxUSE_HTML) */
 
+#ifndef wxUSE_LIBMSPACK
+#   ifndef __UNIX__
+        /* set to 0 on platforms that don't have libmspack */
+#       define wxUSE_LIBMSPACK 0
+#   else
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxUSE_LIBMSPACK must be defined."
+#       else
+#           define wxUSE_LIBMSPACK 0
+#       endif
+#   endif
+#endif /* !defined(wxUSE_LIBMSPACK) */
+
 #ifndef wxUSE_ICO_CUR
 #   ifdef wxABORT_ON_CONFIG_ERROR
 #       error "wxUSE_ICO_CUR must be defined."
diff --git a/setup.h.in b/setup.h.in
index da237db11f..2b70d2484b 100644
--- a/setup.h.in
+++ b/setup.h.in
@@ -784,6 +784,10 @@
  * Use MS HTML Help controller (win32)
  */
 #define wxUSE_MS_HTML_HELP 0
+/*
+ * Use MS HTML Help via libmspack (Unix)
+ */
+#define wxUSE_LIBMSPACK 0
 
 /*
  * Use iostream.h rather than iostream