forked from Daksh777/SpotifyNoPremium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.ps1
87 lines (72 loc) · 2.54 KB
/
install.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
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
84
85
86
87
Write-Host @'
Author: @Daksh777
Website: https://daksh.eu.org
'@`n
function RefreshPath {
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") +
";" +
[System.Environment]::GetEnvironmentVariable("Path","User")
}
Add-Type -AssemblyName PresentationFramework
$git = [System.Windows.MessageBox]::Show('Is Git installed in your system?', 'Git Installation', 'YesNoCancel');
if ($git -eq 'Yes') {
Write-Host "`nSkipping Git installation"
}
if ($git -eq 'No') {
Write-Host "`nDownloading Git installer"
Start-Process "https://git-scm.com/download/win"
Write-Host "Please install Git using the downloaded installer and come back here once done.`n"
Read-Host "If Git was installed, press enter to continue"
RefreshPath
}
if ($git -eq 'Cancel') {
Write-Host "`nOperation Cancelled"
exit
}
Add-Type -AssemblyName PresentationFramework
$spice = [System.Windows.MessageBox]::Show('Is Spicetify CLI installed in your system?', 'Spicetify CLI Installtion', 'YesNoCancel');
if ($spice -eq 'Yes') {
Write-Host "`nSkipping Spicetify installation`n"
Write-Host "Installing theme`n"
spicetify upgrade
cd "$(spicetify -c | Split-Path)\Themes"
git clone https://github.com/Daksh777/SpotifyNoPremium
spicetify config current_theme SpotifyNoPremium
spicetify restore
spicetify clear
spicetify backup apply
Write-Host "`nInstalled successfully"
}
if ($spice -eq 'No') {
Write-Host "`nInstalling Spicetify CLI`n"
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/khanhas/spicetify-cli/master/install.ps1" | Invoke-Expression
Write-Host "`n Installed Spicetify CLI`n"
RefreshPath
Write-Host "Installing the theme`n"
cd "$(spicetify -c | Split-Path)\Themes"
git clone https://github.com/Daksh777/SpotifyNoPremium
spicetify config current_theme SpotifyNoPremium
spicetify restore
spicetify clear
spicetify backup apply
Write-Host "`n Installed theme successfully"
}
if ($spice -eq 'Cancel') {
Write-Host "`nOperation Cancelled"
exit
}
Add-Type -AssemblyName PresentationFramework
$bts = [System.Windows.MessageBox]::Show('Do you want to install BlockTheSpot to block ads? (Recommended)', 'BlockTheSpot Installation', 'YesNoCancel');
if ($bts -eq 'Yes') {
Invoke-WebRequest -Uri "https://github.com/Daksh777/BlockTheSpot/raw/master/SpotifyNoPremium.bat" -OutFile "SpotifyNoPremium.bat"
cmd.exe /c ".\SpotifyNoPremium.bat"
Remove-Item "SpotifyNoPremium.bat"
}
if ($bts -eq 'No') {
Write-Host "`nNot installing BlockTheSpot"
exit
}
if ($spice -eq 'Cancel') {
Write-Host "`nOperation Cancelled"
exit
}