Changed build settings to spit out single cab for both architectures (x86, amd64)

This commit is contained in:
Benjamin Höglinger
2018-02-01 10:53:49 +01:00
parent 93e68e92ce
commit d2d690467d
5 changed files with 69 additions and 21 deletions

View File

@@ -8,8 +8,14 @@
.Set CompressionType=MSZIP
.Set Cabinet=on
.Set Compress=on
.Set CabinetNameTemplate=ViGEmBus.cab
.Set DestinationDir=ViGEmBus
ViGEmBus\ViGEmBus.inf
ViGEmBus\ViGEmBus.sys
ViGEmBus.pdb
ViGEmBus\WdfCoinstaller01009.dll
.\artifacts\ViGEmBus.inf
.Set DestinationDir=ViGEmBus\x64
.\artifacts\x64\ViGEmBus.sys
.\artifacts\x64\ViGEmBus.pdb
.\artifacts\x64\WdfCoinstaller01009.dll
.Set DestinationDir=ViGEmBus\x86
.\artifacts\x86\ViGEmBus.sys
.\artifacts\x86\ViGEmBus.pdb
.\artifacts\x86\WdfCoinstaller01009.dll

View File

@@ -1,4 +1,4 @@
version: 1.15.{build}
version: 1.15.{build}.0
image: Visual Studio 2017
build_script:
- ps: .\build.ps1 -configuration release
@@ -6,17 +6,14 @@ after_build:
- ps: |
Invoke-WebRequest "https://github.com/pavel-a/ddverpatch/files/1215010/verpatch-1.0.15.1-x86-codeplex.zip" -OutFile verpatch-1.0.15.1-x86-codeplex.zip
Expand-Archive verpatch-1.0.15.1-x86-codeplex.zip -DestinationPath .
.\verpatch.exe .\bin\x64\ViGEmBus\ViGEmBus.sys "$env:APPVEYOR_BUILD_VERSION"
.\verpatch.exe .\bin\x64\ViGEmBus\ViGEmBus.sys /pv "$env:APPVEYOR_BUILD_VERSION"
.\verpatch.exe .\bin\x86\ViGEmBus\ViGEmBus.sys "$env:APPVEYOR_BUILD_VERSION"
.\verpatch.exe .\bin\x86\ViGEmBus\ViGEmBus.sys /pv "$env:APPVEYOR_BUILD_VERSION"
makecab.exe /d SourceDir=bin\x64 /d CabinetNameTemplate=ViGEmBus_x64.cab /f ViGEmBus.ddf
makecab.exe /d SourceDir=bin\x86 /d CabinetNameTemplate=ViGEmBus_x86.cab /f ViGEmBus.ddf
.\verpatch.exe .\artifacts\x64\ViGEmBus.sys "$env:APPVEYOR_BUILD_VERSION"
.\verpatch.exe .\artifacts\x64\ViGEmBus.sys /pv "$env:APPVEYOR_BUILD_VERSION"
.\verpatch.exe .\artifacts\x86\ViGEmBus.sys "$env:APPVEYOR_BUILD_VERSION"
.\verpatch.exe .\artifacts\x86\ViGEmBus.sys /pv "$env:APPVEYOR_BUILD_VERSION"
makecab.exe /f ViGEmBus.ddf
artifacts:
- path: disk1\ViGEmBus_x64.cab
name: ViGEmBus_unsigned_x64
- path: disk1\ViGEmBus_x86.cab
name: ViGEmBus_unsigned_x86
- path: disk1\ViGEmBus.cab
name: ViGEmBus_unsigned_x86_amd64
deploy:
- provider: Environment
name: BUILDBOT

View File

@@ -1,4 +1,5 @@
using System;
using System.IO;
using System.Linq;
using Nuke.Common;
using Nuke.Common.Git;
@@ -48,5 +49,41 @@ class Build : NukeBuild
{
MSBuild(s => DefaultMSBuildCompile.SetTargetPlatform(MSBuildTargetPlatform.x64));
MSBuild(s => DefaultMSBuildCompile.SetTargetPlatform(MSBuildTargetPlatform.x86));
#region Ugly hack, fix me!
EnsureExistingDirectory(Path.Combine(ArtifactsDirectory, @"x64"));
EnsureExistingDirectory(Path.Combine(ArtifactsDirectory, @"x86"));
File.Copy(
Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus.inf"),
Path.Combine(ArtifactsDirectory, @"ViGEmBus.inf")
);
File.Copy(
Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus.pdb"),
Path.Combine(ArtifactsDirectory, @"x64\ViGEmBus.pdb")
);
File.Copy(
Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus\ViGEmBus.sys"),
Path.Combine(ArtifactsDirectory, @"x64\ViGEmBus.sys")
);
File.Copy(
Path.Combine(WorkingDirectory, @"bin\x64\ViGEmBus\WdfCoinstaller01009.dll"),
Path.Combine(ArtifactsDirectory, @"x64\WdfCoinstaller01009.dll")
);
File.Copy(
Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus.pdb"),
Path.Combine(ArtifactsDirectory, @"x86\ViGEmBus.pdb")
);
File.Copy(
Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus\ViGEmBus.sys"),
Path.Combine(ArtifactsDirectory, @"x86\ViGEmBus.sys")
);
File.Copy(
Path.Combine(WorkingDirectory, @"bin\x86\ViGEmBus\WdfCoinstaller01009.dll"),
Path.Combine(ArtifactsDirectory, @"x86\WdfCoinstaller01009.dll")
);
#endregion
});
}

View File

@@ -16,21 +16,27 @@ ViGEmBus_Device_CoInstaller_CopyFiles = 11
; ================= Class section =====================
[SourceDisksNames]
1 = %DiskName%,,,""
[SourceDisksNames.amd64]
1 = %DiskName%,,,"\x64"
[SourceDisksNames.x86]
1 = %DiskName%,,,"\x86"
[SourceDisksFiles]
ViGEmBus.sys = 1,,
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1
ViGEmBus.sys = 1,,
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll = 1
;*****************************************
; Install Section
;*****************************************
[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$
%ManufacturerName%=Standard,NTamd64,NTx86
[Standard.NT$ARCH$]
[Standard.NTamd64]
%ViGEmBus.DeviceDesc%=ViGEmBus_Device, Root\ViGEmBus
[Standard.NTx86]
%ViGEmBus.DeviceDesc%=ViGEmBus_Device, Root\ViGEmBus
[ViGEmBus_Device.NT]

View File

@@ -155,6 +155,7 @@
<IncludePath>$(SolutionDir)Include;$(IncludePath)</IncludePath>
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
<OutDir>$(SolutionDir)bin\$(DDKPlatform)\</OutDir>
<EnableInf2cat>false</EnableInf2cat>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
@@ -166,6 +167,7 @@
<IncludePath>$(SolutionDir)Include;$(IncludePath)</IncludePath>
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
<OutDir>$(SolutionDir)bin\$(DDKPlatform)\</OutDir>
<EnableInf2cat>false</EnableInf2cat>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>