Archive: typos in the docs ...


typos in the docs ...
hello nsis-developer-team!

i've found some bugs in the nsis-documentations:

4.5.3 Callbacks
[...]
Examples:
[...]
Function skipLicense
MessageBox MB_YES "Do you want to skip the license page?" IDNO no
Abort
no:
FunctionEnd
Function stayInLicense
MessageBox MB_YES "Do you want to stay in the license page?" IDNO no
Abort
no:
FunctionEnd
[...]
[...]
in the example-code there's the flag 'MB_YES' set for messageboxes. that must be 'MB_YESNO' instead.


5.4.3 !ifndef
gflag [bcheck [gflag [...]]]
The opposite of !ifmacrodef. The lines will be compiled when the gflag has not been defined.
i think this is the opposite of '!ifdef', not of '!ifmacrodef'.


5.4.6 !else
[...]
This command is the opposite of !ifdef [...]
i'd say: it can be the opposite of "!ifdef, !ifndef, !ifmacrodef, !ifmacrondef".


hmm, that's it for now, i'll post more bugs in here, whenever i found some.

Thanks, fixed.


a typo:

4.9.3.2 CopyFiles
[...]You might see a Windows status window of the copy operation takes a lot of time (to disable this, use /SILENT).[...]
missing "if it" between "... copy operation" and "takes a lot ...". or is my english to bad? ;)

Fixed again.


you fixed this one and implemented another :D:

You might see a Windows status window of the copy operation if the operation takes takes a lot of time (to disable this, use /SILENT).

Heh :) Fixed.


another typo:

4.9.3.2 CopyFiles
[...]The last parameter can be used to specify the size of the files that will be copies (in kilobytes), [...]
must be "copied"
:D

Someone was definately not really awake when writing that line :D Fixed.


found some more.
usually default-settings are shown by underline and bold.
missing at the following topics:
- 4.9.14.10 SetAutoClose
- 4.9.14.12 SetDetailsView
- 4.9.14.13 SetDetailsPrint
- 4.9.14.15 SetSilent


That's because they are instructions, no attributes. There is no default.

AutoCloseWindow etc. do have a default.


ok, understood


some more:

C.5 Calling an external DLL using the System.dll plugin
[...]
... and head on over to the Contrib/System directory and read the doco there.
[...]
l - long & large integer (know as int64)
[...]
the bold words are wrong, i think.
must be docs and known.

Thanks, fixed.


to warm up this thread :) ...

4.10.3 RTL Languages
... current langaugeis RTL or not ...

Wow.....someone actually reads the documentation.....:D

BTW:

4.9.3.2 CopyFiles
[...]You might see a Windows status window of the copy operation takes a lot of time (to disable this, use /SILENT).[...]
The only problem with the original was a single typo. 'of' should have read 'if'. Though long and drawn out, the one you changed it to makes sense as well.

Cheers,

ZIMSMS

Thanks, fixed.


aaah, zimsms, that was the other one i saw one time, but forgot to post :)

and another one:

5.1.8 !packhdr
This option makes the compiler an external EXE packer (such as Petite or UPX) to compress the executable header.
i think, between the two bold words, there's a word missing, like "use":
"This option makes the compiler use and external ..."

unlogical:
4.9.4.11 IfRebootFlag
[jump_if_set] [jump_if_not_set]
Atleast one parameter is required. ...
i'd remove the [] for "jump_if_set", because it is always required to be set.
same for "4.9.4.12 IfSilent"
see "4.9.4.9 IfErrors" for 'correct' example :).

and wtf does this mean????
4.9.5.7 FileWriteByte
You can If an error occurs writing, the error flag will be set.

fixed.


time to raise up this topic again:

E.1.1.4 Utilities and Plug-ins
StartMenu: Added support for SetCtlColors (RFE #711900
missing )

4.6.1.5 SectionGroup
[/e] Caption [section_group_name index output]
should be index_output, to make clear, that this is ONE parameter.
also in the following explanation:
If section index output is specified
that's it for now :)

The missing parenthesis was fixed while 2.06 was being released. I didn't want to recompile the whole thing, so I've left it to the next version.

index output -> index_output. done.


Didn't want to tie up a new thread for this, but the special builds web page still says:

"...These builds are only compatible with NSIS 2.05..."

But it looks like the downloadable builds are 2.06, thanks.


Just noticed a small typo under CallInstDLL in the example: anoter

-Stu


Thanks, both fixed.


There is a typo under "4.11.2 Disabling Plugin Unloading" example:

dll:function /NOUNLOAD "param"
Forgot a ":".

Thanks, fixed.


