I am currently able to get a simple NSIS installer built using the standard
stuff.  This is going to need a bit more work to finish, but the existing
installer will need a bit of work also to be restructured to handle
out-of-source builds and the different file locations associated with a
CMake build.  While fixing up the existing NSIS installer is doable, I
think I'm really in favor of switching over to the CMake-generated
installer.  It makes a lot of sense having the build process drive the
content of the installed files.  The installer is also flexible enough to
allow us to do things like spinning a build that will install the .pdb
files for problem determination situations.

Anyway, let me give a brain dump of what I've found so far.  I think this
is at a point where I need to have Mark take a look at things to help
decide which path to take to move this forward.

To create the installer, do the following steps:

1) Make a directory somewhere for the install build and switch to that
directory.
2) Configure the build using:  cmake -G "NMake Makefiles" -DBUILD_NSIS=1
<directory of the source tree>
3) Do a build by issuing "nmake"
4) Generate the installer using "cpack"

After you have done these 3 steps, you will only need to do the nmake and
cpack steps to build after that.

CPack generates an NSIS installer by using a couple of template files and
filling in information from CMake variables.  The default template files
are part of the cmake build and are located in the subdirectory
share\cmake-2.8\Modules.  There is an installer template named
NSIS.template.in and an options file named NSIS.InstallOptions.ini.in.

The CPack generating performs variable substitutions in these templates and
then generates the installer .exe from the configured files.  The generated
files end up in the _CPack_Packages\win64\NSIS subdirectory of your build.
 Examining the template and the generated project.nsi file is a useful
exercise.

A lot of the NSIS install can be configured just by setting the appropriate
CPACK_* variables in the CMakeLists.txt file, but not everything we do in
our existing installer can be handled that way.  For the rest of the stuff,
we need to create a custom template.

A custom template is just a different version of the NSIS.template.in and
NSIS.InstallOptions.ini.in that can contain any additional stuff we want.
 The location of this file is specified using the CPACK_MODULE_PATH
variable, so we can place this anywhere we want (e.g., in the same
directory we use for the install stuff now).

This is the point where I need a lot of input from Mark.  There are two
obvious paths to creating this template:  1) Start with the existing
template and add in the extra stuff we need or 2)  Start with our existing
.nsi file and convert this into a template file.  I suspect 1) might be the
easier path, but I'm not familiar enough with how the NSIS scripts work to
figure out which parts need to be moved over to the template file (and
how).

Rick
------------------------------------------------------------------------------
The best possible search technologies are now affordable for all companies.
Download your FREE open source Enterprise Search Engine today!
Our experts will assist you in its installation for $59/mo, no commitment.
Test it for FREE on our Cloud platform anytime!
http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to