-
Notifications
You must be signed in to change notification settings - Fork 6
/
Qobuz-Dark-Theme-Installer.bat
83 lines (74 loc) · 1.85 KB
/
Qobuz-Dark-Theme-Installer.bat
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
@echo off
rem Visit https://github.com/Evo-c/qobuz-dark-theme/ for updates
title Qobuz dark theme installer
echo.
set FORCEINS="false"
goto Start
:Start
echo.
echo Trying to find your Qobuz folder...
FOR /F "usebackq delims=" %%p IN (`dir "C:\Users\%username%\AppData\Local\Qobuz" /b /ad ^| find "app-5"`) DO (
set "QBPATH=%%p"
set "QDTVER=app-5.4.4-b016"
)
if "%QBPATH%"=="app-5.4.4-b016" (
echo.
echo Found %QBPATH%!
echo.
echo Version supported!
set "URL=https://raw.githubusercontent.com/Evo-c/qobuz-dark-theme/master/style.css"
goto Update
)
goto NotSupported
:NotSupported
cls
color 0c
echo Version not supported, applying the theme could cause bugs and may break the app!
echo Enter yes to continue...
echo.
set /p forceinstall=""
if "%forceinstall%"=="yes" (
cls
color 07
set "URL=https://raw.githubusercontent.com/Evo-c/qobuz-dark-theme/master/style.css"
goto Update
)
echo Aborted
pause
exit
:Install
if exist "C:\Users\%username%\AppData\Local\Qobuz\%QBPATH%\resources\app\node_modules\qobuz-dwp-ui\dist\style.css.old" (
del "C:\Users\%username%\AppData\Local\Qobuz\%QBPATH%\resources\app\node_modules\qobuz-dwp-ui\dist\style.css.old"
)
rename "C:\Users\%username%\AppData\Local\Qobuz\%QBPATH%\resources\app\node_modules\qobuz-dwp-ui\dist\style.css" style.css.old
copy %~dp0style.css "C:\Users\%username%\AppData\Local\Qobuz\%QBPATH%\resources\app\node_modules\qobuz-dwp-ui\dist\style.css"
echo.
echo.
echo Success!
echo.
ping 127.0.0.1>nul -n 5
goto End
:Update
set "DownloadFolder=%~dp0"
set "File=style.css"
Call :Download "%URL%" "%DownloadFolder%\%File%"
goto Downloaded
echo Error
pause
exit
:Downloaded
if exist "style.css" (
echo Downloaded style.css for version %QDTVER%
goto Install
) else (
echo "Download failed"
pause
exit
)
:End
if exist "%~dp0nullqdti" (
del "%~dp0nullqdti"
)
exit
:Download <Url> <File>
certutil.exe -urlcache -split -f %1 %2 >nullqdti