[wix-users] Incremental builds

Bob Arnson bob at firegiant.com
Fri Nov 4 12:51:21 PDT 2016


Worth looking to see how the C# targets do it (if they do).

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Friday, 4 November, 2016 15:45
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Incremental builds

Yeah, that's where I was thinking of an optional property to define. It could integrate into the existing targets, which would take the DefineConstants and add it to an intermediate file.  On second build, before writing to the file it could read from it and compare the property to the file to determine if it needs to write to the file.



-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Rob Mensching
Sent: Friday, November 04, 2016 12:17 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Incremental builds

Overriding a Property from the command-line will not cause a project to be considered dirty. You need that Property to "physically" change something (part of path to select a file with newer timestamp, cause a task to run to modify a file, etc).

_____________________________________________________________
 Short replies here. Complete answers over there: http://www.firegiant.com/


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Friday, November 4, 2016 7:58 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Incremental builds

I'm trying to get incremental builds working, and I am fairly certain this is a MSBuild problem not a wix problem.  I have a Wix project which is built using a CI server where a build number is passed to the project as a property.  I then use a DefineConstants element in the wixproj to pass my custom property to wix via a variable.

SomeApplication.wixproj /p: BuildNumber={CI variable syntax for the build}

And in the wixproj:
<VersionMajorMinor>1.0</VersionMajorMinor>
<BuildNumber Condition=" '$(BuildNumber)' == '' ">2</BuildNumber> <ProductVersion>$(VersionMajorMinor).$(BuildNumber).0</ProductVersion>
    <DefineConstants>
      $(DefineConstants);
      ProductVersion=$(ProductVersion);
      BuildNumber=$(CIBuildNumber);
    </DefineConstants>

And finally in my Product.wxs, I consume the ProductVersion via:
<Product Id="*" Version="$(var.ProductVersion)" Name="..."

Is there some standard functionality in MSBuild I am missing to be able to say the build is dirty if a property changes? I know MSBuild looks at file timestamps to determin if a target is needed via the inputs and outputs, so what I am tinking I'd need to do is add a file for the DefineConstants, inject them into the compile DependsOnTargets, and then only write the file after reading the values and comparing them to the current DefineConstants if they are different. Shouldn't a DefineConstants change triggering a build be an intergral part of the wix targets?

Thanks,
Jacob


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list