-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJaxCore.ps1
34 lines (31 loc) · 1.55 KB
/
JaxCore.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function Set-IdleStyle {
Write-Warning "For IdleStyle Module working properly, you would need 'ffplay'."
$confirm = $(Write-Host "INSTALL 'ffplay.exe' (y/n)? " -ForegroundColor "Green" -NoNewline; Read-Host)
if ($confirm -eq 'y') {
$url = "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip"
$downloadFolder = (New-Object -ComObject Shell.Application).NameSpace('shell:Downloads').Self.Path
$downloadFile = "$downloadFolder\ffmpeg-master-latest-win64-gpl.zip"
Invoke-WebRequest -Uri "$url" -OutFile "$downloadFile"
Expand-Archive -LiteralPath $downloadFile -DestinationPath "$downloadFolder\ffmpeg"
Move-Item "$downloadFolder\ffmpeg\ffmpeg-master-latest-win64-gpl\bin\ffplay.exe" "$env:USERPROFILE\Documents\Rainmeter\CoreData\IdleStyle\ffplay.exe"
Write-Host "Please Reload Rainmeter to take effect!"
Start-Sleep -Seconds 1
}
}
. "$PSScriptRoot\skins\install-jaxcore.ps1"
$idlestylePath = "$Env:USERPROFILE\Documents\Rainmeter\CoreData\IdleStyle"
if (Test-Path -Path $idlestylePath) {
if (!(Test-Path "$idlestylePath\ffplay.exe")) {
Set-IdleStyle
}
else {
Start-Sleep -Seconds 3
Write-Warning "ffplay.exe already installed! Exiting..."
}
Start-Sleep -Seconds 1
}
''
Write-Host "--------------------------------------------------------------------" -ForegroundColor "DarkGray"
Write-Host "For more information, please visit: " -NoNewline
Write-Host "https://wiki.jaxcore.app/modules" -ForegroundColor "Blue"
Break