I'm not complaining because the msi task is very useful, but I'm wondering if there is any reason behind some of the structure being the way it is. I'm looking specifically at the dialogs section. To me it would seem most logical to have controls as a nested element of the dialog node, and then
Hi,
I'm trying to build an MSI that includes Crystal Reports, but I can't get the regwiz merge module to include properly. I have the following snipprt in my build script:
mergemodules
merge feature=F_DASetup
modules
include
Simpler that this, there is an uptodate task in NAnt thae will validate if any of the files in one fileset are newer that those in another fileset and set a property to true if they are. you can then use this in the if attribute in vbc/csc.
As for the suggestion of including your project files
Because it's an XML file, you need to escape the quotes within attribute values. try:
ReplaceText OriginalValue=value=quot;truequot; ReplaceValue=value=quot;falsequot; /
HTH,
Bill
Koen Mayens [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
30/11/2005 09:41
To:
Can anyone think of an easy way round
this? I want to execute by build in reverse dependency order. Why?
Well because I have a target in there called register that regieters
the components that are build in COM+ so a developer can do a build
all register and be aboe to run the system for
Hi Goel,
Yes, you need some nested elements to the msi
task. At a minimum, I think you'll probably need something the snippet
below. The documentation on the msi task assumes that you
already know a bit about the windows installer database. A good starting
point for this if your not familiar
Tom,
Try adding a Custom Action to set the TARGETDIR property.
Something like:
customactions
!-- Sets the default installation directory --
customaction action="" type=51
source=TARGETDIR target=[ProgramFilesFolder]\[Manufacturer]\[ProductName]
/
/customactions
Tom,
I'm pretty sure there is an example of this on the NAnt
Wiki under the MSI FAQ. However, the Wiki seems to be down at the
moment with some sort of database error. I'm not sure who administers
it, but if they read this, is it possible to fix it?
I've not used the built in stuff in msi/VS as
Hi Tom,
To include a license file, all you need to do is (as you
have done) set the license attribute on the msi task and point
it to an RTF file. If this doesn't work, check that the location
pointed to by ${license.rtf} is definately valid. Try ssomething
like echo
If you want an array of files (such as solution files),
then the best way to do it is probably with a fileset. e.g.
fileset id=solutions
include name=*.sln /
/fileset
then use:
foreach item=file property=filename
in
items refid=solutions
/
/in
do
whatever... /
/do
/foreach
Because you are in XML, you need to use the quote entity.
Try:
exec program=cmd.exe
commandline=/c quot;C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\devenvquot; ${source.code.folder}\mobilens.sln /rebuild
Debug /
HTH,
Bill
From Jay Williams [EMAIL
Brad,
I don't believe you can define include blocks
in script. As an alternative, you could extract your copy to a separate
task and set a property for the base dir before calling it? Something
like:
!-- My Copy Target --
target name=MyCopy
copy basedir=${copy.base}
include name=*.dll
/
Thomas,
I'm not sure if there is an easier way, but as you (presumably)
know the GUID of your application, you could try the following. I
haven't tried it myself, but I think it should work:
Add a search to your script to check the registry for
Hi Thomas,
I did edit the default template that comes with the msi
task as I wanted to remove the user name and the License agreement dialogs
(as it's an internal install)
As I don't have any commercail software for editing the
msi, I simply used Orca. To remove the dialogs, you need to edit
Hi Thomas,
The snippet of Nant Script you posted looks sensible.
Are you allowed to post the whole script? It would help to
see what the rest of the script looks like. When you view the created
msi, what entries do you get in the FeatureComponents table? Is there
a directory structure under your
I'm definitely not complaining, because NAnt is a wonderful
tool, but given that by your admission and by my experience, the current
nightly builds are far more stable that 0.85, would it not be a good idea
to make the next release a proper release rather than another RC?
There could even be an
Hi Tom,
There are two ways to do this. One is to use the
RemoveFile table, and the other is to use a custom action. The RemoveFile
table is probably simpler as it links to the conponents you are installing,
but unfortunately it's not directly supported by the msi task so
you have to use the
I certainly think this is a good way to go, but I don't
fragment to quite the level you have here.
Basically, I have a file called generictasks.build which
contains tasks such as compile, clean, assemblyinfo etc. Another
file called properties.build contains property definitions that are global
Hi Brad,
With Ant, you could specify a file in the property
task to load a set of properties from a file, but in NAnt you have to do
this through using the include task (as you guessed) to include
the properties file.
One thing to watch out for (as it often comes up on the
list) is if you are
Boni,
Have a look at the uptodate task, that should
do what you want.
Something like:
uptodate property=isUpToDate
sourcefiles
include name=*.my_ext
/
/sourcefile
targetfiles
include name=*.my_compiled
/
/targetfile
/uptodate
exec program=my_compiler.exe unless=${isUpToDate}
/
It's not as bad as it may sound. The system I developed
this for had around 220 assemblies in it in a mixture of C# and VB.NET,
but maintenance of the scripts was never a problem.
Cheers,
Bill
From Eric Fetzer [EMAIL PROTECTED]@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]
Basically, everything inside a ${ ... } block is evaluated,
so there's no need for the second nested block. Try:
echo message=version saved ${functions::set_value_to_file('C:\Autotests\V5.2.1\Results\Logs\NAnt.status.xml',
'version', Version)} /
Cheers,
Bill
From Vrata Cermak [EMAIL
Hi Bob,
The way that I do this is to use the asminfo task
to generate the assemblyinfo file on the fly rather than having one in
the project. This way I can work out the version numbers into properties
(I use a time stamp style version number) and set this to the AssemblyVersionAttribute.
If you are using the msi task to create the install set in the first
place, why do you need to pot process it with InstallShield? Why not just
do the COM+ and database stuff in your NAnt script for the msi task?
Registering COM+ components in fairly trivial in a custom action using the
You don't need to go as far as NAntContrib - have a look at the
servicecontroller task in NAnt.
http://nant.sourceforge.net/release/latest/help/tasks/servicecontroller.html
Cheers,
Bill
From Phil Sayers [EMAIL PROTECTED]@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]
09/02/2007
You can't, however, you can install an assembly to the gac with the
gac-install task in nant-contrib:
http://nantcontrib.sourceforge.net/release/latest/help/tasks/gac-install.html
Cheers,
Bill
From Rosy Malhotra [EMAIL PROTECTED]@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]
You need to give your assembly a strong name. You can do this by setting
an AssemblyKeyFile attribute in the assemblyinfo file. To kenerate a key
file use the sn.exe utility (look on MSDN for details.)
Something like:
Assembly: AssemblyVersion(1.0.0.0)
Assembly:
Haven't checked this, but logically if items is a fileset, then you
should be able to use:
foreach item=”File” property=”filename”
in
items refid=”svnchg”/
/in
do
echo message=”${filename}”/
/do
/foreach
HTH,
Bill
From Mark Modrall [EMAIL
Eric,
Presumably if the configuration is machine dependant, then you are only
concerned with the properties on the command line changing as I would
imaging the name of the build script, log file etc will always be the
same?
In this case, have you considered defining the properties in a
Thatcher,
How are you decorating your elements? The attributes you need are
different for attributes and elements. e.g.
This will be an attribute of the mcc task, and is optional.
[TaskAttribute(targetDir, Required = false)]
public bool TargetDir
{
get {...}
set {...}
}
This will be
Folks,
I've put together a sandcastle task for NAnt. Although I still need to
tidy the code up a bit, it seems to work ok. Would anyone find it useful?
Does anyone want to test it? It only works with version 2 of the
framework, and looks in the registry to find hhc.exe, so it probably
Don't think you can do this directly with NAnt. The simplest way is
probably to use the exec task to run WScript.exe and pass the .vbs file
in the arguments.
Cheers,
Bill
From Tim Mayert [EMAIL PROTECTED]@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]
11/07/2007 22:15
To
DOH! Sent this to just Ashish
When resolving a reference, the VB6 compiler will look first at the CLSID
hive in the registry for the GUID specified in the VBP file. If it cannot
find this, then it will use the path specified in the VBP file to try and
file the reference.
If you are
If you have a pre-defined fileset, you can use the fileset::has-files
function in NAntContrib:
http://nantcontrib.sourceforge.net/release/latest/help/functions/fileset.h
as-files.html
Cheers,
Bill
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL
This is pretty easy to accomplish by iterating a fileset created using
**/*.build to list all the build files in your sub-directory structure and
then execute the nant task on each one with the necessary parameters.
It does however sound a bit dangerous unless all your assemblies are (and
Have you adding it to the Path environment on the machine? I'm not sure,
but I believe nant starts a new process to run cabarc, and this would
presumably get the default Path from the machine settings, not from your
current process, and so wouldn't include the value you have just set.
Just a
I don't think you can do what you are after, but two other options spring
to mind. One is as you suggest, which is to define the fileset and just
add to it. This is OPK if you are just generating the fileset of .build
files, but may be a pain if you have to add it to several filesets. E.g.
According to the documentation, you should be setting the value attribute
to Null, not 0. 0 will just determine the order the sequence steps get
executed in. Try value= instead.
If that doesn't work, there are two other ways of doing this that I can
think of:
1) Do what I did and create your own
You are using a fileset by using items. If you check the documentation,
you'll see that the items element is of type fileset. This approach is
used a few places in NAnt and can be confusing - basically, fileset is a
type, and so any element in a task can be of this type without actually
having
Here's what I use as a custom action to install a COM+ component. The
same should work for a Windows Service, or anything else using InstallUtil
and an installer class.
customaction action=General.install type=1025
source=InstallUtil target=ManagedInstall /
Alon
Get rid of the escaping round the property. You are already escaped for
the function. i.e.
exec program=${fxcop} failonerror=false
arg value=/file:${core.source}\SomeAssembly.dll
if=${file::exists(core.source'\ SomeAssembly.dll ')} /
/exec
HTH,
Bill
From Alon Amsalem, iFOREX
Also, it might be prudent to use the path::combine function just to be on
the safe side wrt slashes etc. i.e.
exec program=${fxcop} failonerror=false
arg value=/file:${core.source}\SomeAssembly.dll
if=${file::exists(path::combine(core.source, '\ SomeAssembly.dll'))} /
/exec
From
Don't know if this helps Beth, but I wrote an install for Nant so
developers can install it to their machines (mostly because we have some
custom tasks etc) but because our build scripts also create installers, I
included cabarc.exe and cabinet.dll in the install. These are installed
to the
I don't think you'll be able to do this as that's not how the FileSet works.
The FileSet enumerates the files that match one or more patterns. When you
specify a fileset as you have done below, you are not actually adding
Project1.csproj to the FileSet, you are adding the pattern. This
There is a file::exist() function in NAnt that you could use. May not be
that elegant, but you could just create a target that calls this function
on all the files you need to validate. You could either hard code the
file names to test for, or if they are already available (i.e. as the
output of
Use the environment::get-variable function.
http://nant.sourceforge.net/release/latest/help/functions/environment.get-
variable(System.String).html
Cheers,
Bill
_
From: subrat.w...@gmail.com [mailto:subrat.w...@gmail.com]
Sent: 22 July 2010 08:59
To:
46 matches
Mail list logo