Skip to content

Commit

Permalink
Use Wix arch parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
raspi committed Feb 15, 2017
1 parent 9312f41 commit d4579ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion WinLLDPService/build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if([System.IO.File]::Exists("$output_installer_file")) {
Write-Host "Running WiX candle.."
$stdErrLog = "$pwd/candle-stderr.log"
$stdOutLog = "$pwd/candle-stdout.log"
$process = Start-Process candle -Wait -PassThru -NoNewWindow -ArgumentList '-v -ext WiXNetFxExtension -ext WixUtilExtension installer.wxs' -RedirectStandardOutput $stdOutLog -RedirectStandardError $stdErrLog
$process = Start-Process candle -Wait -PassThru -NoNewWindow -ArgumentList "-v -ext WiXNetFxExtension -ext WixUtilExtension installer.wxs -arch $arch" -RedirectStandardOutput $stdOutLog -RedirectStandardError $stdErrLog
if ($process.ExitCode -ne 0) {
Write-Host "ERROR: running WiX candle failed."

Expand All @@ -101,6 +101,7 @@ if($process.ExitCode -ne 0) {
Get-Content $stdOutLog
Get-Content $stdErrLog

Write-Host "Press any key to continue..."
$null = [System.Console]::ReadKey()

Exit 1
Expand Down
11 changes: 10 additions & 1 deletion WinLLDPService/build/installer.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<?define ProductShortName = "WinLLDPService" ?>
<?define Manufacturer = "Pekka Järvinen" ?>
<?define HomepageURL = "https://raspi.github.io/projects/winlldpservice/" ?>

<?if $(sys.BUILDARCH) = x64 ?>
<?define Win64 = "yes" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else ?>
<?define Win64 = "no" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<?include $(sys.CURRENTDIR)version.wxi ?>
<Product Name="$(var.ProductShortName)" Manufacturer="$(var.Manufacturer)" Version="$(var.VersionNumber)" Language="1033" Codepage="1252" Id="408ea9f0-8118-4f0e-b618-62dd6b7dedb5" UpgradeCode="$(var.UpgradeCode)">
Expand Down Expand Up @@ -35,7 +44,7 @@
<Condition Message="This setup requires WinPcap to be installed."><![CDATA[ NOT WINPCAPISINSTALLED OR ( 4 > WINPCAPMAJORVER AND 1 > WINPCAPMINORVER) ]]></Condition>
<!-- Install dir -->
<Directory Id="TARGETDIR" Name="SourceDir" DiskId="1">
<Directory Id="ProgramFilesFolder" Name="PFiles">
<Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
<Directory Id="INSTALLDIR" Name="$(var.ProductShortName)">
<!-- Main EXE file -->
<Component Id="MainExecutable" Guid="9a017631-7016-4f0f-a2bb-866be992ea9a">
Expand Down

0 comments on commit d4579ec

Please sign in to comment.