Skip to content

Commit

Permalink
Created WixSharp-based driver installer (#367)
Browse files Browse the repository at this point in the history
* Added setup

* Added prerequisites check

* Added XInput Proxy DLL

* Extended skip files

* Added driver install custom actions

* Partially added BthPS3 prerequisite installation

* Got conditional BthPS3 installation working

* Added new setup skeleton

* Update .gitignore

* Enabled Git LFS

* Update dshidmini.sln

* Updated setup deps

* Experiments

* Updated EULA

* Added more installer logic

* Update InstallScript.cs

* Update InstallScript.cs

* Update InstallScript.cs

* Updated setup dependencies

* Create stage1.ps1

* Added deliverables

Set correct setup platform

* Update InstallScript.cs

* Driver installation works

* Added registry values

* Update InstallScript.cs

* Made setup version injection dynamic

* Update DsHidMini.Installer.csproj

* Create stage2.ps1

* Added setup build step

* Update InstallScript.cs

* Update dshidmini.sln

* Update InstallScript.cs

* Added README

* Update README.md

* Added driver versions to registry

* Update README.md

* Added beta participation link

Added updater binary

* Fixed command execution

* Added updater logic

* Update README.md

* Disabled setup build on CI

* Update README.md

* Fixed updater deregistration on removal
  • Loading branch information
nefarius authored Jun 24, 2024
1 parent 989ff5e commit 7ac9f46
Show file tree
Hide file tree
Showing 18 changed files with 461 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
Expand All @@ -11,7 +10,6 @@
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
Expand All @@ -34,7 +32,6 @@
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
Expand All @@ -43,7 +40,6 @@
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
Expand All @@ -61,3 +57,9 @@
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
*.cab filter=lfs diff=lfs merge=lfs -text
*.msi filter=lfs diff=lfs merge=lfs -text
*.dll filter=lfs diff=lfs merge=lfs -text
*.exe filter=lfs diff=lfs merge=lfs -text
*.sys filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,12 @@ healthchecksdb
/_DSHMC
/DSHMC.json
/DSHMC.schema.json
/XInputBridge/vcpkg_installed/x64-windows-static
/setup/DsHidMini Driver-SetupFiles
/setup/DsHidMini Driver-cache
/ControlApp
vcpkg_installed
**/vcpkg_installed
**/*.g.wxs
/XInputBridge/exports
**/*_OTEL
*.msi
**/*.g.cs
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ configuration:
skip_commits:
files:
- '**/*.md'
- '**/*.aip'
- '.vscode/*'
- '**/*.json'
install:
- cmd: vcpkg integrate install
- cmd: vcpkg update
Expand Down
Binary file modified docs/Firmware+Force+Feedback+Working.zip
Binary file not shown.
31 changes: 31 additions & 0 deletions dshidmini.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
LICENSE = LICENSE
README.md = README.md
stage0.ps1 = stage0.ps1
stage1.ps1 = stage1.ps1
stage2.ps1 = stage2.ps1
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scpdlltester", "scpdlltester\scpdlltester.vcxproj", "{FEB89FC0-BF9B-43F3-8467-B3496D61B76E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setup", "Setup", "{58E023F1-01BB-4D75-90A5-2E6049F94048}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DsHidMini.Installer", "setup\DsHidMini.Installer.csproj", "{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_OTEL|Any CPU = Debug_OTEL|Any CPU
Expand Down Expand Up @@ -191,6 +197,30 @@ Global
{FEB89FC0-BF9B-43F3-8467-B3496D61B76E}.Release|x64.Build.0 = Release|x64
{FEB89FC0-BF9B-43F3-8467-B3496D61B76E}.Release|x86.ActiveCfg = Release|Win32
{FEB89FC0-BF9B-43F3-8467-B3496D61B76E}.Release|x86.Build.0 = Release|Win32
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug_OTEL|Any CPU.ActiveCfg = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug_OTEL|Any CPU.Build.0 = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug_OTEL|ARM64.ActiveCfg = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug_OTEL|ARM64.Build.0 = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug_OTEL|x64.ActiveCfg = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug_OTEL|x64.Build.0 = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug_OTEL|x86.ActiveCfg = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug_OTEL|x86.Build.0 = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug|ARM64.Build.0 = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug|x64.ActiveCfg = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug|x64.Build.0 = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug|x86.ActiveCfg = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Debug|x86.Build.0 = Debug|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Release_OTEL|Any CPU.ActiveCfg = Release|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Release_OTEL|ARM64.ActiveCfg = Release|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Release_OTEL|x64.ActiveCfg = Release|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Release_OTEL|x86.ActiveCfg = Release|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Release|ARM64.ActiveCfg = Release|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Release|x64.ActiveCfg = Release|Any CPU
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -200,6 +230,7 @@ Global
{8C041739-B65C-4BE3-B068-B13ED698C72E} = {CE492389-7FB3-4DC4-9AFF-B7A04F70F891}
{DC58FE95-938F-4BFB-B434-C043C62E9EF5} = {D5FFDFFE-55A3-4AF3-92A6-13F28598A5EE}
{FEB89FC0-BF9B-43F3-8467-B3496D61B76E} = {D5FFDFFE-55A3-4AF3-92A6-13F28598A5EE}
{7D07C49F-A5A8-44AD-83B5-1E5B1F3080AA} = {58E023F1-01BB-4D75-90A5-2E6049F94048}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5A4A580B-8A5D-4E6A-A75D-ADFDD46F6F37}
Expand Down
4 changes: 4 additions & 0 deletions dshidmini.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=bugprone/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=DEADZONE/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Deduplicator/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Deregister/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=DEVICERESET/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=DEVPKEY/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=DEVPROP/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -19,7 +20,9 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=giphidgamepaddescriptor/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Guids/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=HIDAPI/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=igfilter/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=HRESULT/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=INSTALLDIR/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=jittering/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=libfmt/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=MSHIDUMDF/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -33,6 +36,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=PFFB/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=PXINPUT/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=retval/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=rtifacts/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=rumb/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SCPLIB/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=sdklogs/@EntryIndexedValue">True</s:Boolean>
Expand Down
6 changes: 6 additions & 0 deletions setup/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
</configuration>
43 changes: 43 additions & 0 deletions setup/DsHidMini.Installer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net48</TargetFramework>
<RootNamespace>Nefarius.DsHidMini.Setup</RootNamespace>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<PropertyGroup>
<SetupVersion Condition="'$(SetupVersion)' == ''">3.0.0</SetupVersion>
</PropertyGroup>

<Target Name="GenerateBuildVariableFile" BeforeTargets="BeforeBuild">
<WriteLinesToFile File="GeneratedBuildVariables.g.cs" Lines="namespace Nefarius.DsHidMini.Setup { public static class BuildVariables { public const string SetupVersion = &quot;$(SetupVersion)&quot;%3B } }" Overwrite="true" />
</Target>

<ItemGroup>
<None Remove="*.msi" />
<None Remove="*.exe" />
<None Remove="*.wxs" />
<None Remove="*.wixpdb" />
<None Remove="*.wixobj" />
<None Remove="App.config" />
<None Remove="*.g.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="CliWrap" Version="3.6.6" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.3" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="Nefarius.Utilities.DeviceManagement" Version="3.18.1" />
<PackageReference Include="WixSharp" Version="1.25.3" />
<PackageReference Include="WixSharp.bin" Version="1.25.3" />
<PackageReference Include="WixSharp.wix.bin" Version="3.14.1" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Windows.Forms" />
</ItemGroup>

</Project>
Binary file added setup/DsHidMini.dialog_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added setup/DsHidMini.dialog_bmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added setup/EULA.rtf
Binary file not shown.
Loading

0 comments on commit 7ac9f46

Please sign in to comment.