Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit daa98f9

Browse files
committed
Prepared everything for building binary and added background art
1 parent 675e1a3 commit daa98f9

File tree

8 files changed

+200
-46
lines changed

8 files changed

+200
-46
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ Download project from Github and install dependencies
3636
python main.py
3737
```
3838

39+
## Building binary
40+
41+
```bash
42+
# First build and config setup
43+
pyinstaller main.py
44+
45+
# Build using config
46+
pyinstaller main.spec
47+
48+
```
49+
3950
### Important!
4051

4152
Only the main.py file will start the application!

main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
from PyQt6.QtWidgets import QApplication
33
from PyQt6.QtCore import Qt, QTimer
44
from splash_window import Splash
5-
from menu_window import Menu
65
from manager_window import Manager
76

87
class SpicetifyPatcher:
98
def __init__(self):
109
self.app = QApplication(sys.argv)
1110
self.splash_window = Splash()
12-
self.menu_window = Menu()
1311
self.manager_window = Manager()
1412

1513
self.splash_window.show()

main.spec

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
4+
a = Analysis(
5+
['main.py'],
6+
pathex=[],
7+
binaries=[],
8+
datas=[("res","res")],
9+
hiddenimports=[],
10+
hookspath=[],
11+
hooksconfig={},
12+
runtime_hooks=[],
13+
excludes=[],
14+
noarchive=False,
15+
)
16+
pyz = PYZ(a.pure)
17+
18+
exe = EXE(
19+
pyz,
20+
a.scripts,
21+
a.binaries,
22+
a.datas,
23+
[],
24+
name='spicetify_installer',
25+
debug=False,
26+
bootloader_ignore_signals=False,
27+
strip=False,
28+
upx=True,
29+
upx_exclude=[],
30+
runtime_tmpdir=None,
31+
console=False,
32+
disable_windowed_traceback=False,
33+
argv_emulation=False,
34+
target_arch=None,
35+
codesign_identity=None,
36+
entitlements_file=None,
37+
)

manager_window.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# By Protonos ,
33

44
import os
5+
import sys
56
import subprocess
67
from PyQt6.QtWidgets import QMainWindow, QErrorMessage
78
from PyQt6.QtCore import Qt
@@ -16,17 +17,19 @@ class Manager(QMainWindow):
1617
def __init__(self):
1718
super().__init__()
1819
self.installmode = True
19-
loadUi('./res/manager.ui', self)
20+
21+
#Switch when building
22+
loadUi("res/manager.ui", self)
23+
#loadUi(os.path.join(sys._MEIPASS, 'res', 'manager.ui'), self)
2024

2125
self.bt_install.clicked.connect(self.startInstaller)
2226
self.bt_update.clicked.connect(self.startUpdate)
2327
self.bt_uninstall.clicked.connect(self.startRemoval)
24-
self.bt0.clicked.connect(self.show_custom_dialog)
2528

2629
self.checkSpicetify()
2730

28-
#currently debug only
29-
def show_custom_dialog(self):
31+
# currently debug only
32+
def debug(self):
3033
if (checkSpotifyRunning()):
3134
dialog = Popup(self)
3235
dialog.exec()

menu_window.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ class Menu(QMainWindow):
6464
def __init__(self):
6565
super().__init__()
6666

67-
loadUi('./res/untitled.ui', self)
67+
68+
#Switch when building
69+
loadUi("res/untitled.ui", self)
70+
loadUi(os.path.join(sys._MEIPASS, 'res', 'untitled.ui'), self)
6871

6972
self.bt_install.clicked.connect(self.InstallSpices)
7073
self.bt_backup.clicked.connect(self.BackupSpices)

res/covers.jpeg

64.3 KB
Loading

res/manager.ui

Lines changed: 135 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ QPushButton {
158158
color: white;
159159
padding: 10px;
160160
}
161+
QComboBox {
162+
padding: 10px;
163+
border-radius: 5px; /* Adjust as needed */
164+
}
165+
166+
QComboBox::down-arrow {
167+
border-radius: 0px; /* Set to 0 to remove any border-radius */
168+
}
169+
170+
161171

162172
QTabWidget::pane{
163173
border-top: none;
@@ -239,7 +249,7 @@ QPushButton:pressed
239249
<x>0</x>
240250
<y>110</y>
241251
<width>801</width>
242-
<height>380</height>
252+
<height>391</height>
243253
</rect>
244254
</property>
245255
<property name="sizePolicy">
@@ -275,7 +285,7 @@ QPushButton:pressed
275285
<property name="geometry">
276286
<rect>
277287
<x>250</x>
278-
<y>180</y>
288+
<y>200</y>
279289
<width>281</width>
280290
<height>51</height>
281291
</rect>
@@ -304,7 +314,7 @@ QPushButton:pressed
304314
<x>250</x>
305315
<y>250</y>
306316
<width>281</width>
307-
<height>80</height>
317+
<height>71</height>
308318
</rect>
309319
</property>
310320
<layout class="QHBoxLayout" name="advanced">
@@ -442,40 +452,110 @@ QPushButton:pressed
442452
<attribute name="title">
443453
<string>Advanced</string>
444454
</attribute>
445-
<widget class="QPushButton" name="bt0">
446-
<property name="enabled">
447-
<bool>true</bool>
448-
</property>
455+
<widget class="QWidget" name="verticalLayoutWidget">
449456
<property name="geometry">
450457
<rect>
451458
<x>10</x>
452-
<y>10</y>
453-
<width>141</width>
454-
<height>41</height>
459+
<y>20</y>
460+
<width>781</width>
461+
<height>241</height>
455462
</rect>
456463
</property>
457-
<property name="styleSheet">
458-
<string notr="true">background-color: transparent;
459-
border: solid;
460-
border-width: 3px;
461-
border-color: crimson;
462-
color: crimson;
463-
font-weight: bold;
464-
465-
QPushButton:!enabled{
466-
background-color: rgba(220, 20, 60, 150);
467-
}</string>
468-
</property>
469-
<property name="text">
470-
<string>Show old menu</string>
471-
</property>
472-
<property name="icon">
473-
<iconset>
474-
<normaloff>ic_plus.png</normaloff>ic_plus.png</iconset>
475-
</property>
476-
<property name="checkable">
477-
<bool>false</bool>
478-
</property>
464+
<layout class="QVBoxLayout" name="verticalLayout">
465+
<item>
466+
<layout class="QHBoxLayout" name="horizontalLayout"/>
467+
</item>
468+
<item>
469+
<widget class="QLabel" name="label_5">
470+
<property name="text">
471+
<string>TextLabel</string>
472+
</property>
473+
</widget>
474+
</item>
475+
<item>
476+
<layout class="QHBoxLayout" name="horizontalLayout_2">
477+
<item>
478+
<widget class="QComboBox" name="comboBox">
479+
<property name="sizePolicy">
480+
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
481+
<horstretch>2</horstretch>
482+
<verstretch>0</verstretch>
483+
</sizepolicy>
484+
</property>
485+
<property name="styleSheet">
486+
<string notr="true"/>
487+
</property>
488+
<item>
489+
<property name="text">
490+
<string>Create Backup</string>
491+
</property>
492+
</item>
493+
<item>
494+
<property name="text">
495+
<string>Clear Backup</string>
496+
</property>
497+
</item>
498+
<item>
499+
<property name="text">
500+
<string>Apply Patches</string>
501+
</property>
502+
</item>
503+
<item>
504+
<property name="text">
505+
<string>Update Spicetify</string>
506+
</property>
507+
</item>
508+
<item>
509+
<property name="text">
510+
<string>Upgrade Spicetify</string>
511+
</property>
512+
</item>
513+
<item>
514+
<property name="text">
515+
<string>Enable Devtools</string>
516+
</property>
517+
</item>
518+
<item>
519+
<property name="text">
520+
<string>Install Marketplace</string>
521+
</property>
522+
</item>
523+
<item>
524+
<property name="text">
525+
<string>Restore Spotify from backup</string>
526+
</property>
527+
</item>
528+
</widget>
529+
</item>
530+
<item>
531+
<spacer name="horizontalSpacer">
532+
<property name="orientation">
533+
<enum>Qt::Horizontal</enum>
534+
</property>
535+
<property name="sizeHint" stdset="0">
536+
<size>
537+
<width>20</width>
538+
<height>20</height>
539+
</size>
540+
</property>
541+
</spacer>
542+
</item>
543+
<item>
544+
<widget class="QPushButton" name="pushButton">
545+
<property name="sizePolicy">
546+
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
547+
<horstretch>1</horstretch>
548+
<verstretch>0</verstretch>
549+
</sizepolicy>
550+
</property>
551+
<property name="text">
552+
<string>Run command</string>
553+
</property>
554+
</widget>
555+
</item>
556+
</layout>
557+
</item>
558+
</layout>
479559
</widget>
480560
</widget>
481561
<widget class="QWidget" name="tab_3">
@@ -561,6 +641,29 @@ li.checked::marker { content: &quot;\2612&quot;; }
561641
</widget>
562642
</widget>
563643
</widget>
644+
<widget class="QLabel" name="background_image">
645+
<property name="geometry">
646+
<rect>
647+
<x>-30</x>
648+
<y>-50</y>
649+
<width>831</width>
650+
<height>551</height>
651+
</rect>
652+
</property>
653+
<property name="text">
654+
<string/>
655+
</property>
656+
<property name="pixmap">
657+
<pixmap>covers.jpeg</pixmap>
658+
</property>
659+
<property name="scaledContents">
660+
<bool>true</bool>
661+
</property>
662+
</widget>
663+
<zorder>background_image</zorder>
664+
<zorder>label_2</zorder>
665+
<zorder>label</zorder>
666+
<zorder>tabWidget</zorder>
564667
</widget>
565668
</widget>
566669
<resources/>

splash_window.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import sys
2-
import subprocess
3-
import time
42
import os
5-
from PyQt6.QtWidgets import QApplication, QMainWindow, QMessageBox, QLabel
6-
from PyQt6.QtCore import Qt, QThread, pyqtSignal
3+
from PyQt6.QtWidgets import QMainWindow
4+
from PyQt6.QtCore import Qt
75
from PyQt6.uic import loadUi
8-
from PyQt6.QtGui import QRegion
96

107
# Add check=true to subprocess to throw exeptions on failure :) shell is not neccesary
118

129
class Splash(QMainWindow):
1310
def __init__(self):
1411
super().__init__()
15-
16-
loadUi('./res/splash.ui', self)
12+
13+
#Switch when building
14+
loadUi("res/splash.ui", self)
15+
#loadUi(os.path.join(sys._MEIPASS, 'res', 'splash.ui'), self)
1716
self.setWindowFlags(Qt.WindowType.FramelessWindowHint)
1817
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)

0 commit comments

Comments
 (0)