[wix-users] Command line to generate msi

Russell Haley russ.haley at gmail.com
Mon Jan 8 14:00:39 PST 2018


On Mon, Jan 8, 2018 at 1:31 PM, Jon Earle via wix-users
<wix-users at lists.wixtoolset.org> wrote:
> Ours is built using a standard gnu makefile, excerpts as follows:
>
> MSBUILD ?= C:/Program\ Files\ \(x86\)/MSBuild/14.0/Bin/MSBuild.exe
> CYGWIN_MSBUILD = /cygdrive/$(subst :,,$(MSBUILD))
>
>     OUTPUT_DIR="$(WIN_TARGET_DIR)" \
>     VERSION=$(VERSION) \
>     RELEASE=$(RELEASE) \
>     PRODUCT=$(PRODUCT) \
>     EULAFILE=$(EULAFILE) \
>     $(CYGWIN_MSBUILD) /m "Wix/MyClient.sln" "/t:CustomActions;MSI" \
>             /p:TargetFrameworkVersion=$(DOTNETFRAMEWORK) \
>             /p:Configuration="Release" \
>             /p:Platform="x64"
>
>
> We have two targets (more, actually, but this gets you going) - one to build the custom actions dll (CustomActions) and the second to generate the MSI (MSI).  The properties "/p:xxx" are used within msbuild and/or the msi generation itself (particularly the TargetFrameworkVersion).  As well, we pass in a number of variables on the msbuild commandline (eg. OUTPUT_DIR).  Finally, we are building within a cygwin bash shell, so we adjust the path to make it happy (definition of CYGWIN_MSBUILD).
>
> ________________________________
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of madhusudhana rao Vadlamuri via wix-users <wix-users at lists.wixtoolset.org>
> Sent: Monday, December 4, 2017 10:00 PM
> To: WiX Toolset Users Mailing List
> Cc: madhusudhana rao Vadlamuri
> Subject: [wix-users] Command line to generate msi
>
> Hi all,
> any one have idea to generate msi from wix .sln using command line .

A solution file is just an MSBuild file. You can just run msbuild.exe
mySolution.sln. It's been a while, but here is an example of how I did
it in a bat file:

set msBuildDir=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319

set conf=<Custlevel-or-Debug>

set solutionDir=%~dp0%\..\<yer-source>\<files-here>

call %msBuildDir%\msbuild.exe  %solutionDir%\<yer-solution>.sln
/p:Configuration=%conf%
/l:FileLogger,Microsoft.Build.Engine;logfile=..\Manual_MSBuild_%conf%.log
/m /t:Clean,Build
set msBuildDir=


REM for more information on adding a clean:
https://msdn.microsoft.com/en-us/library/ms171480.aspx?f=255&MSPPError=-2147217396


No reason you can't do the same with the project too.

HTH
Russ

> Please help on this
> thank you
>
> --
> V.Madhusudhana Rao
> Mobile    : +1-412-584-2411
> Email      : vadlamuri.madhu at gmail.com.
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
> WiX Support | WiX Experts and Resources from FireGiant<http://www.firegiant.com/>
> www.firegiant.com
> WiX Support | Installation, Development, Deployment | WiX Experts and Resources from FireGiant
>
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list