updated reserve file info, fixes, html structure

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3265 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2003-12-09 19:33:48 +00:00
parent f850525a12
commit 516667fc1b
3 changed files with 166 additions and 177 deletions

View file

@ -22,7 +22,7 @@ p
margin: 20px; margin: 20px;
} }
center .center
{ {
text-align: center; text-align: center;
} }
@ -64,7 +64,7 @@ h2
h3 h3
{ {
font-size: 150%; font-size: 140%;
font-weight: bold; font-weight: bold;
color: #303030; color: #303030;
margin: 20px; margin: 20px;
@ -203,9 +203,8 @@ to the right. Use NSIS's $(^RTL) to fill this field, it's the easiest way.</td>
<td class="lefttable"><strong>State</strong></td> <td class="lefttable"><strong>State</strong></td>
<td class="lefttable"><em>(output)</em></td> <td class="lefttable"><em>(output)</em></td>
<td class="righttable">This is not something you have to supply yourself but is set by <td class="righttable">This is not something you have to supply yourself but is set by
InstallOptions, before calling your custom page validation function, to the field InstallOptions, before calling your custom page validation function, to the field number of the
number of the custom Button control (or other control having the Notify flag) the custom Button control (or other control having the Notify flag) the user pressed, if any.</td>
user pressed, if any.
</tr> </tr>
</table> </table>
<p>Each field section has the heading "Field #" where # must be sequential numbers from 1 to <p>Each field section has the heading "Field #" where # must be sequential numbers from 1 to
@ -217,7 +216,8 @@ NumFields. Each Field section can contain the following values:</p>
<td class="righttable">Type of control to be created. Valid values are "<em>Label</em>", <td class="righttable">Type of control to be created. Valid values are "<em>Label</em>",
"<em>Text</em>", "<em>Password</em>", "<em>Combobox</em>", "<em>DropList</em>", "<em>Listbox</em>", "<em>Text</em>", "<em>Password</em>", "<em>Combobox</em>", "<em>DropList</em>", "<em>Listbox</em>",
"<em>CheckBox</em>", "<em>RadioButton</em>", "<em>FileRequest</em>", "<em>DirRequest</em>" "<em>CheckBox</em>", "<em>RadioButton</em>", "<em>FileRequest</em>", "<em>DirRequest</em>"
"<em>Icon</em>", "<em>Bitmap</em>", "<em>GroupBox</em>", "<em>Link</em>" or "<em>Button</em>".<br /> "<em>Icon</em>", "<em>Bitmap</em>", "<em>GroupBox</em>", "<em>Link</em>" or
"<em>Button</em>".<br />
<br /> <br />
A "<em>Label</em>" is used to display static text. (i.e. a caption for a textbox)<br /> A "<em>Label</em>" is used to display static text. (i.e. a caption for a textbox)<br />
A "<em>Text</em>" and "<em>Password</em>" accept text input from the user. "<em>Password</em>" A "<em>Text</em>" and "<em>Password</em>" accept text input from the user. "<em>Password</em>"
@ -237,8 +237,8 @@ A "<em>Bitmap</em>" control displays a bitmap.<br />
A "<em>GroupBox</em>" control displays a frame to group controls.<br /> A "<em>GroupBox</em>" control displays a frame to group controls.<br />
A "<em>Link</em>" control displays a static hot text, when the user click the control the contents A "<em>Link</em>" control displays a static hot text, when the user click the control the contents
of <strong>State</strong> (e.g. http://...) will be executed using ShellExecute<br /> of <strong>State</strong> (e.g. http://...) will be executed using ShellExecute<br />
A "<em>Button</em>" control displays a push button that your NSIS script can act on A "<em>Button</em>" control displays a push button that your NSIS script can act on when pressed.
when pressed. See the "<em>NOTIFY</em>" flag for more information.</td> See the "<em>NOTIFY</em>" flag for more information.</td>
</tr> </tr>
<tr> <tr>
<td class="lefttable"><strong>Text</strong></td> <td class="lefttable"><strong>Text</strong></td>
@ -455,10 +455,9 @@ box.</td>
</tr> </tr>
<tr> <tr>
<td class="righttable">NOWORDWRAP</td> <td class="righttable">NOWORDWRAP</td>
<td class="righttable">Used by "<em>Text</em>" controls with multiple-line. Disables the <td class="righttable">Used by "<em>Text</em>" controls with multiple-line. Disables the word-wrap
word-wrap that occurs when long lines are entered. Long lines instead scroll off to the that occurs when long lines are entered. Long lines instead scroll off to the side. Specifying the
side. Specifying the HSCROLL flag also has this effect. HSCROLL flag also has this effect.</td>
</td>
</tr> </tr>
<tr> <tr>
<td class="righttable">HSCROLL</td> <td class="righttable">HSCROLL</td>
@ -478,12 +477,11 @@ text in the edit control, but allow the user to select and copy the text.</td>
<tr> <tr>
<td class="righttable">NOTIFY</td> <td class="righttable">NOTIFY</td>
<td class="righttable">Used by "<em>Button</em>", "<em>CheckBox</em>" and "<em>RadioButton</em>" <td class="righttable">Used by "<em>Button</em>", "<em>CheckBox</em>" and "<em>RadioButton</em>"
controls. Causes InstallOptions to call your NSIS custom page validation/leave function controls. Causes InstallOptions to call your NSIS custom page validation/leave function whenever
whenever the button is pressed. Your validation/leave function can read the "<em>State</em>" the button is pressed. Your validation/leave function can read the "<em>State</em>" value from the
value from the "<em>Settings</em>" section to determine which custom button has been "<em>Settings</em>" section to determine which custom button has been pressed, if any, and perform
pressed, if any, and perform some appropriate action followed by an Abort instruction some appropriate action followed by an Abort instruction (to tell NSIS to return to the page). The
(to tell NSIS to return to the page). The Contrib\InstallOptions folder contains an Contrib\InstallOptions folder contains an example script showing how this might be used.</td>
example script showing how this might be used.</td>
</tr> </tr>
</table> </table>
</td> </td>
@ -672,10 +670,12 @@ following values:</p>
(have a look at the example above).</p> (have a look at the example above).</p>
<p>If you want to check the user input immediately, for example, to display a warning when the <p>If you want to check the user input immediately, for example, to display a warning when the
input is invalid, you should check whether the user has pressed the Back or Next button.</p> input is invalid, you should check whether the user has pressed the Back or Next button.</p>
<p class="subheader">ReserveFile</p> <h2>Reserve files</h2>
<p>It you are using solid BZIP2 compression and your .onInit and Page functions are not above all <p>If you are using BZIP2 (solid) compression, it's important that files which are being extracted
other sections/functions with File commands, use ReserveFile on the top of your script to put the in init- or page functions function are located before other files in the data block, because this
DLL/INI files first in the data block, which will make your installer start faster:</p> will make your installer faster.</p>
<p>If there are File commands in your sections or functions above the init- or page functions, add
ReserveFile commands above your sections and functions:</p>
<pre> <pre>
ReserveFile "test.ini" ReserveFile "test.ini"
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll" ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"

View file

@ -452,7 +452,6 @@ Variable in which to store the selected folder.<br />
Does not disable the Next button when a folder is invalid but allows you to use GetInstDirError in Does not disable the Next button when a folder is invalid but allows you to use GetInstDirError in
the leave function to handle an invalid folder.</p> the leave function to handle an invalid folder.</p>
</div> </div>
<br />
<h3>Start Menu Folder Page Settings</h3> <h3>Start Menu Folder Page Settings</h3>
<div> <div>
<p>Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN <p>Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN
@ -633,9 +632,9 @@ language stored in the registry will be selected by default.</p>
</div> </div>
</div> </div>
<h2>6. Reserve files</h2> <h2>6. Reserve files</h2>
<p>If you are using BZIP2 (solid) compression, it's important that files which are being extracted <p>If you are using solid compression (by default, solid compression is enabled for BZip2 and
in init- or page functions function are located before other files in the data block, because this LZMA), it's important that files which are being extracted in init- or page functions function are
will make your installer faster.</p> located before other files in the data block, because this will make your installer faster.</p>
<p>If there are File commands in your sections or functions above the init- or page functions, add <p>If there are File commands in your sections or functions above the init- or page functions, add
the reserve file macros above your sections and functions.</p> the reserve file macros above your sections and functions.</p>
<pre> <pre>

View file

@ -1,138 +1,131 @@
<!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 XHTML 1.0 Strict//EN"
<html> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>VPatch 2</title> <title>VPatch 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css"> <style type="text/css">
/*<![CDATA[*/
body body
{ {
padding: 10px; padding: 10px;
background-color: #F0F0F0; background-color: #F0F0F0;
font-family: Verdana, Arial, Helvetica, sans-serif; font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt; font-size: 13px;
font-weight: normal; font-weight: normal;
} }
center p
{ {
text-align: center; font-size: 100%;
} margin: 20px;
}
.center
{
text-align: center;
}
table table
{ {
margin: auto; margin: auto;
text-align: left; text-align: left;
background-color: #FFFFFF; background-color: #FFFFFF;
} }
.maintable .maintable
{ {
border: 2px solid #376EAB; border: 2px solid #376EAB;
} }
.margin .parameter
{ {
margin: 20px; font-weight: bold;
} color: #6586AC;
}
.text
{
margin: 20px;
}
.bold h1
{ {
font-weight: bold; font-size: 220%;
} color: #333333;
font-weight: normal;
.italic text-align: center;
{ margin: 20px;
font-style: italic; }
}
h2
{
font-size: 165%;
color: #7A7272;
font-weight: normal;
}
h3
{
font-size: 140%;
font-weight: normal
color: #303030;
margin: 20px;
}
.bigheader pre {
{ font-size: 100%;
margin: 10px; margin: 20px;
font-size: 24pt; }
color: #333333;
text-align: center;
}
.header div
{ {
font-size: 14pt; margin: 20px;
color: #7A7272; }
}
.subheader
{
margin: 20px;
font-size: 11pt;
font-weight: bold;
color: #303030;
}
.footer
{
margin: 5px 5px 5px 5px;
text-align: right;
font-size: 8pt;
color: #909090;
}
a:link, a:visited, a:active a:link, a:visited, a:active
{ {
color: #294F75; color: #294F75;
text-decoration: none; text-decoration: none;
} }
a:hover a:hover
{ {
color: #182634; color: #182634;
text-decoration: none; text-decoration: underline;
} }
/*]]>*/
</style> </style>
</head> </head>
<body> <body>
<div class="center"> <div class="center">
<table width="750" class="maintable" cellspacing="0" cellpadding="0"> <table width="750" class="maintable" cellspacing="0" cellpadding="0">
<tr><td>
<table cellspacing="0" cellpadding="0">
<tr> <tr>
<td><p class="bigheader">VPatch 2</p></td> <td>
</tr> <h1>VPatch 2</h1>
<div>
<tr> <h2>Introduction</h2>
<td><div class="margin"> <p>VPatch allows to create a patch file to update previous versions of your software. The GenPat
<p class="header">Introduction</p> utitily generates the patch file. The plug-in can use the patch to update a file. Using a patch,
<p class="text">VPatch allows to create a patch file to update previous versions of you can reduce the download size of your updates, because only the differences between the files
your software. The GenPat utitily generates the patch file. The plug-in can use the are included in the patch file.</p>
patch to update a file. Using a patch, you can reduce the download size of your <h2>How to use</h2>
updates, because only the differences between the files are included in the patch <h3>Generate the patch file</h3>
file.</p> <p>Make sure you have the source file (original version) and the target file (version to update
<p class="header">How to use</p> to). For example, DATA.DTA (currently on user system) and DATA_20.DTA (version 2.0 of this data
<p class="subheader">Generate the patch file</p> file). Now call the command line tool GenPat.exe:</p>
<p class="text">Make sure you have the source file (original version) and the target file (version <pre>
to update to). For example, DATA.DTA (currently on user system) and DATA_20.DTA GENPAT data.dta data_20.dta data.pat
(version 2.0 of this data file). Now call the command line tool GenPat.exe:</p> </pre>
<pre class="margin">GENPAT data.dta data_20.dta data.pat</pre> <p>Now, the patch will be generated, this will take some time.</p>
<p class="text">Now, the patch will be generated, this will take some time.</p> <p>Using the /B=(BlockSize) parameter of the GenPat utility (put it after the filenames), you can
<p class="text">Using the /B=(BlockSize) parameter of the GenPat utility (put it after use a different block size. A smaller block size may result in a smaller patch, but the generation
the filenames), you can use a different block size. A smaller block size may result in will take more time (the default blocksize is 64).</p>
a smaller patch, but the generation will take more time (the default blocksize is 64).</p> <h3>Update the file during installation</h3>
<p class="subheader">Update the file in your installer</p> <p>Use the VPatch plug-in to update a file using a patch file:</p>
<p class="text">Use the VPatch plug-in to update a file using a patch file:</p> <pre>
<pre class="margin">vpatch::vpatchfile "pathfile.pat" "source.file" "new.file"</pre> vpatch::vpatchfile "pathfile.pat" "source.file" "new.file"
<p class="text">The result of the patch operating will be added to the stack and can </pre>
be one of the following texts:</p> <p>The result of the patch operating will be added to the stack and can be one of the following
texts:</p>
<ul> <ul>
<li>OK</li> <li>OK</li>
<li>OK, new version already installed</li> <li>OK, new version already installed</li>
@ -140,53 +133,53 @@ be one of the following texts:</p>
<li>Patch data is invalid or corrupt</li> <li>Patch data is invalid or corrupt</li>
<li>No suitable patches were found</li> <li>No suitable patches were found</li>
</ul> </ul>
<p class="text">Check <a href="example.nsi">example.nsi</a> for an example.</p> <p>Check <a href="example.nsi">example.nsi</a> for an example.</p>
<p class="subheader">Multiple patches in one file</p> <h3>Multiple patches in one file</h3>
<p class="text">GenPat appends a patch to the file you specified. If there is already a patch <p>GenPat appends a patch to the file you specified. If there is already a patch for the same
for the same orginal file in the patch file, the patch will be replaced. For example, if you want orginal file in the patch file, the patch will be replaced. For example, if you want to be able to
to be able to upgrade version 1 and 2 to version 3, you can put a 1 &gt; 3 and 2 &gt; 3 patch in one upgrade version 1 and 2 to version 3, you can put a 1 &gt; 3 and 2 &gt; 3 patch in one file.</p>
file.</p> <p>You can also put patches for different files in one patch file, for example, a patch from file A
<p class="text">You can also put patches for different files in one patch file, for example, a version 1 to file A version 2 and a patch from file B version 1 to file B version 2. Just call the
patch from file A version 1 to file A version 2 and a patch from file B version 1 to plug-in multiple times with the same patch file. It will automatically select the right patch
file B version 2. Just call the plug-in multiple times with the same patch file. It (based on the file CRC).</p>
will automatically select the right patch (based on the file CRC).</p> <h2>Source code</h2>
<p class="header">Source code</p> <h3>NSIS plug-in (C++)</h3>
<p class="subheader">NSIS plug-in (C++)</p> <p>The source of the NSIS plug-in that applies patches can be found in the Source\Plugin
<p class="text">The source of the NSIS plug-in that applies patches can be found in the folder.</p>
Source\Plugin folder.</p> <h3>Patch Generator (Delphi)</h3>
<p class="subheader">Patch Generator (Delphi)</p> <p>The most interesting part of VPatch, the actual patch generation algoritm, can be found in
<p class="text">The most interesting part of VPatch, the actual patch generation algoritm, Source\GenPat\PatchGenerator.pas. The header of that file contains a brief explanation of the
can be found in Source\GenPat\PatchGenerator.pas. The header of that file contains a brief algoritm as well.</p>
explanation of the algoritm as well.</p> <h3>User interface (Delphi)</h3>
<p class="subheader">User interface (Delphi)</p> <p>A user interface is included as well, which you will have to build yourself because the GUI
<p class="text">A user interface is included as well, which you will have to build yourself executable was too large to include. Besides Borland Delphi 6 or higher (you can use the freely
because the GUI executable was too large to include. Besides Borland Delphi 6 or higher available Personal edition), you will also need to install the <a href=
(you can use the freely available Personal edition), you will also need to install the "http://www.delphi-gems.com">VirtualTreeView</a> component by Mike Lischke.</p>
<a href="http://www.delphi-gems.com">VirtualTreeView</a> component by Mike Lischke.</p> <h2>Version history</h2>
<p class="header">Version history</p>
<ul> <ul>
<li>2.0 final <li>2.0 final
<ul> <ul>
<li>Cleaned up source code for the patch generator, which is now included (this code is <li>Cleaned up source code for the patch generator, which is now included (this code is written in
written in Borland Delphi 6 and compiles with the freely available Personal edition).</li> Borland Delphi 6 and compiles with the freely available Personal edition).</li>
</ul> </ul>
</li> </li>
<li>2.0 beta 2 <li>2.0 beta 2
<ul> <ul>
<li>All new algorithm used in the patch generator: much faster (up to 90%) while using <li>All new algorithm used in the patch generator: much faster (up to 90%) while using smaller
smaller block sizes (higher compression)</li> block sizes (higher compression)</li>
<li>Created a NSIS 2 plugin</li> <li>Created a NSIS 2 plugin</li>
<li>Works with small files</li> <li>Works with small files</li>
<li>Replaces existing patch in file if original file CRC is identical</li> <li>Replaces existing patch in file if original file CRC is identical</li>
</ul> </ul>
</li> </li>
</ul> </ul>
<p class="header">Credits</p> <h2>Credits</h2>
<p class="text">Written by Koen van de Sande<br /> <p>Written by Koen van de Sande<br />
C plug-in by Edgewize<br /> C plug-in by Edgewize<br />
New documentation and example by Joost Verburg</p> New documentation and example by Joost Verburg</p>
<p class="header">License</p> <h2>License</h2>
<pre class="margin">Copyright (C) 2001-2003 Koen van de Sande <pre>
Copyright (C) 2001-2003 Koen van de Sande
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -203,13 +196,10 @@ 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></td> </td>
</tr> </tr>
</table>
</td></tr>
</table> </table>
</div> </div>
</body> </body>
</html> </html>