Skip to content

Commit e98a82a

Browse files
authored
Merge pull request #7 from BaranDev/test
Test
2 parents 0787b9c + 39a4b4b commit e98a82a

File tree

8 files changed

+31
-5
lines changed

8 files changed

+31
-5
lines changed

animation_controller.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from styling import CAT_FRAMES, THUMBS_UP
33
import keyboard
44
from os import environ
5+
import sys
6+
import os
57

68
environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "1"
79
import pygame
@@ -10,9 +12,21 @@
1012
pygame.mixer.init()
1113

1214

15+
def resource_path(relative_path):
16+
"""Get absolute path to resource, works for dev and for PyInstaller"""
17+
try:
18+
# PyInstaller creates a temp folder and stores path in _MEIPASS
19+
base_path = sys._MEIPASS
20+
except Exception:
21+
base_path = os.path.abspath(".")
22+
23+
return os.path.join(base_path, relative_path)
24+
25+
1326
def play_cool_cat_animation():
27+
wav_path = resource_path("resources/littleroottown.wav")
1428
# Load the background music
15-
pygame.mixer.music.load("resources/littleroottown.wav")
29+
pygame.mixer.music.load(wav_path)
1630
# Play the music
1731
pygame.mixer.music.play(-1) # The -1 argument makes the music loop indefinitely
1832

barandev-logo-sq.icns

288 KB
Binary file not shown.

barandev-logo-sq.ico

4.19 KB
Binary file not shown.

barandev.icns

-256 KB
Binary file not shown.

barandev.ico

-264 KB
Binary file not shown.

installation-scripts/install_spicetify.ps1

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ if (-not (Test-Admin)) {
167167
Write-Unsuccess
168168
Write-Warning -Message "The script was ran as Administrator which isn't recommended"
169169
$Host.UI.RawUI.Flushinputbuffer()
170-
$choice = $Host.UI.PromptForChoice('', 'Do you want to abort the installation process to avoid any issues?', ('&Yes', '&No'), 0)
170+
$choices = [System.Management.Automation.Host.ChoiceDescription[]] @(
171+
(New-Object System.Management.Automation.Host.ChoiceDescription '&Yes', 'Abort installation.'),
172+
(New-Object System.Management.Automation.Host.ChoiceDescription '&No', 'Resume installation.')
173+
)
174+
$choice = $Host.UI.PromptForChoice('', 'Do you want to abort the installation process to avoid any issues?', $choices, 0)
171175
if ($choice -eq 0) {
172176
Write-Host -Object 'spicetify installation aborted' -ForegroundColor 'Yellow'
173177
Pause
@@ -189,7 +193,11 @@ Write-Host -Object 'to get started'
189193

190194
#region Marketplace
191195
$Host.UI.RawUI.Flushinputbuffer()
192-
$choice = $Host.UI.PromptForChoice('', "`nDo you want to install Spicetify Marketplace?", ('&Yes', '&No'), 0)
196+
$choices = [System.Management.Automation.Host.ChoiceDescription[]] @(
197+
(New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", "Install Spicetify Marketplace."),
198+
(New-Object System.Management.Automation.Host.ChoiceDescription "&No", "Do not install Spicetify Marketplace.")
199+
)
200+
$choice = $Host.UI.PromptForChoice('', "`nDo you want to install Spicetify Marketplace?", $choices, 0)
193201
if ($choice -eq 1) {
194202
Write-Host -Object 'spicetify Marketplace installation aborted' -ForegroundColor 'Yellow'
195203
}

main

18.2 MB
Binary file not shown.

main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
# Conditional import based on the OS
66
if platform.system() == "Windows":
77
from os_updaters import windows as os_updater
8-
else:
8+
elif platform.system() in ["Linux", "Darwin"]:
99
from os_updaters import linux_macos as os_updater
10+
else:
11+
print("Unsupported OS detected. Exiting...")
12+
input("Press Enter to exit.")
13+
exit(1)
1014

1115
SPICETIFY_INSTALLED = os_updater.is_spicetify_installed()
1216
from os import environ
@@ -32,7 +36,7 @@ def main():
3236
"An update for Spicetify is available. Would you like to update? (Y/N): "
3337
).lower()
3438
if user_choice == "y":
35-
os_updater.update_spicetify()
39+
os_updater.install_spicetify()
3640
print("Spicetify has been updated.")
3741
else:
3842
print("Spicetify update skipped.")

0 commit comments

Comments
 (0)