Files
just-music-premium/build.py
T
Barış Keser db8a83823b Just Music Premium — Spotify tarzı QtWebEngine müzik çalar
- Web arayüzü (HTML/CSS/JS) + yerli DSP ses motoru (numpy/scipy/sounddevice)
- QWebChannel köprüsü, sunucu/port yok, app:// özel şeması
- 30 EQ preset + efekt paneli, karaoke, ruh hali motoru, FFT görselleştirici
- yt-dlp Python kütüphanesi + gömülü ffmpeg/deno; Lyrica ile senkron sözler
- Klip modu: internetten akış (indirme yok), gömülü görünüm + kalıcı mini oynatıcı
2026-07-17 19:02:51 +03:00

54 lines
1.9 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""PyInstaller ile Windows exe üretir (gömülü ffmpeg + yt-dlp + logo).
Kullanım:
python build.py # tek klasör (hızlı açılır, önerilir)
python build.py --onefile # tek exe dosyası (taşıması kolay, yavaş açılır)
Çıktı: dist/JustMusic/JustMusic.exe (veya --onefile ile dist/JustMusic.exe)
Bu program yalnızca Windows içindir; ffmpeg ve yt-dlp exe içine gömülür.
"""
from __future__ import annotations
import os
import subprocess
import sys
APP_NAME = "JustMusic"
def main() -> int:
onefile = "--onefile" in sys.argv
here = os.path.dirname(os.path.abspath(__file__))
sep = ";" # Windows PyInstaller --add-data/--add-binary ayırıcısı
args = [
sys.executable, "-m", "PyInstaller",
"--noconfirm", "--clean", "--windowed",
"--name", APP_NAME,
"--collect-all", "sounddevice", # PortAudio DLL'i dahil
"--collect-all", "yt_dlp", # yt-dlp PYTHON kütüphanesi
"--collect-all", "certifi", # https sertifikaları
"--collect-all", "PyQt6.QtWebEngineCore", # WebEngine runtime/process/resources
# gömülü ikili dosyalar
"--add-binary", f"{os.path.join(here, 'bin', 'ffmpeg.exe')}{sep}bin",
"--add-binary", f"{os.path.join(here, 'bin', 'yt-dlp.exe')}{sep}bin",
"--add-binary", f"{os.path.join(here, 'bin', 'deno.exe')}{sep}bin",
# web arayüzü + logo
"--add-data", f"{os.path.join(here, 'justmusic', 'web')}{sep}justmusic/web",
"--add-data", f"{os.path.join(here, 'justmusic', 'assets', 'logo.png')}{sep}justmusic/assets",
]
args += ["--onefile"] if onefile else ["--onedir"]
icon = os.path.join(here, "logo.ico")
if os.path.exists(icon):
args += ["--icon", icon]
args.append(os.path.join(here, "main.py"))
print(">>", " ".join(args))
return subprocess.call(args, cwd=here)
if __name__ == "__main__":
raise SystemExit(main())