Working setup

Updated driver settings to universal model
This commit is contained in:
Benjamin Höglinger-Stelzer
2020-09-09 20:35:39 +02:00
parent 5718b17e7d
commit 09561e6922
5 changed files with 59 additions and 27 deletions

View File

@@ -8,13 +8,16 @@
<?define Win64 = "yes" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define ArchDir = "x64" ?>
<?define WixQuietExec="WixQuietExec64"?>
<?else ?>
<?define bitness = "(32 bit)" ?>
<?define Win64 = "no" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define ArchDir = "x86" ?>
<?define WixQuietExec="WixQuietExec"?>
<?endif ?>
<!-- basic product properties -->
<Product Id="*" Name="Nefarius Virtual Gamepad Emulation Bus Driver" Language="1033" Version="1.0.0.0"
Manufacturer="Nefarius Software Solutions e.U."
UpgradeCode="b935b0e2-a67f-4f2f-88de-2457dbd70c6e">
@@ -29,30 +32,47 @@
<Property Id="ARPURLINFOABOUT" Value="https://github.com/ViGEm/ViGEmBus" />
<Property Id="ARPNOMODIFY" Value="1" />
<!-- always perform major upgrade and remove previous versions -->
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="b935b0e2-a67f-4f2f-88de-2457dbd70c6e">
<UpgradeVersion
Minimum="1.0.0.0" Maximum="99.0.0.0"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Feature Id="ProductFeature" Title="Nefarius Virtual Gamepad Emulation Bus Driver" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<CustomAction Id="DevconInstall"
Directory="INSTALLFOLDER"
ExeCommand="[INSTALLFOLDER]devcon.exe install .\ViGEmBus.inf Nefarius\ViGEmBus\Gen1"
Execute="deferred"
Impersonate="no" />
<!-- build installation command -->
<CustomAction Id="DevconInstallPropertyAssign"
Property="DevconInstallQuiet"
Value="&quot;[INSTALLFOLDER]devcon.exe&quot; install &quot;[INSTALLFOLDER]ViGEmBus.inf&quot; Nefarius\ViGEmBus\Gen1"
Execute="immediate" />
<CustomAction Id="DevconRemove"
Directory="INSTALLFOLDER"
ExeCommand="[INSTALLFOLDER]devcon.exe remove &quot;Nefarius\ViGEmBus\Gen1&quot;"
Execute="deferred"
Impersonate="no" />
<!-- execute installation with suppressed UI -->
<CustomAction Id="DevconInstallQuiet" BinaryKey="WixCA" DllEntry="$(var.WixQuietExec)"
Execute="deferred" Return="check" Impersonate="no" />
<!-- build removal command -->
<CustomAction Id="DevconRemovePropertyAssign"
Property="DevconRemoveQuiet"
Value="&quot;[INSTALLFOLDER]devcon.exe&quot; remove &quot;Nefarius\ViGEmBus\Gen1&quot;"
Execute="immediate" />
<!-- execute removal with suppressed UI -->
<CustomAction Id="DevconRemoveQuiet" BinaryKey="WixCA" DllEntry="$(var.WixQuietExec)"
Execute="deferred" Return="ignore" Impersonate="no" />
<!-- custom installation and removal actions -->
<InstallExecuteSequence>
<Custom Action="DevconInstall" Before="InstallFinalize" />
</InstallExecuteSequence>
<InstallExecuteSequence>
<Custom Action='DevconRemove' After='InstallInitialize'>REMOVE="ALL"</Custom>
<Custom Action="DevconInstallPropertyAssign" Before="DevconInstallQuiet">NOT Installed AND NOT REMOVE</Custom>
<Custom Action="DevconRemovePropertyAssign" Before="DevconRemoveQuiet">REMOVE="ALL"</Custom>
<Custom Action="DevconInstallQuiet" Before="InstallFinalize">NOT Installed AND NOT REMOVE</Custom>
<Custom Action='DevconRemoveQuiet' After='InstallInitialize'>REMOVE="ALL"</Custom>
</InstallExecuteSequence>
</Product>
@@ -72,7 +92,9 @@
<File Name="ViGEmBus.sys" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\ViGEmBus.sys" />
<File Name="ViGEmBus.inf" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\ViGEmBus.inf" />
<File Name="ViGEmBus.cat" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\ViGEmBus.cat" />
<File Name="WdfCoinstaller01009.dll" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\WdfCoinstaller01009.dll" />
<File Name="devcon.exe" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\devcon.exe" />
<File Name="LICENSE" Source="$(var.SolutionDir)\LICENSE" />
</Component>
</ComponentGroup>
</Fragment>

View File

@@ -34,6 +34,12 @@
<ItemGroup>
<Content Include="ViGEm.ico" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">

View File

@@ -78,7 +78,7 @@ AddService = ViGEmBus,%SPSVCINST_ASSOCSERVICE%, ViGEmBus_Service_Inst
[ViGEmBus_Service_Inst]
DisplayName = %ViGEmBus.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
StartType = 1 ; SERVICE_SYSTEM_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\ViGEmBus.sys

View File

@@ -32,46 +32,50 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<TargetVersion>Windows7</TargetVersion>
<TargetVersion>
</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
<KMDF_VERSION_MINOR>9</KMDF_VERSION_MINOR>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<TargetVersion>Windows7</TargetVersion>
<TargetVersion>
</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
<KMDF_VERSION_MINOR>9</KMDF_VERSION_MINOR>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
<SignMode>Off</SignMode>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<TargetVersion>Windows7</TargetVersion>
<TargetVersion>
</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
<KMDF_VERSION_MINOR>9</KMDF_VERSION_MINOR>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<TargetVersion>Windows7</TargetVersion>
<TargetVersion>
</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>Driver</ConfigurationType>
<DriverType>KMDF</DriverType>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
<KMDF_VERSION_MINOR>9</KMDF_VERSION_MINOR>
<ALLOW_DATE_TIME>1</ALLOW_DATE_TIME>

View File

@@ -33,9 +33,6 @@
<ClInclude Include="trace.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\client\include\ViGEm\km\BusShared.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -57,6 +54,9 @@
<ClInclude Include="Driver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\sdk\include\ViGEm\km\BusShared.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="XusbPdo.cpp">