From d5c083a5571ccb297214accc179ca0db568c95fb Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Mon, 17 Jul 2023 01:41:23 +0200 Subject: [PATCH] Automate installation of Tobii Ghost --- scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk | 17 +++++++++++++++++ scripts/Windows/Drivers/Tobii EyeX/Install.ps1 | 15 ++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk diff --git a/scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk b/scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk new file mode 100644 index 00000000..21403f05 --- /dev/null +++ b/scripts/Windows/Drivers/Tobii EyeX/Ghost.ahk @@ -0,0 +1,17 @@ +InstallGhost() +{ + SetTitleMatchMode, RegEx + windowTitle := "^Tobii Ghost$" + + Run, "setup.exe",,,pid + WinWait % windowTitle,, 60 + WinActivate % windowTitle + MouseClick, Left, 44, 694 + MouseClick, Left, 330, 752 + WinWaitNotActive + WinWait % windowTitle,, 20 + MouseClick, Left, 563, 397 + MouseClick, Left, 548, 493 +} + +InstallGhost() diff --git a/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 b/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 index 4f6f3a27..87f82fa7 100644 --- a/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 +++ b/scripts/Windows/Drivers/Tobii EyeX/Install.ps1 @@ -3,13 +3,26 @@ param($context) . "$PSScriptRoot/../../Scripts/SoftwarePackage.ps1"; choco install -y "dotnet-6.0-desktopruntime" vcredist140; +$tempDir = $context.GetTempDirectory(); +$installer = "setup.exe"; +[string]$processName = $null; + +Push-Location $tempDir; Write-Host "Installing Tobii Eye Tracking"; Write-Host "Installing Tobii EyeX"; Install-SoftwarePackage $context "https://files.update.tech.tobii.com/Tobii_Eye_Tracking_Core_v2.16.8.214_x86.exe"; Write-Host "Installing Tobii Ghost"; -Install-SoftwarePackage $context "https://files.update.oem.tobii.com/Ghost/TobiiGhost.1.14.1-Setup.exe"; +$processName = "TobiiGhost.exe"; +Write-Information "Downloading Tobii Ghost installer"; +Invoke-WebRequest "https://files.update.oem.tobii.com/Ghost/TobiiGhost.1.14.1-Setup.exe" -OutFile $installer; + +Write-Information "Running Tobii Ghost installer"; +Start-Process -Wait -FilePath "$PSScriptRoot/Ghost.au3"; Write-Host "Installing Tobii Game Hub"; Install-SoftwarePackage $context "https://files.update.oem.tobii.com/GameHub/TobiiGameHub.3.0.1-Setup.exe"; + +Pop-Location; +Remove-Item -Recurse $tempDir;