Under 1.1 (about NSIS)
unsuccesful should be spelt unsuccessful (it is in native English anyway).
In the second paragraph support should have an s on the end.

Under 1.2 under "Custom dialogs and interfaces" in the last sentence, a should be your.
Under "Easy and human readable file formats" human would make more sense as humanly.

Under 2.1 in the last paragraph and last sentence, have should be has.

Under 2.3.6, in the second code example for macro's, a !macroend is missing.

Under 2.4, in the third paragraph at the start of the thrid sentence, error should be errors.

Under 2.6 in the last paragraph, there's a repetition of in after plug-in.

Under 3.1, /NOCD, disabled I think should be disables.

That's it for now. I will read up more later :)
This is the first time I've actually read the NSIS documentation from the start!

-Stu


Under 4.1, just before the Plug-ins heading, 'you' is missing from the sentence.
Under the Long commands heading, 'to' should be after 'concatenated'.

Under 4.2.3, $EXEDIR, the full stop needs to be moved to the end.
$WINDIR, $SYSDIR and $TEMP are missing full stops.

-Stu


Thanks, all fixed but:

Under 2.1 in the last paragraph and last sentence, have should be has.
Are you sure about this one? The sentence already has one "has".

For more than a couple of changes, it'd be nice if you edit the .but files and submit a patch.

Yes it doesn't make sense with 'have'. You could only use have there if it were past tense (ie "it would still have") but in this case it isn't so it doesn't quite make sense.

Everything else is perfect though. Whoever wrote the docs would all get A grades in English class for writing :)

For patches: Roger, will do. I will read the rest of the documents tomorrow.

-Stu


I am pretty sure I remember my English teacher saying you can't have more than one "has" in a sentence. I'll to check it a bit more thoroughly over the weekend.


"The dog has a bone, and the dog has a phone". I don't see anything wrong with that (apart from having a phone lol!)

If we were to put 'have' in there, we'd have to change it to:
"The dog has a bone, and the dog used to have a phone"; in order for it to make sense, but then that changes it completely (to past tense).

The only thing that sounds bad when used more than once in the same sentence is 'and' (which is where we use commas).

Hope that makes sense :)

-Stu


It appears you were right. However, while checking it, I got a suggestion for a better sentence which I eventually used.

NSIS boasts the smallest overhead available while still providing a lot of options thanks to its powerful scripting language and support of external plug-ins.

I found a small error at the end of Chapter 4 contents (HTML error):
http://nsis.sourceforge.net/Docs/Chapter4.html

-Stu


And the error is? Don't leave me hanging :)


Sorry Kichik, I couldn't reproduce the HTML error at home. It must have been the college computers at fault (with their stupid content blockers which probably meant only half the page was loading or something.)

-Stu


4.12 Silent Installers/Uninstallers
[...]The above example will copy the value the user passes on after /USRNAME= into $0.[...]
I think /USRNAME must be changed to /USERNAME.

Thanks, fixed.


I found a small error at the end of Chapter 4 contents (HTML error):
http://nsis.sourceforge.net/Docs/Chapter4.html

-Stu
ran the file through html-tidy from w3c.
found two fixable mistakes:
<address>
</address>
<a href="http://sourceforge.net"><img border=0 src="http://sourceforge.net/sflogo.php?group_id=22049&amp;type=1" alt="SourceForge Logo"></a></body>

> the adress tag is emtpy
> the img tag is not closed.

there were lots of other warnings too, but i dont think, they make sense.

If you are unsure how to close the img tag, it should be:
<img border=0 src="http://sourceforge.net/sflogo.php?group_id=22049&amp;amp;type=1" alt="SourceForge Logo" />

Not to mension & should be &amp;amp; too (if it isn't already).

-Stu


In section 8 of the MUI Readme, there is:

For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTIONS_DESCRIPTION_END macros.
Which should be MUI_UNFUNCTION_DESCRIPTION_END, no s.

-auz

Archive: typos in the docs ...


Thanks, fixed.


4.8.1.21 InstallDir:
"Sets the default installation directory is." remove is (doh)


Thanks, fixed.


4.9.14.5 FindWindow

FIndWindow $0 "my window class" "my window title"
It should be Findwindow


4.9.14.1 BringToFront
... If the user if working with another ...

I think it should be - If the user is working


Thanks, fixed.


4.7.2.1.6 .onMouseOverSection
STR: prefix is missing from lparam (in example code)

the docs also needs to be more clear about the description label, eg you actually have to use resource hacker to add a label (or use a existing label like in the ugly hack i did here: http://www.rafb.net/paste/results/XTG9Pd58.html )


Thanks, fixed.


And what about

Variables

Variables start with $. User variables should be declared and are case-sensitive.
Is this mean - variables names are case-sensitive?
This code work fine:

var vv1
...
StrCpy $Vv1 "1 string 1"
MessageBox MB_OK "$vV1"

Is this typo, or NSIS bug, or I misunderstood something in docs?

Just a relic from the old days when variables were case sensitive. Fixed, thanks.


This isn't really an issue with the manual, but I noticed that there's no shortcut to the InstallOptions manual in the start menu shortcuts group.
Or is it just me?

-Stu


Thanks, fixed.


file:
INSTALL

This is a trimmed version of Appendix F of the documentation.
should be Appedix G

Appedix? ;)

-daz


In the modern UI readme, under 3. Pages > Page Settings > Finish Page Settings > MUI_FINISHPAGE_RUN_FUNCTION:

Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without parameters). You can use the function to exectute multiple applications or you can change the checkbox name and use it for other things.

