diff --git a/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 b/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 index 1c909f11..8755f3a9 100644 --- a/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 +++ b/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 @@ -3,9 +3,28 @@ param( [hashtable] $Arguments ) -. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; +& { + param($parameters); -Start-SoftwareInstaller @PSBoundParameters ` - -Installer { - Install-SetupPackage -Source "https://files.update.tech.tobii.com/Tobii_Eye_Tracking_Core_v2.16.8.214_x86.exe"; - }; + . "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; + $softwarePath = "$PSScriptRoot/../../Software"; + + $appScripts = @( + "$softwarePath/TobiiGhost/Manage.ps1", + "$softwarePath/TobiiGameHub/Manage.ps1" + ); + + Start-SoftwareInstaller @parameters ` + -Installer { + Install-SetupPackage -Source "https://files.update.tech.tobii.com/Tobii_Eye_Tracking_Core_v2.16.8.214_x86.exe"; + + foreach ($script in $appScripts) { + . $script -Action ([InstallerAction]::Install) @parameters; + } + } ` + -UserConfigurator { + foreach ($script in $appScripts) { + . $script -Action ([InstallerAction]::ConfigureUser) @parameters; + } + }; +} $PSBoundParameters; diff --git a/scripts/Windows/Software/TobiiGameHub/Manage.ps1 b/scripts/Windows/Software/TobiiGameHub/Manage.ps1 new file mode 100644 index 00000000..1be0388e --- /dev/null +++ b/scripts/Windows/Software/TobiiGameHub/Manage.ps1 @@ -0,0 +1,26 @@ +using namespace Microsoft.Win32; + +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/System.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-ChocoPackage "vcredist2013"; + } ` + -UserConfigurator { + $file = "setup.exe"; + $dir = New-TemporaryDirectory; + + Push-Location $dir; + Invoke-WebRequest "https://files.update.oem.tobii.com/GameHub/TobiiGameHub.3.0.1-Setup.exe" -OutFile $file; + Write-Host "Running Tobii Game Hub installer"; + Start-Process -Wait -FilePath "$PSScriptRoot/GameHub.ahk"; + Pop-Location; + + Remove-Item -Recurse $dir; + }; diff --git a/scripts/Windows/Software/TobiiGhost/Manage.ps1 b/scripts/Windows/Software/TobiiGhost/Manage.ps1 new file mode 100644 index 00000000..9d0960a7 --- /dev/null +++ b/scripts/Windows/Software/TobiiGhost/Manage.ps1 @@ -0,0 +1,24 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Common/Scripts/Software.ps1"; +. "$PSScriptRoot/../../../Common/Scripts/System.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-ChocoPackage "dotnet-6.0-desktopruntime"; + } ` + -UserConfigurator { + $file = "setup.exe"; + $dir = New-TemporaryDirectory; + + Push-Location $dir; + Invoke-WebRequest "https://files.update.oem.tobii.com/Ghost/TobiiGhost.1.14.1-Setup.exe" -OutFile $file; + Write-Host "Running Tobii Ghost installer"; + Start-Process -Wait -FilePath "$PSScriptRoot/Ghost.ahk"; + Pop-Location; + + Remove-Item -Recurse $dir; + };