Added \s command from upstream and custom \bold and \html commands
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7325 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
c06f69163d
commit
a0d25ea7ed
16 changed files with 143 additions and 171 deletions
|
@ -306,11 +306,12 @@ See \W{http://msdn.microsoft.com/en-us/library/dd464660}{MSDN} for more informat
|
||||||
Declare that the installer can handle paths longer than MAX_PATH. Only supported on Windows 10 Anniversary Update and later.
|
Declare that the installer can handle paths longer than MAX_PATH. Only supported on Windows 10 Anniversary Update and later.
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Note: \\</b\\> Instructions like CopyFiles and CreateShortcut do not support long paths!
|
\NsisBlockHeaderNote
|
||||||
|
Instructions like CopyFiles and CreateShortcut do not support long paths!
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Note: \\</b\\> Has no effect if the "Enable Win32 long paths" policy is not enabled.
|
\NsisBlockHeaderNote Has no effect if the "Enable Win32 long paths" policy is not enabled.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\S2{amanifestsupportedos} ManifestSupportedOS
|
\S2{amanifestsupportedos} ManifestSupportedOS
|
||||||
|
|
|
@ -13,7 +13,7 @@ Delete file (which can be a file or wildcard, but should be specified with a ful
|
||||||
\c Delete $INSTDIR\somefile.dat
|
\c Delete $INSTDIR\somefile.dat
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Warning:\\</b\\> The /REBOOTOK switch requires administrator rights on Windows NT and later.
|
\NsisBlockHeaderWarning The /REBOOTOK switch requires administrator rights on Windows NT and later.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\S2{exec} Exec
|
\S2{exec} Exec
|
||||||
|
@ -86,7 +86,7 @@ Adds file(s) to be extracted to the current output path ($OUTDIR).
|
||||||
\c File /r /x CVS myproject\*.*
|
\c File /r /x CVS myproject\*.*
|
||||||
\c File /r /x *.res /x *.obj /x *.pch source\*.*
|
\c File /r /x *.res /x *.obj /x *.pch source\*.*
|
||||||
|
|
||||||
\\<b\\>Note:\\</b\\> when using the \e{/r} switch, both matching directories and files will be searched. This is always done with or without the use of wildcards, even if the given path perfectly matches one directory. That means, the following directory structure:
|
\s{Note:} When using the \e{/r} switch, both matching directories and files will be searched. This is always done with or without the use of wildcards, even if the given path perfectly matches one directory. That means, the following directory structure:
|
||||||
|
|
||||||
\c <DIR> something
|
\c <DIR> something
|
||||||
\c file.dat
|
\c file.dat
|
||||||
|
@ -120,11 +120,11 @@ If no absolute path is specified the current folder will be used. The current fo
|
||||||
\c Rename $INSTDIR\file.ext $INSTDIR\file.dat
|
\c Rename $INSTDIR\file.ext $INSTDIR\file.dat
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Warning:\\</b\\> The /REBOOTOK switch requires administrator rights on Windows NT and later.
|
\NsisBlockHeaderWarning The /REBOOTOK switch requires administrator rights on Windows NT and later.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Warning:\\</b\\> Files cannot be moved from one drive to another if a reboot is required.
|
\NsisBlockHeaderWarning Files cannot be moved from one drive to another if a reboot is required.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\S2{reservefile} ReserveFile
|
\S2{reservefile} ReserveFile
|
||||||
|
@ -160,11 +160,11 @@ The next example will succeed in deleting the directory.
|
||||||
\c RMDir $TEMP\dir
|
\c RMDir $TEMP\dir
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Warning:\\</b\\> Using \e{RMDir /r $INSTDIR} in the uninstaller is not safe. Though it is unlikely, the user might select to install to the root of the Program Files folder and this command would wipe out the entire Program Files folder, including all other installed programs! The user can also put other files in the installation folder and wouldn't expect them to get deleted along with the program. Solutions are \W{https://nsis.sourceforge.io/Uninstall_only_installed_files}{available} for easily uninstalling only files which were installed by the installer.
|
\NsisBlockHeaderWarning Using \e{RMDir /r $INSTDIR} in the uninstaller is not safe. Though it is unlikely, the user might select to install to the root of the Program Files folder and this command would wipe out the entire Program Files folder, including all other installed programs! The user can also put other files in the installation folder and wouldn't expect them to get deleted along with the program. Solutions are \W{https://nsis.sourceforge.io/Uninstall_only_installed_files}{available} for easily uninstalling only files which were installed by the installer.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Warning:\\</b\\> The /REBOOTOK switch requires administrator rights on Windows NT and later.
|
\NsisBlockHeaderWarning The /REBOOTOK switch requires administrator rights on Windows NT and later.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\S2{setoutpath} SetOutPath
|
\S2{setoutpath} SetOutPath
|
||||||
|
|
|
@ -349,6 +349,9 @@ static xhtmlconfig xhtml_configure(paragraph * source)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define element_close(rs__, tagname__) rdaddsc((rs__), "</" tagname__ ">")
|
||||||
|
#define element_open(rs__, tagname__) rdaddsc((rs__), "<" tagname__ ">")
|
||||||
|
|
||||||
static xhtmlsection *xhtml_new_section(xhtmlsection * last)
|
static xhtmlsection *xhtml_new_section(xhtmlsection * last)
|
||||||
{
|
{
|
||||||
xhtmlsection *ret = mknew(xhtmlsection);
|
xhtmlsection *ret = mknew(xhtmlsection);
|
||||||
|
@ -1737,7 +1740,7 @@ static void xhtml_rdaddwc(rdstringc * rs, word * text, word * end)
|
||||||
keyword *kwl;
|
keyword *kwl;
|
||||||
xhtmlsection *sect;
|
xhtmlsection *sect;
|
||||||
indextag *itag;
|
indextag *itag;
|
||||||
int ti;
|
int ti, style, type;
|
||||||
wchar_t *s;
|
wchar_t *s;
|
||||||
|
|
||||||
for (; text && text != end; text = text->next)
|
for (; text && text != end; text = text->next)
|
||||||
|
@ -1887,29 +1890,43 @@ static void xhtml_rdaddwc(rdstringc * rs, word * text, word * end)
|
||||||
rdaddsc(rs, "</a>");
|
rdaddsc(rs, "</a>");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case word_Html:
|
||||||
|
xhtml_utostr(text->text, &c);
|
||||||
|
rdaddsc(rs, c);
|
||||||
|
sfree(c);
|
||||||
|
break;
|
||||||
|
|
||||||
case word_Normal:
|
case word_Normal:
|
||||||
case word_Emph:
|
case word_Emph:
|
||||||
|
case word_Strong:
|
||||||
|
case word_Bold:
|
||||||
case word_Code:
|
case word_Code:
|
||||||
case word_WeakCode:
|
case word_WeakCode:
|
||||||
case word_WhiteSpace:
|
case word_WhiteSpace:
|
||||||
case word_EmphSpace:
|
case word_EmphSpace:
|
||||||
|
case word_StrongSpace:
|
||||||
|
case word_BoldSpace:
|
||||||
case word_CodeSpace:
|
case word_CodeSpace:
|
||||||
case word_WkCodeSpace:
|
case word_WkCodeSpace:
|
||||||
case word_Quote:
|
case word_Quote:
|
||||||
case word_EmphQuote:
|
case word_EmphQuote:
|
||||||
|
case word_StrongQuote:
|
||||||
|
case word_BoldQuote:
|
||||||
case word_CodeQuote:
|
case word_CodeQuote:
|
||||||
case word_WkCodeQuote:
|
case word_WkCodeQuote:
|
||||||
assert(text->type != word_CodeQuote &&
|
assert(text->type != word_CodeQuote &&
|
||||||
text->type != word_WkCodeQuote);
|
text->type != word_WkCodeQuote);
|
||||||
if (towordstyle(text->type) == word_Emph &&
|
style = towordstyle(text->type);
|
||||||
(attraux(text->aux) == attr_First ||
|
type = removeattr(text->type);
|
||||||
attraux(text->aux) == attr_Only))
|
|
||||||
rdaddsc(rs, "<em>");
|
switch((attraux(text->aux) == attr_First || attraux(text->aux) == attr_Only) ? style : word_NotWordType)
|
||||||
else if ((towordstyle(text->type) == word_Code
|
{
|
||||||
|| towordstyle(text->type) == word_WeakCode)
|
case word_Emph: element_open(rs, "em"); break;
|
||||||
&& (attraux(text->aux) == attr_First
|
case word_Strong: element_open(rs, "strong"); break;
|
||||||
|| attraux(text->aux) == attr_Only))
|
case word_Bold: element_open(rs, "b"); break;
|
||||||
rdaddsc(rs, "<code>");
|
case word_Code: element_open(rs, "code"); break;
|
||||||
|
case word_WeakCode: element_open(rs, "code"); break;
|
||||||
|
}
|
||||||
|
|
||||||
if (removeattr(text->type) == word_Normal)
|
if (removeattr(text->type) == word_Normal)
|
||||||
{
|
{
|
||||||
|
@ -1951,15 +1968,14 @@ static void xhtml_rdaddwc(rdstringc * rs, word * text, word * end)
|
||||||
rdaddsc(rs, """);
|
rdaddsc(rs, """);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (towordstyle(text->type) == word_Emph &&
|
switch((attraux(text->aux) == attr_Last || attraux(text->aux) == attr_Only) ? style : word_NotWordType)
|
||||||
(attraux(text->aux) == attr_Last ||
|
{
|
||||||
attraux(text->aux) == attr_Only))
|
case word_Emph: element_close(rs, "em"); break;
|
||||||
rdaddsc(rs, "</em>");
|
case word_Strong: element_close(rs, "strong"); break;
|
||||||
else if ((towordstyle(text->type) == word_Code
|
case word_Bold: element_close(rs, "b"); break;
|
||||||
|| towordstyle(text->type) == word_WeakCode)
|
case word_Code: element_close(rs, "code"); break;
|
||||||
&& (attraux(text->aux) == attr_Last
|
case word_WeakCode: element_close(rs, "code"); break;
|
||||||
|| attraux(text->aux) == attr_Only))
|
}
|
||||||
rdaddsc(rs, "</code>");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef HALIBUT_HALIBUT_H
|
#ifndef HALIBUT_HALIBUT_H
|
||||||
#define HALIBUT_HALIBUT_H
|
#define HALIBUT_HALIBUT_H
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && !defined(_CRT_SECURE_NO_DEPRECATE)
|
||||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -136,16 +136,22 @@ enum {
|
||||||
/* ORDERING CONSTRAINT: these normal-word types ... */
|
/* ORDERING CONSTRAINT: these normal-word types ... */
|
||||||
word_Normal,
|
word_Normal,
|
||||||
word_Emph,
|
word_Emph,
|
||||||
|
word_Strong,
|
||||||
|
word_Bold,
|
||||||
word_Code, /* monospaced; `quoted' in text */
|
word_Code, /* monospaced; `quoted' in text */
|
||||||
word_WeakCode, /* monospaced, normal in text */
|
word_WeakCode, /* monospaced, normal in text */
|
||||||
/* ... must be in the same order as these space types ... */
|
/* ... must be in the same order as these space types ... */
|
||||||
word_WhiteSpace, /* text is NULL or ignorable */
|
word_WhiteSpace, /* text is NULL or ignorable */
|
||||||
word_EmphSpace, /* WhiteSpace when emphasised */
|
word_EmphSpace, /* WhiteSpace when emphasised */
|
||||||
|
word_StrongSpace, /* WhiteSpace when strong */
|
||||||
|
word_BoldSpace,
|
||||||
word_CodeSpace, /* WhiteSpace when code */
|
word_CodeSpace, /* WhiteSpace when code */
|
||||||
word_WkCodeSpace, /* WhiteSpace when weak code */
|
word_WkCodeSpace, /* WhiteSpace when weak code */
|
||||||
/* ... and must be in the same order as these quote types ... */
|
/* ... and must be in the same order as these quote types ... */
|
||||||
word_Quote, /* text is NULL or ignorable */
|
word_Quote, /* text is NULL or ignorable */
|
||||||
word_EmphQuote, /* Quote when emphasised */
|
word_EmphQuote, /* Quote when emphasised */
|
||||||
|
word_StrongQuote, /* Quote when strong */
|
||||||
|
word_BoldQuote,
|
||||||
word_CodeQuote, /* (can't happen) */
|
word_CodeQuote, /* (can't happen) */
|
||||||
word_WkCodeQuote, /* (can't happen) */
|
word_WkCodeQuote, /* (can't happen) */
|
||||||
/* END ORDERING CONSTRAINT */
|
/* END ORDERING CONSTRAINT */
|
||||||
|
@ -157,7 +163,9 @@ enum {
|
||||||
word_HyperLink, /* (invisible) */
|
word_HyperLink, /* (invisible) */
|
||||||
word_HyperEnd, /* (also invisible; no text) */
|
word_HyperEnd, /* (also invisible; no text) */
|
||||||
word_LocalHyperLink, /* (invisible) */
|
word_LocalHyperLink, /* (invisible) */
|
||||||
word_FreeTextXref /* \R */
|
word_FreeTextXref, /* \R */
|
||||||
|
word_Html,
|
||||||
|
word_NotWordType /* placeholder value */
|
||||||
};
|
};
|
||||||
/* aux values for attributed words */
|
/* aux values for attributed words */
|
||||||
enum {
|
enum {
|
||||||
|
@ -175,11 +183,12 @@ enum {
|
||||||
};
|
};
|
||||||
#define isattr(x) ( ( (x) > word_Normal && (x) < word_WhiteSpace ) || \
|
#define isattr(x) ( ( (x) > word_Normal && (x) < word_WhiteSpace ) || \
|
||||||
( (x) > word_WhiteSpace && (x) < word_internal_endattrs ) )
|
( (x) > word_WhiteSpace && (x) < word_internal_endattrs ) )
|
||||||
#define sameattr(x,y) ( (((x)-(y)) & 3) == 0 )
|
#define NATTRS (word_WhiteSpace - word_Normal)
|
||||||
#define towordstyle(x) ( word_Normal + ((x) & 3) )
|
#define sameattr(x,y) ( (((x)-(y)) % NATTRS) == 0 )
|
||||||
#define tospacestyle(x) ( word_WhiteSpace + ((x) & 3) )
|
#define towordstyle(x) ( word_Normal + ((x) % NATTRS) )
|
||||||
#define toquotestyle(x) ( word_Quote + ((x) & 3) )
|
#define tospacestyle(x) ( word_WhiteSpace + ((x) % NATTRS) )
|
||||||
#define removeattr(x) ( word_Normal + ((x) &~ 3) )
|
#define toquotestyle(x) ( word_Quote + ((x) % NATTRS) )
|
||||||
|
#define removeattr(x) ( word_Normal + ((x)/NATTRS * NATTRS) )
|
||||||
|
|
||||||
#define attraux(x) ( (x) & attr_mask )
|
#define attraux(x) ( (x) & attr_mask )
|
||||||
#define quoteaux(x) ( (x) & quote_mask )
|
#define quoteaux(x) ( (x) & quote_mask )
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "halibut.h"
|
#include "halibut.h"
|
||||||
|
|
||||||
static char *usagetext[] = {
|
static const char *const usagetext[] = {
|
||||||
"halibut.exe file1 [file2 ...]",
|
"halibut [options] file.but [file.but...]",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
void usage(void)
|
void usage(void)
|
||||||
{
|
{
|
||||||
char **p;
|
const char *const *p;
|
||||||
for (p = usagetext; *p; p++)
|
for (p = usagetext; *p; p++)
|
||||||
puts(*p);
|
puts(*p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,6 +198,7 @@ enum {
|
||||||
c_W, /* Web hyperlink */
|
c_W, /* Web hyperlink */
|
||||||
c_L, /* Relative/local hyperlink */
|
c_L, /* Relative/local hyperlink */
|
||||||
c_b, /* bulletted list */
|
c_b, /* bulletted list */
|
||||||
|
c_bold,
|
||||||
c_c, /* code */
|
c_c, /* code */
|
||||||
c_cfg, /* configuration directive */
|
c_cfg, /* configuration directive */
|
||||||
c_copyright, /* copyright statement */
|
c_copyright, /* copyright statement */
|
||||||
|
@ -205,6 +206,7 @@ enum {
|
||||||
c_date, /* document processing date */
|
c_date, /* document processing date */
|
||||||
c_define, /* macro definition */
|
c_define, /* macro definition */
|
||||||
c_e, /* emphasis */
|
c_e, /* emphasis */
|
||||||
|
c_html, /* html code */
|
||||||
c_i, /* visible index mark */
|
c_i, /* visible index mark */
|
||||||
c_ii, /* uncapitalised visible index mark */
|
c_ii, /* uncapitalised visible index mark */
|
||||||
c_k, /* uncapitalised cross-reference */
|
c_k, /* uncapitalised cross-reference */
|
||||||
|
@ -214,6 +216,7 @@ enum {
|
||||||
c_preamble, /* document preamble text */
|
c_preamble, /* document preamble text */
|
||||||
c_q, /* quote marks */
|
c_q, /* quote marks */
|
||||||
c_rule, /* horizontal rule */
|
c_rule, /* horizontal rule */
|
||||||
|
c_s, /* strong */
|
||||||
c_title, /* document title */
|
c_title, /* document title */
|
||||||
c_u, /* aux field is char code */
|
c_u, /* aux field is char code */
|
||||||
c_versionid /* document RCS id */
|
c_versionid /* document RCS id */
|
||||||
|
@ -223,6 +226,9 @@ enum {
|
||||||
(c) == c_c ? word_Code : \
|
(c) == c_c ? word_Code : \
|
||||||
(c) == c_cw ? word_WeakCode : \
|
(c) == c_cw ? word_WeakCode : \
|
||||||
(c) == c_e ? word_Emph : \
|
(c) == c_e ? word_Emph : \
|
||||||
|
(c) == c_s ? word_Strong : \
|
||||||
|
(c) == c_bold ? word_Bold : \
|
||||||
|
(c) == c_html ? word_Html /* does c_html belong here? */ : \
|
||||||
word_Normal
|
word_Normal
|
||||||
|
|
||||||
|
|
||||||
|
@ -265,116 +271,47 @@ static void match_kw(token * tok)
|
||||||
char const *name;
|
char const *name;
|
||||||
int id;
|
int id;
|
||||||
} keywords[] = {
|
} keywords[] = {
|
||||||
{
|
{ "#", c__comment }, /* comment command (\#) */
|
||||||
"#", c__comment}
|
{ "-", c__escaped }, /* nonbreaking hyphen */
|
||||||
, /* comment command (\#) */
|
|
||||||
{
|
|
||||||
"-", c__escaped}
|
|
||||||
, /* nonbreaking hyphen */
|
|
||||||
{ ".", c__nop },
|
{ ".", c__nop },
|
||||||
{
|
{ "A", c_A }, /* appendix heading */
|
||||||
"A", c_A}
|
{ "B", c_B }, /* bibliography entry */
|
||||||
, /* appendix heading */
|
{ "BR", c_BR }, /* bibliography rewrite */
|
||||||
{
|
{ "C", c_C }, /* chapter heading */
|
||||||
"B", c_B}
|
{ "H", c_H }, /* heading */
|
||||||
, /* bibliography entry */
|
{ "I", c_I }, /* invisible index mark */
|
||||||
{
|
{ "IM", c_IM }, /* index merge/rewrite */
|
||||||
"BR", c_BR}
|
{ "K", c_K }, /* capitalised cross-reference */
|
||||||
, /* bibliography rewrite */
|
{ "L", c_L }, /* Relative/local hyperlink */
|
||||||
{
|
{ "R", c_R }, /* free text cross-reference */
|
||||||
"C", c_C}
|
{ "U", c_U }, /* unnumbered-chapter heading */
|
||||||
, /* chapter heading */
|
{ "W", c_W }, /* Web hyperlink */
|
||||||
{
|
{ "\\", c__escaped }, /* escaped backslash (\\) */
|
||||||
"H", c_H}
|
{ "_", c__nbsp }, /* nonbreaking space (\_) */
|
||||||
, /* heading */
|
{ "b", c_b }, /* bulletted list */
|
||||||
{
|
{ "bold", c_bold },
|
||||||
"I", c_I}
|
{ "c", c_c }, /* code */
|
||||||
, /* invisible index mark */
|
{ "cfg", c_cfg }, /* configuration directive */
|
||||||
{
|
{ "copyright", c_copyright }, /* copyright statement */
|
||||||
"IM", c_IM}
|
{ "cw", c_cw } , /* weak code */
|
||||||
, /* index merge/rewrite */
|
{ "date", c_date }, /* document processing date */
|
||||||
{
|
{ "define", c_define }, /* macro definition */
|
||||||
"K", c_K}
|
{ "e", c_e }, /* emphasis */
|
||||||
, /* capitalised cross-reference */
|
|
||||||
{
|
|
||||||
"L", c_L}
|
|
||||||
, /* Relative/local hyperlink */
|
|
||||||
{
|
|
||||||
"R", c_R}
|
|
||||||
, /* free text cross-reference */
|
|
||||||
{
|
|
||||||
"U", c_U}
|
|
||||||
, /* unnumbered-chapter heading */
|
|
||||||
{
|
|
||||||
"W", c_W}
|
|
||||||
, /* Web hyperlink */
|
|
||||||
{
|
|
||||||
"\\", c__escaped}
|
|
||||||
, /* escaped backslash (\\) */
|
|
||||||
{
|
|
||||||
"_", c__nbsp}
|
|
||||||
, /* nonbreaking space (\_) */
|
|
||||||
{
|
|
||||||
"b", c_b}
|
|
||||||
, /* bulletted list */
|
|
||||||
{
|
|
||||||
"c", c_c}
|
|
||||||
, /* code */
|
|
||||||
{
|
|
||||||
"cfg", c_cfg}
|
|
||||||
, /* configuration directive */
|
|
||||||
{
|
|
||||||
"copyright", c_copyright}
|
|
||||||
, /* copyright statement */
|
|
||||||
{
|
|
||||||
"cw", c_cw}
|
|
||||||
, /* weak code */
|
|
||||||
{
|
|
||||||
"date", c_date}
|
|
||||||
, /* document processing date */
|
|
||||||
{
|
|
||||||
"define", c_define}
|
|
||||||
, /* macro definition */
|
|
||||||
{
|
|
||||||
"e", c_e}
|
|
||||||
, /* emphasis */
|
|
||||||
{ "hackunixnow", c__midparacmd_unixnow },
|
{ "hackunixnow", c__midparacmd_unixnow },
|
||||||
{
|
{ "html", c_html },
|
||||||
"i", c_i}
|
{ "i", c_i }, /* visible index mark */
|
||||||
, /* visible index mark */
|
{ "ii", c_ii }, /* uncapitalised visible index mark */
|
||||||
{
|
{ "k", c_k }, /* uncapitalised cross-reference */
|
||||||
"ii", c_ii}
|
{ "n", c_n }, /* numbered list */
|
||||||
, /* uncapitalised visible index mark */
|
{ "nocite", c_nocite }, /* bibliography trickery */
|
||||||
{
|
{ "preamble", c_preamble }, /* document preamble text */
|
||||||
"k", c_k}
|
{ "q", c_q }, /* quote marks */
|
||||||
, /* uncapitalised cross-reference */
|
{ "rule", c_rule }, /* horizontal rule */
|
||||||
{
|
{ "s", c_s }, /* strong */
|
||||||
"n", c_n}
|
{ "title", c_title }, /* document title */
|
||||||
, /* numbered list */
|
{ "versionid", c_versionid }, /* document RCS id */
|
||||||
{
|
{ "{", c__escaped }, /* escaped lbrace (\{) */
|
||||||
"nocite", c_nocite}
|
{ "}", c__escaped }, /* escaped rbrace (\}) */
|
||||||
, /* bibliography trickery */
|
|
||||||
{
|
|
||||||
"preamble", c_preamble}
|
|
||||||
, /* document preamble text */
|
|
||||||
{
|
|
||||||
"q", c_q}
|
|
||||||
, /* quote marks */
|
|
||||||
{
|
|
||||||
"rule", c_rule}
|
|
||||||
, /* horizontal rule */
|
|
||||||
{
|
|
||||||
"title", c_title}
|
|
||||||
, /* document title */
|
|
||||||
{
|
|
||||||
"versionid", c_versionid}
|
|
||||||
, /* document RCS id */
|
|
||||||
{
|
|
||||||
"{", c__escaped}
|
|
||||||
, /* escaped lbrace (\{) */
|
|
||||||
{
|
|
||||||
"}", c__escaped}
|
|
||||||
, /* escaped rbrace (\}) */
|
|
||||||
};
|
};
|
||||||
int i, j, k, c;
|
int i, j, k, c;
|
||||||
|
|
||||||
|
@ -1328,7 +1265,7 @@ static void read_file(paragraph *** ret, input * in, indexdata * idx, tree234 *m
|
||||||
*/
|
*/
|
||||||
dtor(t), t = get_token(in);
|
dtor(t), t = get_token(in);
|
||||||
/*
|
/*
|
||||||
* Special cases: \W{}\c, \W{}\e, \W{}\cw
|
* Special cases: \W{}\c, \W{}\e, \W{}\s, \W{}\bold \W{}\cw
|
||||||
*/
|
*/
|
||||||
sitem = mknew(struct stack_item);
|
sitem = mknew(struct stack_item);
|
||||||
sitem->type = stack_hyper;
|
sitem->type = stack_hyper;
|
||||||
|
@ -1354,18 +1291,27 @@ static void read_file(paragraph *** ret, input * in, indexdata * idx, tree234 *m
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case c_html:
|
||||||
|
if (style != word_Normal) fatal(err_nestedstyles, &t.pos);
|
||||||
|
type = t.cmd, dtor(t), t = get_token(in);
|
||||||
|
if (t.type == tok_lbrace || (error(err_explbr, &t.pos), FALSE))
|
||||||
|
{
|
||||||
|
style = word_Html, spcstyle = tospacestyle(style);
|
||||||
|
stack_item_push(parsestk, stack_style);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case c_c:
|
case c_c:
|
||||||
case c_cw:
|
case c_cw:
|
||||||
case c_e:
|
case c_e:
|
||||||
|
case c_s:
|
||||||
|
case c_bold:
|
||||||
type = t.cmd;
|
type = t.cmd;
|
||||||
if (style != word_Normal)
|
if (style != word_Normal)
|
||||||
{
|
{
|
||||||
error(err_nestedstyles, &t.pos);
|
error(err_nestedstyles, &t.pos);
|
||||||
/* Error recovery: eat lbrace, push nop. */
|
/* Error recovery: eat lbrace, push nop. */
|
||||||
dtor(t), t = get_token(in);
|
dtor(t), t = get_token(in);
|
||||||
sitem = mknew(struct stack_item);
|
stack_item_push(parsestk, stack_nop);
|
||||||
sitem->type = stack_nop;
|
|
||||||
stk_push(parsestk, sitem);
|
|
||||||
}
|
}
|
||||||
dtor(t), t = get_token(in);
|
dtor(t), t = get_token(in);
|
||||||
if (t.type != tok_lbrace)
|
if (t.type != tok_lbrace)
|
||||||
|
@ -1373,11 +1319,8 @@ static void read_file(paragraph *** ret, input * in, indexdata * idx, tree234 *m
|
||||||
error(err_explbr, &t.pos);
|
error(err_explbr, &t.pos);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
style = getcmdstyle(type);
|
style = getcmdstyle(type), spcstyle = tospacestyle(style);
|
||||||
spcstyle = tospacestyle(style);
|
stack_item_push(parsestk, stack_style);
|
||||||
sitem = mknew(struct stack_item);
|
|
||||||
sitem->type = stack_style;
|
|
||||||
stk_push(parsestk, sitem);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case c_i:
|
case c_i:
|
||||||
|
@ -1389,15 +1332,13 @@ static void read_file(paragraph *** ret, input * in, indexdata * idx, tree234 *m
|
||||||
error(err_nestedindex, &t.pos);
|
error(err_nestedindex, &t.pos);
|
||||||
/* Error recovery: eat lbrace, push nop. */
|
/* Error recovery: eat lbrace, push nop. */
|
||||||
dtor(t), t = get_token(in);
|
dtor(t), t = get_token(in);
|
||||||
sitem = mknew(struct stack_item);
|
stack_item_push(parsestk, stack_nop);
|
||||||
sitem->type = stack_nop;
|
|
||||||
stk_push(parsestk, sitem);
|
|
||||||
}
|
}
|
||||||
sitem = mknew(struct stack_item);
|
sitem = mknew(struct stack_item);
|
||||||
sitem->type = stack_idx;
|
sitem->type = stack_idx;
|
||||||
dtor(t), t = get_token(in);
|
dtor(t), t = get_token(in);
|
||||||
/*
|
/*
|
||||||
* Special cases: \i\c, \i\e, \i\cw
|
* Special cases: \i\c, \i\e, \i\s, \i\bold, \i\cw
|
||||||
*/
|
*/
|
||||||
wd.fpos = t.pos;
|
wd.fpos = t.pos;
|
||||||
if (t.type == tok_cmd && (tmpstyle = getcmdstyle(t.cmd)))
|
if (t.type == tok_cmd && (tmpstyle = getcmdstyle(t.cmd)))
|
||||||
|
|
|
@ -315,6 +315,8 @@ static void dbg_prtwordlist(int level, word * w)
|
||||||
printf("\"");
|
printf("\"");
|
||||||
} else
|
} else
|
||||||
printf("(no text)");
|
printf("(no text)");
|
||||||
|
if (w->breaks)
|
||||||
|
printf(" [breaks]");
|
||||||
if (w->alt)
|
if (w->alt)
|
||||||
{
|
{
|
||||||
printf(" alt = {\n");
|
printf(" alt = {\n");
|
||||||
|
|
|
@ -30,5 +30,8 @@
|
||||||
|
|
||||||
\define{NsisWarnBlockContainerEnd} \\</div\\>
|
\define{NsisWarnBlockContainerEnd} \\</div\\>
|
||||||
|
|
||||||
\define{NsisBlockHeaderExeheadU} \\<b\\>Unicode: \\</b\\>
|
\define{NsisBlockHeaderWarning} \s{Warning:}
|
||||||
|
|
||||||
|
\define{NsisBlockHeaderNote} \s{Note:}
|
||||||
|
|
||||||
|
\define{NsisBlockHeaderExeheadU} \s{Unicode:}
|
||||||
|
|
|
@ -174,7 +174,7 @@ Checks if \R{setshellvarcontext}{SetShellVarContext} is set to \e{all}.
|
||||||
Checks if active language is a RTL language.
|
Checks if active language is a RTL language.
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Warning:\\</b\\> Do not call this in [un].onInit because the language file has not been fully initialized.
|
\NsisBlockHeaderWarning Do not call this in [un].onInit because the language file has not been fully initialized.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\S2{intcmp} IntCmp
|
\S2{intcmp} IntCmp
|
||||||
|
|
|
@ -109,7 +109,7 @@ The Windows temp directory could be located on any volume, so you cannot use thi
|
||||||
|
|
||||||
\b Installs a DLL built for Windows x64.
|
\b Installs a DLL built for Windows x64.
|
||||||
|
|
||||||
\b \\<b\\>Warning:\\</b\\> This resets \R{setregview}{SetRegView} and file system redirection.
|
\b \s{Warning:} This resets \R{setregview}{SetRegView} and file system redirection.
|
||||||
|
|
||||||
\S2{} LIBRARY_SHELL_EXTENSION
|
\S2{} LIBRARY_SHELL_EXTENSION
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ The Windows temp directory could be located on any volume, so you cannot use thi
|
||||||
|
|
||||||
\b If you need to support Windows 9x/ME, you can only use short filenames (8.3).
|
\b If you need to support Windows 9x/ME, you can only use short filenames (8.3).
|
||||||
|
|
||||||
\b \\<b\\>Warning:\\</b\\> Always use redistributable files when deploying DLLs, never copy files from your system directory!
|
\b \s{Warning:} Always use redistributable files when deploying DLLs, never copy files from your system directory!
|
||||||
|
|
||||||
\S1{library_install_examples} Example
|
\S1{library_install_examples} Example
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ Location of the library
|
||||||
|
|
||||||
\b Uninstalls a DLL built for Windows x64.
|
\b Uninstalls a DLL built for Windows x64.
|
||||||
|
|
||||||
\b \\<b\\>Warning:\\</b\\> This resets \R{setregview}{SetRegView} and file system redirection.
|
\b \s{Warning:} This resets \R{setregview}{SetRegView} and file system redirection.
|
||||||
|
|
||||||
\S2{} LIBRARY_SHELL_EXTENSION
|
\S2{} LIBRARY_SHELL_EXTENSION
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ Sets the error level of the installer or uninstaller to \e{error_level}. See \R{
|
||||||
\c SetErrorLevel 4
|
\c SetErrorLevel 4
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Warning:\\</b\\> -1 is reserved for internal use. Negative numbers should be avoided for compatibility with batch scripts.
|
\NsisBlockHeaderWarning -1 is reserved for internal use. Negative numbers should be avoided for compatibility with batch scripts.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\S2{setshellvarcontext} SetShellVarContext
|
\S2{setshellvarcontext} SetShellVarContext
|
||||||
|
|
|
@ -143,7 +143,7 @@ Gets the size of the section specified by section_index and stores the value in
|
||||||
|
|
||||||
\c inst_type_idx
|
\c inst_type_idx
|
||||||
|
|
||||||
Sets the current \R{ainsttype}{InstType}. inst_type_idx should be between 0 and 31. The error flag is \\<b\\>not\\</b\\> set if an out of range \R{ainsttype}{InstType} was used.
|
Sets the current \R{ainsttype}{InstType}. inst_type_idx should be between 0 and 31. The error flag is \s{not} set if an out of range \R{ainsttype}{InstType} was used.
|
||||||
|
|
||||||
\S2{sgetcurinsttype} GetCurInstType
|
\S2{sgetcurinsttype} GetCurInstType
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ Sets the text and background color of a static control, edit control, button or
|
||||||
\c FunctionEnd
|
\c FunctionEnd
|
||||||
|
|
||||||
\NsisWarnBlockContainerBegin
|
\NsisWarnBlockContainerBegin
|
||||||
\\<b\\>Warning:\\</b\\> Setting the background color of check boxes to \c{transparent} may not function properly when using \c{\R{axpstyle}{XPStyle} on}. The background may be completely black instead of transparent when using certain Windows themes. The text color might also be ignored when Visual Styles are enabled.
|
\NsisBlockHeaderWarning Setting the background color of check boxes to \c{transparent} may not function properly when using \c{\R{axpstyle}{XPStyle} on}. The background may be completely black instead of transparent when using certain Windows themes. The text color might also be ignored when Visual Styles are enabled.
|
||||||
\NsisWarnBlockContainerEnd
|
\NsisWarnBlockContainerEnd
|
||||||
|
|
||||||
\S2{setsilent} SetSilent
|
\S2{setsilent} SetSilent
|
||||||
|
|
|
@ -11,4 +11,4 @@ A special \R{ssection}{Section} named 'Uninstall' must be created in order to ge
|
||||||
|
|
||||||
The first \R{delete}{Delete} instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall.
|
The first \R{delete}{Delete} instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall.
|
||||||
|
|
||||||
Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \\<b\\>not\\</b\\> necessarily contain the same value it contained in the installer.
|
Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \s{not} necessarily contain the same value it contained in the installer.
|
||||||
|
|
|
@ -33,12 +33,12 @@ Example:
|
||||||
\c WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct" "DisplayName" "Application Name"
|
\c WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct" "DisplayName" "Application Name"
|
||||||
\c WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct" "UninstallString" '"$INSTDIR\uninst.exe"'
|
\c WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProduct" "UninstallString" '"$INSTDIR\uninst.exe"'
|
||||||
|
|
||||||
\\<b\\>Required values\\</b\\>
|
\s{Required values:}
|
||||||
|
|
||||||
\e{DisplayName} (string) - Name of the application \\<br\\>
|
\e{DisplayName} (string) - Name of the application \\<br\\>
|
||||||
\e{UninstallString} (string) - Path and filename of the uninstaller. You should \\<b\\>always\\</b\\> quote the path.
|
\e{UninstallString} (string) - Path and filename of the uninstaller. You should \s{always} quote the path.
|
||||||
|
|
||||||
\\<b\\>Optional values\\</b\\>
|
\s{Optional values:}
|
||||||
|
|
||||||
Some of the following values will not be used by older Windows versions.
|
Some of the following values will not be used by older Windows versions.
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ Registers. These variables can be used just like user variables, but are usually
|
||||||
|
|
||||||
The installation directory ($INSTDIR is modifiable using \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc. - This could be used, for example, in the \R{oninit}{.onInit} function to do a more advanced detection of install location).
|
The installation directory ($INSTDIR is modifiable using \R{StrCpy}{StrCpy}, \R{readregstr}{ReadRegStr}, \R{readinistr}{ReadINIStr}, etc. - This could be used, for example, in the \R{oninit}{.onInit} function to do a more advanced detection of install location).
|
||||||
|
|
||||||
Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \\<b\\>not\\</b\\> necessarily contain the same value it contained in the installer. For example, if you write the uninstaller to $WINDIR and the user doesn't move it, $INSTDIR will be $WINDIR in the uninstaller. If you write the uninstaller to another location, you should keep the installer's $INSTDIR in the registry or an alternative storing facility and read it in the uninstaller.
|
Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \s{not} necessarily contain the same value it contained in the installer. For example, if you write the uninstaller to $WINDIR and the user doesn't move it, $INSTDIR will be $WINDIR in the uninstaller. If you write the uninstaller to another location, you should keep the installer's $INSTDIR in the registry or an alternative storing facility and read it in the uninstaller.
|
||||||
|
|
||||||
\e{$OUTDIR}
|
\e{$OUTDIR}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue