Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Jax-Core/JaxCore
Browse files Browse the repository at this point in the history
  • Loading branch information
EnhancedJax committed Aug 23, 2022
2 parents 3f46d83 + b3d3a08 commit d0189f4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion CoreInstaller.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,27 @@ if (!($o_Location)) {
$s_RMSkinFolder = "$o_Location\JaxCore\InstalledComponents\"
$RMEXEloc = "$s_RMSettingsFolder\Rainmeter.exe"
# ------- Check if Rainmeter is already installed at provided location ------- #
If (!(Test-Path "$o_Location\Rainmeter\Rainmeter.exe")) {
If (Test-Path "$o_Location\Rainmeter\Rainmeter.exe") {
Write-Task "Rainmeter is already installed under "; Write-Emphasized "$o_Location\Rainmeter"
$wasRMInstalled = $true
If (Test-Path $s_RMINIFile) {
$Ini = Get-IniContent $s_RMINIFile
$s_RMSkinFolder = $Ini["Rainmeter"]["SkinPath"]
$hwa = $Ini["Rainmeter"]["HardwareAcceleration"]
if (($hwa -eq 0) -and ($o_PromptBestOption -eq $true)) {
Write-Info "JaxCore recommends that the HardwareAcceleration option for Rainmeter to be turned on. "
$confirmation = Read-Host "Turn on? (y/n)"
if ($confirmation -match '^y$') {
$Ini["Rainmeter"]["HardwareAcceleration"] = "1"
Set-IniContent $Ini $s_RMINIFile
}
}
}
} else {
Write-Task "Are you sure you want to install JaxCore at "; Write-Emphasized $o_Location
$confirmation = Read-Host "? (y/n)"
if ($confirmation -match '^y$') {
$wasRMInstalled = $false
Download-Rainmeter "/S /RESTART=0 /PORTABLE=1 /D=$s_RMSettingsFolder"
} else {
Write-Fail "Action cancelled. Installation terminated."
Expand Down

0 comments on commit d0189f4

Please sign in to comment.