diff --git a/doc/niminst.txt b/doc/niminst.txt index 450732cd34..59a46268e9 100755 --- a/doc/niminst.txt +++ b/doc/niminst.txt @@ -86,10 +86,13 @@ will be installed into the OS's configuration directory. Documentation section --------------------- -The ``documentation`` section currently only supports the ``files`` key. +The ``documentation`` section supports the ``files`` key. Listed files will be installed into the OS's native documentation directory (which might be ``$appdir/doc``). +There is a ``start`` key which determines whether the Windows installer +generates a link to e.g. the ``index.html`` of your documentation. + Other section ------------- diff --git a/rod/nimrod.ini b/rod/nimrod.ini index 8491a46acf..b6dcf08e16 100644 --- a/rod/nimrod.ini +++ b/rod/nimrod.ini @@ -30,6 +30,7 @@ Files: "doc/*.txt" Files: "doc/*.html" Files: "doc/*.cfg" Files: "doc/*.pdf" +Start: "doc/overview.html" [Other] Files: "readme.txt;install.txt;contributors.txt" diff --git a/tools/inno.tmpl b/tools/inno.tmpl index 2121e40ce4..df1460e42a 100755 --- a/tools/inno.tmpl +++ b/tools/inno.tmpl @@ -31,7 +31,9 @@ Name: {group}\Console for $c.displayName; Filename: {cmd} #else: Name: {group}\$c.displayName; Filename: {app}\${c.name}.exe #end if -Name: {group}\Documentation; Filename: {app}\doc\overview.html + #for f in items(c.cat[fcDocStart]): +Name: {group}\Documentation; Filename: {app}\$f + #end for Name: {group}\{cm:UninstallProgram,$c.displayName}; Filename: {uninstallexe} #if c.binPaths.len > 0: diff --git a/tools/niminst.nim b/tools/niminst.nim index 292ea4a9eb..77cdfa16bf 100755 --- a/tools/niminst.nim +++ b/tools/niminst.nim @@ -41,7 +41,8 @@ type fcOther, # other files; will not be copied on UNIX fcWindows, # files only for Windows fcUnix, # files only for Unix; must be after ``fcWindows`` - fcUnixBin # binaries for Unix + fcUnixBin, # binaries for Unix + fcDocStart # links to documentation for Windows installer TConfigData = object of TObject actions: set[TAction] @@ -227,7 +228,11 @@ proc parseIniFile(c: var TConfigData) = of "winbin": filesOnly(p, k.key, v, c.cat[fcWinBin]) of "config": filesOnly(p, k.key, v, c.cat[fcConfig]) of "data": filesOnly(p, k.key, v, c.cat[fcData]) - of "documentation": filesOnly(p, k.key, v, c.cat[fcDoc]) + of "documentation": + case normalize(k.key) + of "files": addFiles(c.cat[fcDoc], split(v, {';'})) + of "start": addFiles(c.cat[fcDocStart], split(v, {';'})) + else: quit(errorStr(p, "unknown variable: " & k.key)) of "lib": filesOnly(p, k.key, v, c.cat[fcLib]) of "other": filesOnly(p, k.key, v, c.cat[fcOther]) of "windows":