-Stu


Appedix?
well, yea ....
you pwned me :D

Thanks, fixed.


Typos
I've attached the typos I found. Hope it helps.

-J


Diff File
Oops, I just saw the message on the first page of this thread that asks for large corrections to be presented as a patch. I can't edit my post above to delete it, but anyway...

I have attached a diff to this message, with all the corrections listed in the above message, plus one or two others I ran across. I'm not sure if the way I did it is the preferred way, but if not - just let me know and I'll change it.

I attached it as .txt because the forum doesn't allow the .diff extension. Thanks,

-J


Awesome, thanks! All committed.


in the Install Options readme,

(NSIS\Docs\InstallOptions\Readme.html)
"Call the DLL
You can call InstallOptions in a page function, check the NSIS documentation for information about the page system."

the link "NSIS documentation" points to "file:///C:/Program%20Files/NSIS/Docs/Chapter4.html#4.5"
the file does not exist.

OJi.


Thanks, fixed.


This is not a typo, but a suggestion for clarity. Under the 4.9.1.5 File section, on the /nonfatal bullet, it currently states:

"If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error."

I think it would be good to add that if the /nonfatal switch is activate or invoked (no files found), the line will no longer be a run-time instruction, and Relative Jumps will not see the line (per jump info below). It would be best to use regular labels around File /nonfatal commands to be safe.

"4.4 Relative jump of +2 will skip one instruction and go to the second instruction from the current instruction...An instruction is every command that is executed at run-time, when the installer is running. MessageBox, Goto, GetDLLVersion, FileRead, SetShellVarContext are all instructions. AddSize, Section, SectionGroup, SectionEnd, SetOverwrite (and everything under Compiler Flags), Name, SetFont, LangString, are not instructions because they are executed at compile time."

Thanks for your time!


That's a bug, not a documentation problem. Please submit a bug report.


Logged as a bug, 1299100. Thanks for looking at this, and your help on my 2.09 questions from a few minutes ago.

Jnuw


Idea
I know that in the history of NSIS we've always had the "NSIS Examples Directory" shortcut, but I think a "NSIS Directory" shortcut would be more helpful as I myself have my projects in a Projects sub-folder.

-Stu


I don't think that's necessary. The start menu is meant for a quick start and that folder contains nothing that's not already linked. In your case, I think you'd even do better with a direct link to that projects folder.


4.6.1.5 SectionGroup

[/e] Caption [section_group_name index_output]

should be

[/e] section_group_name [index_output]


I found a few typos:

4.8.2.3
Typically the SetCompress flag will effect the commands after it,
should be 'affect'.

Also found that this code changes the compression status:
SetCompress off
SetCompressor lzma

Setcompressor switches SetCompress back to the default compression status (auto). This should be documented or bugfixed.

5.4
!define symbol1 ${symbol2}
After copying and pasting the code, I found that this typo has a 1 after symbol. I thought it was two l's. Maybe it should be changed to symbol_1 and symbol_2 or somthing similar (for clarity).

B2
To ask the user for a reboot if required,
should be 'To ask the user for a reboot, if required,' or 'If required, you can ask the user for a reboot.'

D2
For Windows NT (NT4/2000/XP), it's also possible to create the key in the HKCU hive,
Should this be hive, or should it be changed to folder/directory?


Thanks, fixed.

SetCompress off followed by SetCompressor worked fine for me. Please include a complete example.

It should indeed be HKCU hive. That's how the registry objects are called [MSDN].


My bad on SetCompressor. It does work. Maybe instead of saying 'Using lzma compression', it could say 'Using no compression', because I look at this line when I compile my installers with SetCompress off, and I think 'Oh, it's using lzma compression' when it is really not compressed.


From MUI doc:

...
Language Selection Dialog Settings

To remember to users preference, you can define a registry key.
...
Is this correct? I think this is must be:
To remember the...

