Skip to content

Commit

Permalink
Update libraries and (un)installer scripts (#71)
Browse files Browse the repository at this point in the history
* improve install/uninstall

- Fix [UninstallRun] path to HidHideCLI
- Disable keep Hidhide checkbox
- Update all libs (HidHide, RTSS, HWiNFO)

* update windowsdesktop-runtime lib

* remove unused Dependency_AddDotNet80 from iss

* Jump to 0.19.0.6 (beta6)

* small fixes
  • Loading branch information
Valkirie authored Nov 22, 2023
1 parent 1187ca5 commit ba1e2c1
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 35 deletions.
37 changes: 12 additions & 25 deletions HandheldCompanion.iss
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,6 @@ begin
Result := ShellExec('', ExpandConstant('{tmp}{\}') + 'netcorecheck' + Dependency_ArchSuffix + '.exe', Version, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and (ResultCode = 0);
end;
procedure Dependency_AddDotNet80;
begin
// https://dotnet.microsoft.com/en-us/download/dotnet/8.0
if not Dependency_IsNetCoreInstalled('Microsoft.NETCore.App 8.0.0') then begin
Dependency_Add('dotNet80' + Dependency_ArchSuffix + '.exe',
'/lcid ' + IntToStr(GetUILanguage) + ' /passive /norestart',
'.NET Runtime 8.0.0' + Dependency_ArchTitle,
Dependency_String('https://download.visualstudio.microsoft.com/download/pr/7f4d5cbc-4449-4ea5-9578-c467821f251f/b9b19f89d0642bf78f4b612c6a741637/dotnet-runtime-8.0.0-win-x64.exe',
'https://download.visualstudio.microsoft.com/download/pr/593685c9-7e98-455a-8e34-4b8ad1be9489/6ccf85c6fc244428d61f74ca3aee0645/dotnet-runtime-8.0.0-win-x86.exe'),
'', False, False);
end;
end;
procedure Dependency_AddDotNet80Desktop;
begin
// https://dotnet.microsoft.com/en-us/download/dotnet/8.0
Expand Down Expand Up @@ -325,37 +312,37 @@ end;
procedure Dependency_AddHideHide;
begin
Dependency_Add('HidHide_1.4.186_x64.exe',
'/quiet /norestart',
Dependency_Add('HidHide_1.4.192_x64.exe',
'',
'HidHide Drivers',
'https://github.com/nefarius/HidHide/releases/download/v1.4.186.0/HidHide_1.4.186_x64.exe',
'https://github.com/nefarius/HidHide/releases/download/v1.4.192.0/HidHide_1.4.192_x64.exe',
'', True, False);
end;
procedure Dependency_AddViGem;
begin
Dependency_Add('ViGEmBus_1.22.0_x64_x86_arm64.exe',
'/quiet /norestart',
'',
'ViGEmBus Setup',
'https://github.com/nefarius/ViGEmBus/releases/download/v1.22.0/ViGEmBus_1.22.0_x64_x86_arm64.exe',
'', True, False);
end;
procedure Dependency_AddRTSS;
begin
Dependency_Add('RTSSSetup734.exe',
Dependency_Add('RTSSSetup735Beta5.exe',
'/S',
'RTSS Setup v7.3.4',
'https://github.com/Valkirie/HandheldCompanion/raw/main/redist/RTSSSetup734.exe',
'RTSS Setup v7.3.5 Beta5',
'https://github.com/Valkirie/HandheldCompanion/raw/main/redist/RTSSSetup735Beta5.exe',
'', True, False);
end;
procedure Dependency_AddHWiNFO;
begin
Dependency_Add('hwi_746.exe',
Dependency_Add('hwi_766.exe',
'/silent',
'HWiNFO v7.4.6',
'https://github.com/Valkirie/HandheldCompanion/raw/main/redist/hwi_746.exe',
'HWiNFO v7.6.6',
'https://github.com/Valkirie/HandheldCompanion/raw/main/redist/hwi_766.exe',
'', True, False);
end;
Expand Down Expand Up @@ -387,7 +374,7 @@ end;

#define MyAppSetupName 'Handheld Companion'
#define MyBuildId 'HandheldCompanion'
#define MyAppVersion '0.19.0.3'
#define MyAppVersion '0.19.0.6'
#define MyAppPublisher 'BenjaminLSR'
#define MyAppCopyright 'Copyright @ BenjaminLSR'
#define MyAppURL 'https://github.com/Valkirie/HandheldCompanion'
Expand Down Expand Up @@ -453,7 +440,7 @@ Name: "{commondesktop}\{#MyAppSetupName}"; Filename: "{app}\{#MyAppExeName}"; Ta
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"

[UninstallRun]
Filename: "C:\Program Files\Nefarius Software Solutions e.U\HidHideCLI\HidHideCLI.exe"; Parameters: "--cloak-off" ; RunOnceId: "CloakOff"; Flags: runascurrentuser runhidden
Filename: "C:\Program Files\Nefarius Software Solutions\HidHide\x64\HidHideCLI.exe"; Parameters: "--cloak-off" ; RunOnceId: "CloakOff"; Flags: runascurrentuser runhidden

[UninstallDelete]
Type: filesandordirs; Name: "{app}"
Expand Down
5 changes: 0 additions & 5 deletions HandheldCompanion/Controllers/LegionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ public override void UpdateInputs(long ticks, bool commit)

base.UpdateInputs(ticks, false);

// Potential Focus Switched instruction coming through from Legion Controllers
// We double check the validity of the received Data
if (Data[40] == 0)
return;

FrontEnum frontButton = (FrontEnum)Data[FRONT_IDX];
Inputs.ButtonState[ButtonFlags.OEM1] = frontButton.HasFlag(FrontEnum.LegionR);
Inputs.ButtonState[ButtonFlags.OEM2] = frontButton.HasFlag(FrontEnum.LegionL);
Expand Down
2 changes: 1 addition & 1 deletion HandheldCompanion/HandheldCompanion.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<StartupObject>HandheldCompanion.App</StartupObject>
<OutputPath>$(SolutionDir)bin\$(Configuration)</OutputPath>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
<Version>0.19.0.3</Version>
<Version>0.19.0.6</Version>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>AnyCPU;x64;x86</Platforms>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
11 changes: 8 additions & 3 deletions HandheldCompanion/Managers/ControllerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,14 @@ private static void Watchdog_Elapsed(object? sender, ElapsedEventArgs e)
lock (updateLock)
{
// monitoring unexpected slot changes
foreach (XInputController xInputController in Controllers.Values.Where(c => c.Details.isXInput))
foreach (XInputController xInputController in Controllers.Values.Where(c => c.Details is not null && c.Details.isXInput))
{
byte UserIndex = DeviceManager.GetXInputIndexAsync(xInputController.Details.baseContainerDevicePath);

// controller is not ready yet
if (UserIndex == byte.MaxValue)
continue;

xInputController.AttachController(UserIndex);
}

Expand Down Expand Up @@ -596,14 +601,14 @@ private static void Watchdog_Elapsed(object? sender, ElapsedEventArgs e)
foreach (IXbox360Controller placeholder in placeholders)
{
placeholder.Connect();
Task.Delay(500);
Thread.Sleep(500);
}

// disconnect all virtual controllers
foreach (IXbox360Controller placeholder in placeholders)
{
placeholder.Disconnect();
Task.Delay(500);
Thread.Sleep(500);
}

// clear array
Expand Down
3 changes: 2 additions & 1 deletion UpdateUninstallWizard.iss
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ begin
keepHidhideCheckbox.Left := UninstallProgressForm.StatusLabel.Left;
keepHidhideCheckbox.Top := keepVigemCheckbox.Top + PageText.height + 6;
keepHidhideCheckbox.Caption := 'Keep HidHide';
keepHidhideCheckbox.checked:= false;
keepHidhideCheckbox.checked := false;
keepHidhideCheckbox.Enabled := false;

UninstallNextButton := TNewButton.Create(UninstallProgressForm);
UninstallNextButton.Parent := UninstallProgressForm;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file renamed redist/hwi_746.exe → redist/hwi_766.exe
Binary file not shown.
Binary file not shown.

0 comments on commit ba1e2c1

Please sign in to comment.