Support dark mode in simple docs

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7322 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2021-09-13 16:34:38 +00:00
parent 0d298349d4
commit c7516acf94
3 changed files with 64 additions and 91 deletions

View file

@ -1,11 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html lang="en">
<head> <head>
<title>NSIS System Plug-in</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="color-scheme" content="light dark">
<title>System Plug-in (NSIS)</title>
<style type="text/css"> <style type="text/css">
html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; background-color: #ffffff; } :root { color-scheme: light dark; }
html, body { font-family: Verdana, Arial, Helvetica, sans-serif; }
html { font-size: 0.84em; } html { font-size: 0.84em; }
body { font-size: 1em; font-size: 1rem; } body { font-size: 1em; font-size: 1rem; }
pre, code { font-family: Courier New, Courier, monospace,serif; font-size: 100%; } pre, code { font-family: Courier New, Courier, monospace,serif; font-size: 100%; }
@ -17,6 +19,10 @@ h5 { font-size: 115%; }
h6 { font-size: 110%; } h6 { font-size: 110%; }
blockquote { margin:0; padding:0; margin-left: 0.5em; } blockquote { margin:0; padding:0; margin-left: 0.5em; }
blockquote pre { background-color: #fefefe; } blockquote pre { background-color: #fefefe; }
@media (prefers-color-scheme: dark) {
blockquote pre { background-color: #202020; }
}
</style> </style>
</head> </head>
<body> <body>
@ -237,7 +243,7 @@ DetailPrint $4
</tr> </tr>
<tr> <tr>
<th><i>IPTR</i>-><i>IDX</i></th> <th><i>IPTR</i>-><i>IDX</i></th>
<td>Member indexed <i>IDX</i> from<br/>interface pointed by <i>IPTR</i></td> <td>Member indexed <i>IDX</i> from<br>interface pointed by <i>IPTR</i></td>
<td><a href="#com">see below</a></td> <td><a href="#com">see below</a></td>
</tr> </tr>
<tr> <tr>
@ -306,11 +312,11 @@ DetailPrint $4
<th>k</th> <th>k</th>
<td>callback</td> <td>callback</td>
</tr> </tr>
<tr>
<th>@</th> <th>@</th>
<td>Direct register memory access (Buffer is limited to <code>(NSIS_MAX_STRLEN - 24) * NSIS_CHAR_SIZE</code> bytes)</td> <td>Direct register memory access (Buffer is limited to <code>(NSIS_MAX_STRLEN - 24) * NSIS_CHAR_SIZE</code> bytes)</td>
</tr> </tr>
<tr> <tr>
<tr>
<th>&amp;v<i>N</i></th> <th>&amp;v<i>N</i></th>
<td><i>N</i> bytes padding (structures only)</td> <td><i>N</i> bytes padding (structures only)</td>
</tr> </tr>
@ -360,7 +366,7 @@ DetailPrint $4
<td>concrete hex, decimal or octal integer value. several integers can be or'ed using the pipe symbol (`|')</td> <td>concrete hex, decimal or octal integer value. several integers can be or'ed using the pipe symbol (`|')</td>
</tr> </tr>
<tr> <tr>
<th>'<i>string</i>'<br/>"<i>string</i>"<br/>`<i>string</i>`</th> <th>'<i>string</i>'<br>"<i>string</i>"<br>`<i>string</i>`</th>
<td>concrete string value</td> <td>concrete string value</td>
</tr> </tr>
<tr> <tr>
@ -368,7 +374,7 @@ DetailPrint $4
<td>$0 through $9 respectively</td> <td>$0 through $9 respectively</td>
</tr> </tr>
<tr> <tr>
<th><i>r10</i> through <i>r19</i><br/><i>R0</i> through <i>R9</i></th> <th><i>r10</i> through <i>r19</i><br><i>R0</i> through <i>R9</i></th>
<td>$R0 through $R9 respectively</td> <td>$R0 through $R9 respectively</td>
</tr> </tr>
<tr> <tr>

View file

