Windows Installer for NAnt
Timotheus Pokorra <[email protected]> Fri, 11 Nov 2011 13:36:18 +0100
| Newsgroups | gmane.comp.windows.dotnet.nant.user |
|---|---|
| Message-ID | <CAJ0=nQcOCEXHM8aObBfFKeqg0c2eSCwDuU-Ye+G1tLyM+o8dPQ@mail.gmail.com> |
Hello all,
thanks for the very useful tool of NAnt! We are heavily using it for
our OpenPetra project.
But we have had now several problems with permissions for executing
nant on Windows, from the Program Files directory. Also the creation
of the nant.bat was not trivial, and could cause problems with
permissions.
The easy solution was to create a small InnoSetup Installer.
You can download it from our files section at SourceForge:
http://sourceforge.net/projects/openpetraorg/files/openpetraorg/Tools/NAnt-Setup-0.91.exe/download
The script file for InnoSetup looks like this:
[Setup]
AppName=NAnt
AppVerName=NAnt 0.91
DefaultDirName={pf}\NAnt
DefaultGroupName=NAnt
LicenseFile=nant-0.91\COPYING.txt
OutputBaseFilename=NAnt-Setup-0.91
[Files]
Source: nant-0.91\*.*; DestDir: {app}; Flags: recursesubdirs createallsubdirs
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssPostInstall then
begin
SaveStringToFile(ExpandConstant('{win}/nant.bat'),
ExpandConstant('@"{app}\bin\NAnt.exe" %*'), False);
end;
end;
If you have trouble with your old NAnt installation, you should delete
the folder first from the Program Files, before you run the installer!
see also http://tpokorra.blogspot.com/2011/11/windows-installer-for-nant.html
Thanks again,
Timotheus
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1