Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
5 changes: 3 additions & 2 deletions REQUIREMENTS.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Pillow==8.1.1
pygame==1.9.6
Pillow
pygame
pyinstaller
50 changes: 50 additions & 0 deletions alarm-clock.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(
['alarm-clock\\app.py'],
pathex=['alarm-clock'],
binaries=[],
datas=[('alarm-clock\\assets', 'assets')],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='alarm-clock',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='alarm-clock',
)
2 changes: 1 addition & 1 deletion alarm-clock/alarm_sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, parent, file="default", set_window=False):
self.set_window = set_window
self.thread = Thread(target=self.on_active, daemon=True)
if file == "default":
self.file = relpath("alarm-clock/assets/sounds/beep_beep.wav")
self.file = relpath("assets/sounds/beep_beep.wav")
wav = wave.open(self.file)
frequency = wav.getframerate()
pygame.mixer.init(frequency=frequency)
Expand Down
4 changes: 2 additions & 2 deletions alarm-clock/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def __init__(self, width, height):
def configure_window(self):
self.title("Alarm Clock")
self.geometry(f"{self.width}x{self.height}+100+100")
self.minsize(600, 185)
image_path = relpath("alarm-clock/assets/pictures/icon_2.ico")
self.minsize(300, 185)
image_path = relpath("assets/pictures/icon_2.ico")
image = ImageTk.PhotoImage(file=image_path)
self.iconphoto(False, image)

Expand Down
1 change: 1 addition & 0 deletions build-exe.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyinstaller alarm-clock\app.py -w --add-data alarm-clock\assets;assets --distpath .\dist\windows-x86_64\ --name alarm-clock -p alarm-clock