mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-06 21:17:48 +00:00
niminst: support for doc_start
This commit is contained in:
@@ -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
|
||||
-------------
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user