better description of command line usage (bug report #1065322)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3771 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-11-19 14:38:33 +00:00
parent 1e93f9983f
commit 821fca5066
2 changed files with 18 additions and 10 deletions

View file

@ -1,14 +1,13 @@
\C{usage} MakeNSIS Usage
\H{usagereference} Reference
NSIS installers are generated by using the 'MakeNSIS' program to compile a NSIS script (.NSI) into an installer executable.
The NSIS development kit installer sets up your computer so that you can compile a .nsi file by simply right-clicking on it in explorer, and selecting 'compile'.
If you want to use MakeNSIS on the command line, the syntax of the makensis command is:
\c Makensis [/Vx] [/Olog] [/LICENSE] [/PAUSE] [/NOCONFIG] [/CMDHELP [command]] [/HDRINFO] [/NOCD]
\c [/Ddefine[=value] ...] ["/XCommand parameter" ...] [Script.nsi | - [...]]
\c makensis [option | script.nsi | - [...]]
\H{usagereference} Options
\b /LICENSE displays a keen license page.
@ -16,13 +15,13 @@ If you want to use MakeNSIS on the command line, the syntax of the makensis comm
\b The /O switch followed by a filename tells the compiler to print its log to that file (instead of the screen)
\b /PAUSE makes Makensis pause before quitting, which is useful when executing directly from Windows (the auto-installed shell extensions use it).
\b /PAUSE makes makensis pause before quitting, which is useful when executing directly from Windows.
\b /NOCONFIG disables inclusion of [path to makensis.exe]\\nsisconf.nsh . Without this parameter, installer defaults are set from nsisconf.nsi. See NSIS Configuration File.
\b /NOCONFIG disables inclusion of <path to makensis.exe>\\nsisconf.nsh. Without this parameter, installer defaults are set from nsisconf.nsh.
\b /CMDHELP prints basic usage information for command (if specified), or all commands (if command is not specified).
\b /HDRINFO prints out information on what options Makensis was compiled with.
\b /HDRINFO prints out information on what options were used to compile makensis was compiled with.
\b /NOCD disabled the current directory change to that of the .nsi file
@ -30,11 +29,15 @@ If you want to use MakeNSIS on the command line, the syntax of the makensis comm
\b Using the /X switch one or more times will execute the code you specify following it. Example: "/XAutoCloseWindow false"
\b Specifying a dash (-) for the script name will tell Makensis to use the standard input as a source.
\b Specifying a dash (-) for the script name will tell makensis to use the standard input as a source.
\H{usagenotes} Notes
\b Parameters are processed by order. \c{makensis /Ddef script.nsi} is not the same as \c{makensis script.nsi /Ddef}.
\b If multiple scripts are specified, they are treated as one concatenated script.
\H{usageexamples} Usage Examples
\H{usageexamples} Examples
Basic usage:
@ -51,3 +54,7 @@ Force compressor:
Change script behavior:
\c makensis.exe /DUSE_UPX /DVERSION=1.337 /DNO_IMAGES myscript.nsi
Parameters order:
\c makensis /XSection sectioncontents.nsi /XSectionEnd

View file

@ -399,7 +399,7 @@ int main(int argc, char **argv)
if (build.display_errors && !nousage)
{
fprintf(g_output,"Usage:\n"
" makensis [options] [script.nsi | - [...]]\n"
" makensis [option | script.nsi | - [...]]\n"
" options are:\n"
" " OPT_STR "CMDHELP item prints out help for 'item', or lists all commands\n"
" " OPT_STR "HDRINFO prints information about what options makensis was compiled with\n"
@ -412,6 +412,7 @@ int main(int argc, char **argv)
" " OPT_STR "NOCD disabled the current directory change to that of the .nsi file\n"
" " OPT_STR "Ddefine[=value] defines the symbol \"define\" for the script [to value]\n"
" " OPT_STR "Xscriptcmd executes scriptcmd in script (i.e. \"" OPT_STR "XOutFile poop.exe\")\n"
" parameters are processed by order (" OPT_STR "Ddef ins.nsi != ins.nsi " OPT_STR "Ddef)\n"
" for script file name, you can use - to read from the standard input\n");
fflush(g_output);
}