tPut Win32 docs in subdir; install help - vaccinewars - be a doctor and try to vaccinate the world
git clone git://src.adamsgaard.dk/vaccinewars
Log
Files
Refs
README
LICENSE
---
commit 8cd53b00ebf1998d407f43408165c4a488fc0965
parent 17a28aa267b17d4f31db7de5a66baadcd0042090
Author: Ben Webb 
Date:   Fri,  4 Dec 2020 23:21:09 -0800

Put Win32 docs in subdir; install help

Diffstat:
  M src/dopewars.c                      |       2 +-
  M src/gui_client/optdialog.c          |       2 +-
  M win32/install.nsi.in                |      10 +++++++---

3 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/dopewars.c b/src/dopewars.c
t@@ -2316,7 +2316,7 @@ gchar *GetDocRoot(void)
   gchar *bindir;
 
   bindir = GetBinaryDir();
-  path = g_strdup_printf("file://%s\\", bindir);
+  path = g_strdup_printf("file://%s/doc/", bindir);
   g_free(bindir);
 #else
   path = g_strdup_printf("file://%s/", DPDOCDIR);
diff --git a/src/gui_client/optdialog.c b/src/gui_client/optdialog.c
t@@ -640,7 +640,7 @@ static gchar *GetHelpPage(const gchar *pagename)
   gchar *root, *file;
 
   root = GetDocRoot();
-  file = g_strdup_printf("%shelp%c%s.html", root, G_DIR_SEPARATOR, pagename);
+  file = g_strdup_printf("%shelp/%s.html", root, pagename);
   g_free(root);
   return file;
 }
diff --git a/win32/install.nsi.in b/win32/install.nsi.in
t@@ -72,8 +72,6 @@ Section ""
   SetOutPath "$INSTDIR"
   File "..\LICENCE"
 
-  File "..\doc\*.html"
-
   File "..\src\dopewars.exe"
   File "/etc/pki/tls/certs/ca-bundle.crt"
 
t@@ -106,6 +104,12 @@ Section ""
   File "/usr/i686-w64-mingw32/sys-root/mingw/bin/zlib1.dll"
 !endif
 
+  SetOutPath "$INSTDIR\doc"
+  File "..\doc\*.html"
+
+  SetOutPath "$INSTDIR\doc\help"
+  File "..\doc\help\*.html"
+
   SetOutPath "$INSTDIR\locale\de\LC_MESSAGES"
   File /oname=dopewars.mo "..\po\de.gmo"
 
t@@ -150,7 +154,7 @@ Section ""
     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\text-mode dopewars.lnk" "$INSTDIR\dopewars.exe -t"
     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\dopewars AI player.lnk" "$INSTDIR\dopewars.exe -c"
     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\dopewars command line options.lnk" "$INSTDIR\dopewars.exe -h"
-    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\dopewars help.lnk" "$INSTDIR\index.html"
+    CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\dopewars help.lnk" "$INSTDIR\doc\index.html"
     CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
   !insertmacro MUI_STARTMENU_WRITE_END
 SectionEnd