@ -1,12 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>VPatch 3</title> <title>VPatch 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css"> <style type="text/css">
/*<![CDATA[*/ /*<![CDATA[*/
:root { color-scheme: light dark; }
html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; background-color: #ffffff; } html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; background-color: #ffffff; }
html { font-size: 0.84em; } html { font-size: 0.84em; }
body { font-size: 1em; font-size: 1rem; } body { font-size: 1em; font-size: 1rem; }
@ -21,49 +22,23 @@ h6 { font-size: 110%; }
body body
{ {
padding:1.5em 0; margin:0; padding:1.5em 0; margin:0;
background-color: #F0F0F0;
font-family: Verdana, Arial, Helvetica, sans-serif; font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: normal; font-weight: normal;
text-align: left; text-align: left;
} }
p, li p, li { font-size: 1em; }
{
font-size: 1em;
}
.center
{
text-align: center;
}
table table
{ {
margin: auto; margin: auto;
font-size: 1em; font-size: 1em;
background-color: #FFFFFF;
} }
.maintable
{
border: 2px solid #376EAB;
width: 90%;
}
.parameter
{
font-weight: bold;
color: #6586AC;
}
h1 h1
{ {
font-size: 250%; font-size: 250%;
color: #333333; color: #333333;
font-weight: normal; font-weight: normal;
text-align: center; text-align: center;
margin-top: 2em;
} }
h2 h2
@ -85,30 +60,25 @@ div
margin: 1.5em; margin: 1.5em;
} }
a:link, a:visited, a:active a:link, a:visited, a:active { color: #294F75; text-decoration: none; }
{ a:hover { color: #182634; text-decoration: underline; }
color: #294F75;
text-decoration: none;
}
a:hover
{
color: #182634;
text-decoration: underline;
}
.T tr:nth-child(odd) { background-color: #fafafa; } .T tr:nth-child(odd) { background-color: #fafafa; }
.T tr, .T td { border: 1px solid #f2f2f2; border-collapse: collapse; padding: 0.2em; } .T tr, .T td { border: 1px solid #f5f5f5; border-collapse: collapse; padding: 0.2em; }
@media (prefers-color-scheme: dark) {
html, body { color: #eeeeee; background-color:#161616; }
h1, h2, h3, h4, h5, h5 { color: inherit; }
a, a:link, a:visited, a:active { color: #4be; } a:hover { color: #6df; }
.T tr:nth-child(odd) { background-color: #222222; }
.T tr, .T td { border: 1px solid #202020; border-collapse: collapse; padding: 0.2em; }
}
/*]]>*/ /*]]>*/
</style> </style>
</head> </head>
<body> <body>
<table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center"> <h1>VPatch 3.1</h1>
<tr>
<td>
<h1>VPatch 3.1</h1>
<div> <div>
<h2>Introduction</h2> <h2>Introduction</h2>
<div> <div>
@ -126,9 +96,7 @@ a:hover
file (version to update to). For example, DATA.DTA (currently on user file (version to update to). For example, DATA.DTA (currently on user
system) and DATA_20.DTA (version 2.0 of this data file). Now call system) and DATA_20.DTA (version 2.0 of this data file). Now call
the command line tool GenPat.exe:</p> the command line tool GenPat.exe:</p>
<pre> <pre>GENPAT oldfile.txt newfile.txt patch.pat</pre>
GENPAT oldfile.txt newfile.txt patch.pat
</pre>
<p>Now, the patch will be generated, this will take some time.</p> <p>Now, the patch will be generated, this will take some time.</p>
<p>Using the /B=(BlockSize) parameter of the GenPat utility (put it <p>Using the /B=(BlockSize) parameter of the GenPat utility (put it
after the filenames), you can use a different block size. A smaller after the filenames), you can use a different block size. A smaller
@ -141,9 +109,7 @@ GENPAT oldfile.txt newfile.txt patch.pat
<h3>Update the file during installation</h3> <h3>Update the file during installation</h3>
<div> <div>
<p>Use the VPatch plug-in to update a file using a patch file:</p> <p>Use the VPatch plug-in to update a file using a patch file:</p>
<pre> <pre>vpatch::vpatchfile "patch.pat" "oldfile.txt" "temporary_newfile.txt"</pre>
vpatch::vpatchfile "patch.pat" "oldfile.txt" "temporary_newfile.txt"
</pre>
<p>The result of the patch operating will be added to the stack and <p>The result of the patch operating will be added to the stack and
can be one of the following texts:</p> can be one of the following texts:</p>
<ul> <ul>
@ -226,8 +192,7 @@ vpatch::vpatchfile "patch.pat" "oldfile.txt" "temporary_newfile.txt"
<p>A user interface is included as well, which you will have to build <p>A user interface is included as well, which you will have to build
yourself because the GUI executable was too large to include. Besides yourself because the GUI executable was too large to include. Besides
Borland Delphi 6 or higher (you can use the freely available Personal Borland Delphi 6 or higher (you can use the freely available Personal
edition), you will also need to install the <a href= edition), you will also need to install the <a href="http://www.delphi-gems.com">VirtualTreeView</a> component by Mike Lischke.</p>
"http://www.delphi-gems.com">VirtualTreeView</a> component by Mike Lischke.</p>
</div> </div>
</div> </div>
<h2>Version history</h2> <h2>Version history</h2>
@ -310,13 +275,12 @@ vpatch::vpatchfile "patch.pat" "oldfile.txt" "temporary_newfile.txt"
</div> </div>
<h2>Credits</h2> <h2>Credits</h2>
<div> <div>
<p>Written by Koen van de Sande<br /> <p>Written by Koen van de Sande.<br>
C plug-in initially by Edgewize, updated by Koen van de Sande<br /> C plug-in initially by Edgewize, updated by Koen van de Sande.<br>
New documentation and example by Joost Verburg and Koen van de Sande</p> New documentation and example by Joost Verburg and Koen van de Sande.</p>
</div> </div>
<h2>License</h2> <h2>License</h2>
<div> <div><pre>
<pre>
Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
@ -334,11 +298,8 @@ it freely, subject to the following restrictions:
2. Altered versions must be plainly marked as such, 2. Altered versions must be plainly marked as such,
and must not be misrepresented as being the original software. and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any distribution. 3. This notice may not be removed or altered from any distribution.
</pre> </pre></div>
</div> </div>
</div>
</td>
</tr>
</table>
</body> </body>
</html> </html>

View file

@ -1,19 +1,30 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html lang="en">
<head> <head>
<title>nsDialogs</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light dark">
<title>nsDialogs</title>
<style type="text/css"> <style type="text/css">
:root { color-scheme: light dark; }
html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; background-color: #ffffff; } html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; background-color: #ffffff; }
html { font-size: 0.85em; } html { font-size: 0.85em; }
body { font-size: 1em; font-size: 1rem; } body { font-size: 1em; font-size: 1rem; }
blockquote { margin: 0.75em; } .faq blockquote { margin-left: 0; }
pre, code { font-family: Courier New, Courier, monospace,serif; font-size: 100%; } pre, code { font-family: Courier New, Courier, monospace,serif; font-size: 100%; }
b { color: #bb0000; }
code { margin-left: 1.2em; padding: 0.5em; background-color: #f0f0f0; display:inline-block; }
span.inlcod i { padding: 0px 0.2em; color: #444444; font-size:95%; } span.inlcod i { padding: 0px 0.2em; color: #444444; font-size:95%; }
blockquote pre { background-color: #fcfcfc; } code { margin-left: 1.2em; padding: 0.5em; background-color: #f0f0f0; display:inline-block; }
blockquote pre { background-color: #fafafa; padding:0.5em; overflow: auto; }
blockquote pre > b { color: #bb0000; }
abbr { font-variant: none; cursor: help; } abbr { font-variant: none; cursor: help; }
@media (prefers-color-scheme: dark) {
html, body { color: #eeeeee; background-color:#161616; }
span.inlcod i { color: #bbbbbb; }
code { background-color: #202020; }
blockquote pre { background-color: #222222; }
blockquote pre > b { color: #eebbbb; }
}
</style> </style>
</head> </head>
<body> <body>
@ -141,7 +152,7 @@ NSD_CB_Clear,
<h2><a name="intro"></a>Introduction</h2> <h2><a name="intro"></a>Introduction</h2>
<p>nsDialogs allows creation of custom pages in the installer. On top of the built-in pages, nsDialogs can create pages with any type of controls in any order and arrangement. It can create everything from a simple page with one label to form which reacts to user's actions. <a href="../Modern UI 2/Readme.html">Modern UI 2</a>, for example, uses nsDialogs to create the welcome and finish pages.</p> <p>nsDialogs allows creation of custom pages in the installer. On top of the built-in pages, nsDialogs can create pages with any type of controls in any order and arrangement. It can create everything from a simple page with one label to form which reacts to user's actions. <a href="../Modern%20UI%202/Readme.html">Modern UI 2</a>, for example, uses nsDialogs to create the welcome and finish pages.</p>
<p>nsDialogs is a NSIS plug-in, introduced in version 2.29 as a replacement for <a href="../InstallOptions/Readme.html">InstallOptions</a>. nsDialogs doesn't use INI files, so it's way faster than InstallOptions. Integration with the script is tighter and more natural - creating controls is done using plug-in functions and notification is done by directly calling a function in the script. Unlike InstallOptions, there isn't a predefined set of available control type and by providing a lower level access to Windows API, every type of control can be created and pages can be more customizable.</p> <p>nsDialogs is a NSIS plug-in, introduced in version 2.29 as a replacement for <a href="../InstallOptions/Readme.html">InstallOptions</a>. nsDialogs doesn't use INI files, so it's way faster than InstallOptions. Integration with the script is tighter and more natural - creating controls is done using plug-in functions and notification is done by directly calling a function in the script. Unlike InstallOptions, there isn't a predefined set of available control type and by providing a lower level access to Windows API, every type of control can be created and pages can be more customizable.</p>
@ -472,7 +483,7 @@ SectionEnd</pre></blockquote>
<p><code>nsDialogs::SelectFileDialog <i>mode</i> <i>initial_selection</i> <i>filter</i></code></p> <p><code>nsDialogs::SelectFileDialog <i>mode</i> <i>initial_selection</i> <i>filter</i></code></p>
<p>Displays a file selection dialog to the user. If <i>mode</i> is set to <i>save</i>, displays a file save dialog. If <i>mode</i> is set to <i>open</i>, displays a file open dialog. <p>Displays a file selection dialog to the user. If <i>mode</i> is set to <i>save</i>, displays a file save dialog. If <i>mode</i> is set to <i>open</i>, displays a file open dialog.
<p><i>initial_selection</i> can be used to provide the user with a default file to look for and/or a default folder to look in. If <i>initial_selection</i> is empty no default filename will be provided for the user and the dialog will start in the current working directory. If <i>initial_selection</i> specifies just a filename, for example "test.exe", the dialog will be set up to look for a file called test.exe in the current working directory. If <i>initial_selection</i> specifies just a directory, for example "C:\Program Files", the dialog starts in the provided directory with no file name provided. If <i>initial_selection</i> specifies a directory and a filename, for example "C:\Windows\System32\calc.exe", the dialog will be set up to look for a file called calc.exe in the directory C:\Windows\System32.</p> <p><i>initial_selection</i> can be used to provide the user with a default file to look for and/or a default folder to look in. If <i>initial_selection</i> is empty no default filename will be provided for the user and the dialog will start in the current working directory. If <i>initial_selection</i> specifies just a filename, for example "test.exe", the dialog will be set up to look for a file called test.exe in the current working directory. If <i>initial_selection</i> specifies just a directory, for example "C:\Program Files", the dialog starts in the provided directory with no file name provided. If <i>initial_selection</i> specifies a directory and a filename, for example "C:\Windows\System32\calc.exe", the dialog will be set up to look for a file called calc.exe in the directory C:\Windows\System32.</p>
<i>filter</i> is a list of available file filter pairs separated by pipes. A filter pair consists of a display string and a <a href="https://blogs.msdn.microsoft.com/jeremykuhne/2017/06/04/wildcards-in-windows/">DOS-style wildcard pattern</a>. If an empty string is passed, the default is used (<i>"All Files|*.*"</i>).</p> <p><i>filter</i> is a list of available file filter pairs separated by pipes. A filter pair consists of a display string and a <a href="https://blogs.msdn.microsoft.com/jeremykuhne/2017/06/04/wildcards-in-windows/">DOS-style wildcard pattern</a>. If an empty string is passed, the default is used (<i>"All Files|*.*"</i>).</p>
<p>Returns the selected file on the stack or an empty string if the user canceled the operation.</p> <p>Returns the selected file on the stack or an empty string if the user canceled the operation.</p>
<blockquote><pre> <blockquote><pre>
nsDialogs::SelectFileDialog open "$DOCUMENTS\Config.ini" ".ini files|*.ini|All Files|*.*" nsDialogs::SelectFileDialog open "$DOCUMENTS\Config.ini" ".ini files|*.ini|All Files|*.*"
@ -852,20 +863,15 @@ SectionEnd</pre></blockquote>
<h2><a name="faq"></a>FAQ</h2> <h2><a name="faq"></a>FAQ</h2>
<div class="faq">
<div>
<ul> <ul>
<li> <li>
<b>Q:</b> Can nsDialogs handle InstallOptions INI files? <b>Q:</b> Can nsDialogs handle InstallOptions INI files?
<blockquote> <blockquote>
<p><b>A:</b> nsDialogs.nsh contains a function called <i>CreateDialogFromINI</i> that can create nsDialogs' dialog from an INI file. It can handle every type of control InstallOptions supports, but doesn't handle the flags or notifications. <i>Examples\nsDialogs\InstallOptions.nsi</i> shows a usage example of this function.</p> <p><b>A:</b> nsDialogs.nsh contains a function called <i>CreateDialogFromINI</i> that can create nsDialogs' dialog from an INI file. It can handle every type of control InstallOptions supports, but doesn't handle the flags or notifications. <i>Examples\nsDialogs\InstallOptions.nsi</i> shows a usage example of this function.</p>
</blockquote> </blockquote>
</li> </li>
</ul> </ul>
</div> </div>
</body> </body>