niminst: support for doc_start

This commit is contained in:
Araq 2010-11-02 07:51:07 +01:00
commit 7e356f6ef2
4 changed files with 15 additions and 4 deletions

View file

@ -86,10 +86,13 @@ will be installed into the OS's configuration directory.
Documentation section 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 Listed files will be installed into the OS's native documentation directory
(which might be ``$appdir/doc``). (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 Other section
------------- -------------

View file

@ -30,6 +30,7 @@ Files: "doc/*.txt"
Files: "doc/*.html" Files: "doc/*.html"
Files: "doc/*.cfg" Files: "doc/*.cfg"
Files: "doc/*.pdf" Files: "doc/*.pdf"
Start: "doc/overview.html"
[Other] [Other]
Files: "readme.txt;install.txt;contributors.txt" Files: "readme.txt;install.txt;contributors.txt"

View file

@ -31,7 +31,9 @@ Name: {group}\Console for $c.displayName; Filename: {cmd}
#else: #else:
Name: {group}\$c.displayName; Filename: {app}\${c.name}.exe Name: {group}\$c.displayName; Filename: {app}\${c.name}.exe
#end if #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} Name: {group}\{cm:UninstallProgram,$c.displayName}; Filename: {uninstallexe}
#if c.binPaths.len > 0: #if c.binPaths.len > 0:

View file

@ -41,7 +41,8 @@ type
fcOther, # other files; will not be copied on UNIX fcOther, # other files; will not be copied on UNIX
fcWindows, # files only for Windows fcWindows, # files only for Windows
fcUnix, # files only for Unix; must be after ``fcWindows`` 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 TConfigData = object of TObject
actions: set[TAction] actions: set[TAction]
@ -227,7 +228,11 @@ proc parseIniFile(c: var TConfigData) =
of "winbin": filesOnly(p, k.key, v, c.cat[fcWinBin]) of "winbin": filesOnly(p, k.key, v, c.cat[fcWinBin])
of "config": filesOnly(p, k.key, v, c.cat[fcConfig]) of "config": filesOnly(p, k.key, v, c.cat[fcConfig])
of "data": filesOnly(p, k.key, v, c.cat[fcData]) 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 "lib": filesOnly(p, k.key, v, c.cat[fcLib])
of "other": filesOnly(p, k.key, v, c.cat[fcOther]) of "other": filesOnly(p, k.key, v, c.cat[fcOther])
of "windows": of "windows":