4.9.13.1 SectionSetFlags

... The first bit (lowest) represents whether the section is currently enabled,
I suggest "enabled" --> "selected"

This will also make it consistent with wording in Sections.nsh, e.g. SF_SELECTED

Thanks, fixed.


In section 4.9.14.2, CreateFont :

GetDlgItem $$0 $HWNDPARENT 1

Should there really be two '$' signs ?
And if yes, then why ?


nope there should not, its definetly a typo.


Thanks, fixed.


foul language
In section 4.8.1.30, Name :
'CrapSoft MyApp'
==> 'MySoft MyApp'

In section C.1, Get parent directory :
; input, top of stack (e.g. C:\Program Files\Poop)
==> ; input, top of stack (e.g. C:\Program Files\foo)


Aannd there was also some poo in the examples.

In these files:
Examples\bigtest.nsi
Examples\InstallOptions\test.ini
Examples\InstallOptions\testnotify.ini

(Not sure if the bigtest.nsi needs fixin)
StrCpy $1 "POOOOOOOOOOOP"
==> StrCpy $1 "FOOOOOOOOOOOO"

Heres a patch anyway.


Not actually a typo, but missing documentation. The LockWindow command is supported but not documented anywhere.
What exactly does it do? I am guessing it enables or prevents window repainting.
Why would it be needed in an installer? I am not quite sure.


Archive: typos in the docs ...


It's documented.


Yes, I realized I was looking at an older CHM file.
I have every release of NSIS installed on my PC (I use them for regression testing), and I suppose I must have opened an old version of NSIS.chm by mistake.
Even though the command has been supported since 2.0, it was not documented until 2.07.
(But you already knew that).


OK, I'm pretty sure I didn't mess up this time. :)
SetCompressionLevel is not documented. It is supported, since running
makensis /cmdhelp setcompressionlevel
yields:

MakeNSIS v2.14 - Copyright 1999-2006 Nullsoft, Inc.

Portions Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler (zlib).
Portions Copyright (C) 1996-2002 Julian R Seward (bzip2).
Portions Copyright (C) 1999-2003 Igor Pavlov (lzma).

Contributors: nnop@newmail.ru, Ryan Geiss, Andras Varga, Drew Davidson, Peter Windridge, Dave Laundon, Robert Rainwater,
Yaroslav Faybishenko, Jeff Doozan, Amir Szekely, Ximon Eighteen, et al.

Usage: SetCompressionLevel level_0-9
Same with Nop:

MakeNSIS v2.14 - Copyright 1999-2006 Nullsoft, Inc.

Portions Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler (zlib).
Portions Copyright (C) 1996-2002 Julian R Seward (bzip2).
Portions Copyright (C) 1999-2003 Igor Pavlov (lzma).

Contributors: nnop@newmail.ru, Ryan Geiss, Andras Varga, Drew Davidson, Peter Windridge, Dave Laundon, Robert Rainwater,
Yaroslav Faybishenko, Jeff Doozan, Amir Szekely, Ximon Eighteen, et al.

Usage: Nop
I just did a search, and these commands were discussed in this thread. LockWindow made it into the docs, the other two didn't.

SetCompressionLevel doesn't work. Nop added, thanks.


Nop ?!
"Does nothing."
What is it useful for?!?!
why is this one implemented?

is Nop simply the same as an empty script line?
then, why do you include it? (overhead!)


Nop is a blank instruction which takes up a line. Stands for Null Operation. Simply there for relative jumps for example.
It won't add to overhead though because it's just for the compiler.

-Stu


ah, i think i got it ...

so:
Goto +3
Nop

is the same as
Goto +2

thats the revolution we all waited for .. lol


It actually adds an instruction to the code as well. It is not just for the compiler. It adds a jump to the next instruction, which is esentially the same as doing nothing.


I discovered this one in the compiler:

Error: invalid charaters in variable name "Hello'", use only charaters [a-z][A-Z][0-9] and '_'

Did someone copy and paste lol?

-Stu


In Section:
4.9.1.8 RMDir

The line: RMDir /r /REBOOTOK $INSTIDR
Should be: RMDir /r /REBOOTOK $INSTDIR


Where is that located? Are you sure you're using the latest version?


Sorry, I had NSIS 2.15.
This typo was corrected in the latest version.


4.8.1.24 InstType

...instead of an "hard-coded" name...
an -> a

...component list will only be show n if the...
show n -> shown

-Stu


Thanks, fixed.


Reviving rather an old topic:

4.9.3.4 CreateShortCut

The text specifies CONTROL as a shortcut keys modifier but uses CTRL in the example. CTRL is not valid.

Stu