Merge patch for better installs on POSIX platforms.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4486 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
pabs3 2006-01-21 09:54:23 +00:00
parent c16ca4f9fc
commit 0913023f33
25 changed files with 286 additions and 134 deletions

View file

@ -6,6 +6,7 @@ appendices = 9
htmls = Split('IndexPage.html Contents.html') \
+ map(lambda ch: 'Chapter' + str(ch + 1) + '.html', range(chapters)) \
+ map(lambda ap: 'Appendix' + chr(ord('A') + ap) + '.html', range(appendices))
fixed_htmls = map(lambda fn: 'fixed/'+fn, htmls)
chm_config_but = 'chm_config.but'
@ -55,6 +56,7 @@ buts = Split("""
""")
import os
import re
Import('halibut env build_chm')
@ -62,6 +64,15 @@ env.Append(ENV = {'PATH' : os.environ['PATH']})
build_dir = Dir(GetBuildPath('.')).abspath
replacement = '<a href="%s/\\1/' % env.subst('$PREFIX_DATA')
def fix_html(target, source, env):
for i in range(len(source)):
data = open(str(source[i]),'rb').read()
data = re.sub('<a href="../(Include|Stubs|Plugins|Contrib)/', replacement, data)
open(str(target[i]),'wb').write(data)
return None
if build_chm:
hhc_action = Action('cd "%s" && hhc nsis.hhp' % (build_dir))
execute = hhc_action.execute
@ -83,7 +94,7 @@ if build_chm:
chm = env.HalibutCHM('NSIS.chm', [chm_config_but] + buts)
env.Depends(chm, halibut)
env.Distribute('', chm)
env.DistributeDoc(chm)
else:
html_builder = Builder(
@ -92,10 +103,14 @@ else:
Action('cd "%s" && "%s" ${SOURCES.abspath}' % (build_dir, halibut[0].abspath))
]
)
html_fixer = Builder(action = fix_html, suffix = '.html', src_suffix = '.html')
env.Append(BUILDERS = {'Halibut' : html_builder})
env.Append(BUILDERS = {'Halibut' : html_builder, 'FixHTML': html_fixer})
html = env.Halibut(htmls, [config_but] + buts)
fixed_html = env.FixHTML(fixed_htmls, htmls)
env.Depends(html, halibut)
env.DistributeDocs('', build_dir + '/style.css')
env.DistributeDocs('', htmls)
env.Depends(fixed_html, html)
env.DistributeDocs('#Docs/style.css')
env.DistributeDocs(fixed_html)

View file

@ -10,7 +10,7 @@ This callback will be called just before the first page is loaded and the instal
Example:
\c !include "${NSISDIR}\Include\WinMessages.nsh"
\c !include "WinMessages.nsh"
\c
\c Function .onGUIInit
\c # 1028 is the id of the branding text control

View file

@ -86,4 +86,4 @@ To extend a command over multiple lines, use a backslash (\\) at the end of the
\\<b\\>Configuration file\\</b\\>
If a file named "nsisconf.nsh" in the same directory as makensis.exe exists, it will be included by default before any scripts (unless the /NOCONFIG command line parameter is used).
If a file named "nsisconf.nsh" in the config directory exists, it will be included by default before any scripts (unless the /NOCONFIG command line parameter is used). The config directory on Windows is the same directory as makensis.exe is in. On other platforms this is set at install time and defaults to $PREFIX/etc/. You can alter this at runtime, see \k{usageenvironment} for more information.

View file

@ -19,7 +19,7 @@ If you want to use MakeNSIS on the command line, the syntax of the makensis comm
\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.nsh.
\b /NOCONFIG disables inclusion of 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).
@ -39,6 +39,14 @@ If you want to use MakeNSIS on the command line, the syntax of the makensis comm
\b If multiple scripts are specified, they are treated as one concatenated script.
\S1{usageenvironment} Environment variables
makensis checks a number of environment variables that tell it where to locate the things it needs in order to create installers. These variables include:
\b NSISDIR, NSISCONFDIR - Places where nsis data and config files are installed. NSISDIR alters the script variable $\{NSISDIR\}. See \k{varconstant} for more info.
\b APPDATA (on Windows) or HOME (on other platforms) - Location of the per-user configuration file.
\S1{usageexamples} Examples
Basic usage:

View file

@ -77,7 +77,9 @@ The location of the installer executable (technically you can modify this variab
\e{$\{NSISDIR\}}
A symbol that contains the path where NSIS is installed. Detected at compile time. Useful if you want to call resources that are in NSIS directory e.g. Icons, UIs...
A symbol that contains the path where NSIS is installed. Useful if you want to call resources that are in NSIS directory e.g. Icons, UIs etc.
When compiled with support for keeping makensis and the data in the same place (the default on Windows), it is in the same place as makensis, on other platforms it is set at compile time (See the INSTALL file for info). In both instances you can modify it at runtime by setting the NSISDIR environment variable. See \k{usageenvironment} for more info.
\e{$WINDIR}