From 39608e51ea76c5bade5fbdbebb91ed70f3cae6d8 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 7 Aug 2024 16:17:49 +0200 Subject: [PATCH] Add scripts for installing drivers --- .../Windows/Drivers/AMDChipsetX399/Manage.ps1 | 11 +++++ .../Windows/Drivers/Predator Z301C/Manage.ps1 | 21 +++++++++ .../AMDChipsetX399/Manage.ps1 | 11 +++++ .../IntelBluetooth/Manage.ps1 | 11 +++++ .../IntelWiFi/Manage.ps1 | 11 +++++ .../MarvellEthernet/Manage.ps1 | 11 +++++ scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 | 11 +++++ scripts/Windows/OS/Install.ps1 | 45 +++++++++++++++++++ 8 files changed, 132 insertions(+) create mode 100644 scripts/Windows/Drivers/AMDChipsetX399/Manage.ps1 create mode 100644 scripts/Windows/Drivers/Predator Z301C/Manage.ps1 create mode 100644 scripts/Windows/Drivers/ROG Zenith Extreme Alpha/AMDChipsetX399/Manage.ps1 create mode 100644 scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelBluetooth/Manage.ps1 create mode 100644 scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelWiFi/Manage.ps1 create mode 100644 scripts/Windows/Drivers/ROG Zenith Extreme Alpha/MarvellEthernet/Manage.ps1 create mode 100644 scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 diff --git a/scripts/Windows/Drivers/AMDChipsetX399/Manage.ps1 b/scripts/Windows/Drivers/AMDChipsetX399/Manage.ps1 new file mode 100644 index 00000000..ee2ff390 --- /dev/null +++ b/scripts/Windows/Drivers/AMDChipsetX399/Manage.ps1 @@ -0,0 +1,11 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-AmdPackage "https://www.amd.com/en/support/downloads/drivers.html/chipsets/tr4/x399.html"; + }; diff --git a/scripts/Windows/Drivers/Predator Z301C/Manage.ps1 b/scripts/Windows/Drivers/Predator Z301C/Manage.ps1 new file mode 100644 index 00000000..a54c40f3 --- /dev/null +++ b/scripts/Windows/Drivers/Predator Z301C/Manage.ps1 @@ -0,0 +1,21 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../Scripts/Software.ps1"; +. "$PSScriptRoot/../../Scripts/System.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + $dir = New-TemporaryDirectory; + $file = "driver.zip"; + + $null = Push-Location $dir; + Invoke-WebRequest "https://global-download.acer.com/GDFiles/Driver/Monitor/Monitor_Acer_1.0_W7x86W7x64W8x86W8x64_A.zip?acerid=636092441703392074" -OutFile $file; + Expand-Archive $file; + $null = Start-Process -Wait -FilePath "pnputil" -ArgumentList "/add-driver","*.inf","/install","/subdirs"; + $null = Pop-Location; + + Remove-Item -Recurse $dir; + }; diff --git a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/AMDChipsetX399/Manage.ps1 b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/AMDChipsetX399/Manage.ps1 new file mode 100644 index 00000000..8353838c --- /dev/null +++ b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/AMDChipsetX399/Manage.ps1 @@ -0,0 +1,11 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-AsusPackage "https://dlcdnets.asus.com/pub/ASUS/mb/03CHIPSET/DRV_Chipset_AMD_TRX40_TP_TSD_W10_64_V30901140_20211006R.zip?model=ROG%20ZENITH%20EXTREME%20ALPHA"; + }; diff --git a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelBluetooth/Manage.ps1 b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelBluetooth/Manage.ps1 new file mode 100644 index 00000000..380ad040 --- /dev/null +++ b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelBluetooth/Manage.ps1 @@ -0,0 +1,11 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-AsusPackage "https://dlcdnets.asus.com/pub/ASUS/mb/02BT/DRV_Bluetooth_Intel_9260_TP_W11_64_V2210002_20211222R.zip?model=ROG%20ZENITH%20EXTREME%20ALPHA"; + }; diff --git a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelWiFi/Manage.ps1 b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelWiFi/Manage.ps1 new file mode 100644 index 00000000..3f6876bc --- /dev/null +++ b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/IntelWiFi/Manage.ps1 @@ -0,0 +1,11 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-AsusPackage "https://dlcdnets.asus.com/pub/ASUS/mb/08WIRELESS/DRV_WiFi_Intel_TP_W11_64_V2219004_20230130R.zip?model=ROG%20ZENITH%20EXTREME%20ALPHA"; + }; diff --git a/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/MarvellEthernet/Manage.ps1 b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/MarvellEthernet/Manage.ps1 new file mode 100644 index 00000000..2d88ea29 --- /dev/null +++ b/scripts/Windows/Drivers/ROG Zenith Extreme Alpha/MarvellEthernet/Manage.ps1 @@ -0,0 +1,11 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../../Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-AsusPackage "https://dlcdnets.asus.com/pub/ASUS/mb/04LAN/DRV_LAN_Marvell_TP_TSD_W11_64_V3130_20211118R.zip?model=ROG%20ZENITH%20EXTREME%20ALPHA"; + }; diff --git a/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 b/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 new file mode 100644 index 00000000..78df2de7 --- /dev/null +++ b/scripts/Windows/Drivers/Tobii EyeX/Manage.ps1 @@ -0,0 +1,11 @@ +param( + $Action, + [hashtable] $Arguments +) + +. "$PSScriptRoot/../../Scripts/Software.ps1"; + +Start-SoftwareInstaller @PSBoundParameters ` + -Installer { + Install-SetupPackage -Source "https://files.update.tech.tobii.com/Tobii_Eye_Tracking_Core_v2.16.8.214_x86.exe"; + }; diff --git a/scripts/Windows/OS/Install.ps1 b/scripts/Windows/OS/Install.ps1 index c0ecf1a4..6ed25f71 100644 --- a/scripts/Windows/OS/Install.ps1 +++ b/scripts/Windows/OS/Install.ps1 @@ -122,6 +122,51 @@ $null = New-Module { $arguments.Add("action", $Action); } + # Drivers + $null = New-Module { + $driverPath = "$PSScriptRoot/../Drivers"; + $mbPath = "$driverPath/ROG Zenith Extreme Alpha"; + + foreach ($component in (Get-Config "valhalla.hardware.components")) { + + switch ($component) { + ("ROG Zenith Extreme Alpha") { + . "$mbPath/MarvellEthernet/Manage.ps1" @arguments; + . "$mbPath/IntelWiFi/Manage.ps1" @arguments; + . "$mbPath/IntelBluetooth/Manage.ps1" @arguments; + . "$mbPath/AMDChipsetX399/Manage.ps1" @arguments; + . "$driverPath/AMDChipsetX399/Manage.ps1" @arguments; + } + ("Predator Z301C") { + . "$driverPath/Predator Z301C/Manage.ps1" @arguments; + } + } + } + + if (Get-Config "valhalla.hardware.amdCPU") { + Install-ChocoPackage amd-ryzen-master; + # ToDo: backup Ryzen energy saving plan + } + + if (Get-Config "valhalla.hardware.nvidiaGPU") { + Install-ChocoPackage geforce-game-ready-driver; + Remove-DesktopIcon "*Geforce*"; + } + + if (Get-Config "valhalla.hardware.corsairLighting") { + Install-ChocoPackage icue; + } + + if (Get-Config "valhalla.hardware.elgatoWave") { + Install-ChocoPackage wavelink; + Remove-DesktopIcon "*Wave Link*"; + } + + if (Get-Config "valhalla.hardware.eyeX") { + . "$driverPath/Tobii EyeX/Manage.ps1" @arguments; + } + }; + # Windows Config . "$PSScriptRoot/../Software/Windows/Manage.ps1" @arguments;