From 8e30ac89798c7289b3a3d01262c216e2b4398d38 Mon Sep 17 00:00:00 2001 From: pabs3 Date: Mon, 12 Mar 2007 10:07:38 +0000 Subject: [PATCH] Install the example plugin and C header by default git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4996 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/generalpurpose.but | 2 +- Docs/src/tutorial.but | 2 +- INSTALL | 1 + SConstruct | 10 +++++++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Docs/src/generalpurpose.but b/Docs/src/generalpurpose.but index 340d9f2c..3f82fefe 100644 --- a/Docs/src/generalpurpose.but +++ b/Docs/src/generalpurpose.but @@ -4,7 +4,7 @@ \c dllfile [/NOUNLOAD] function_name -Calls a function named \e{function_name} inside a NSIS extension DLL, a plug-in. See Contrib\\ExDLL in the source code package for an example of how to make one. Extension DLLs can access the stack and variables. Use /NOUNLOAD to force the installer to leave the DLL loaded. Note: To automatically extract and call plug-in DLLs, use a plug-in command instead of CallInstDLL. +Calls a function named \e{function_name} inside a NSIS extension DLL, a plug-in. See the \L{../Examples/Plugin/}{example plugin} for how to make one. Extension DLLs can access the stack and variables. Use /NOUNLOAD to force the installer to leave the DLL loaded. Note: To automatically extract and call plug-in DLLs, use a plug-in command instead of CallInstDLL. \c Push "a parameter" \c Push "another parameter" diff --git a/Docs/src/tutorial.but b/Docs/src/tutorial.but index 85cc42aa..f7212606 100644 --- a/Docs/src/tutorial.but +++ b/Docs/src/tutorial.but @@ -274,7 +274,7 @@ The plug-ins that NSIS knows of are listed at the top of the output of the compi The NSIS distribution already included many plug-ins. \L{../Docs/InstallOptions/Readme.html}{InstallOptions} is a popular plug-in that allows you to create custom pages, in combination with the NSIS Page commands (See \R{pages}{Pages}). The \L{../Docs/StartMenu/Readme.txt}{Startmenu plug-in} provides a page that allows the user to choose a Start Menu folder. There are a lot of plug-ins for different purposes, have a look at the \L{../Docs/}{Docs folder} for help files and examples. You can find additional plug-ins on-line: \W{http://nsis.sf.net/wiki/}{NSIS Wiki}. -You can also create a plug-in yourself. C/C++ and Delphi header files are already available, see Contrib/ExDLL in the source code package for a basic plug-in example. Source code of included plug-ins can also be found in the source code package. +You can also create a plug-in yourself. C/C++ and Delphi header files are already available, see the \L{../Examples/Plugin/}{example plugin} for how to do this. Source code of included plug-ins can also be found in the source code package. \H{tutmore} More diff --git a/INSTALL b/INSTALL index fa128639..94b845d8 100644 --- a/INSTALL +++ b/INSTALL @@ -61,6 +61,7 @@ This is a trimmed version of Appendix "Building NSIS" of the documentation. PREFIX_DATA: Where to put the plugins, stubs, etc. Defaults to $PREFIX/share/nsis/ PREFIX_DOC: Where to put the docs and examples. Defaults to $PREFIX/share/doc/nsis/ PREFIX_DEST: The install root Useful for packagers. Defaults to the root directory. + PREFIX_INC_C: Where to put the C headers. Defaults to $PREFIX/include/nsis/ - Problems diff --git a/SConstruct b/SConstruct index b5d95486..d7284684 100644 --- a/SConstruct +++ b/SConstruct @@ -45,7 +45,8 @@ misc = [ 'Graphics', 'Language files', 'Modern UI', - 'VPatch' + 'VPatch', + 'ExDLL' ] doc = [ @@ -91,6 +92,7 @@ install_dirs = { 'bin': '$PREFIX', 'data': '$PREFIX', 'doc': '$PREFIX', + 'inc_c': '$PREFIX', }, 'static': { 'dest': '', @@ -99,6 +101,7 @@ install_dirs = { 'bin': '$PREFIX/bin', 'data': '$PREFIX/share/nsis', 'doc': '$PREFIX/share/doc/nsis', + 'inc_c': '$PREFIX/include/nsis', } } @@ -137,6 +140,7 @@ opts.Add(('PREFIX_CONF', 'Path to install nsisconf.nsh to', dirs['conf'])) opts.Add(('PREFIX_BIN', 'Path to install native binaries to', dirs['bin'])) opts.Add(('PREFIX_DATA', 'Path to install nsis data to (plugins, includes, stubs, contrib, win32 binaries)', dirs['data'])) opts.Add(('PREFIX_DOC','Path to install nsis README / INSTALL / TODO files to.', dirs['doc'])) +opts.Add(('PREFIX_INC_C','Path to install nsis C header files to.', dirs['inc_c'])) opts.Update(defenv) Help(opts.GenerateHelpText(defenv)) @@ -262,6 +266,9 @@ def DistributeDocs(files, names=[], path='', alias=None): def DistributeExamples(files, names=[], path='', alias=None): return defenv.Distribute(files, names, 'doc', 'Examples', path, alias, 'examples') +def DistributeIncC(files, names=[], path='', alias=None): + return defenv.Distribute(files, names, 'inc_c', '', path, alias, 'inc-c') + def Sign(targets): if defenv.has_key('CODESIGNER'): for t in targets: @@ -283,6 +290,7 @@ defenv.DistributeInclude = DistributeInclude defenv.DistributeDoc = DistributeDoc defenv.DistributeDocs = DistributeDocs defenv.DistributeExamples = DistributeExamples +defenv.DistributeIncC = DistributeIncC defenv.Sign = Sign defenv.TestScript = TestScript