Files
Barış Keser db6dcf7225 v1.3.0: crossfade + boslukssuz (gapless) calma ve Discord Rich Presence
- Motor: siradaki parcayi onden coz, sinirda es-guclu crossfade (0-12 sn) ya da
  boslukssuz terfi; kilit-guvenli callback, elle geciste onyukleme iptal
- Bridge: setCrossfade/setGapless/setDiscordRpc/setDiscordClientId slotlari;
  sirali calmada otomatik onyukleme; motorun kendiliginden ilerlemesinde arayuzu
  yeniden yukleme yapmadan (boslukssuz) guncelle
- richpresence.py: opsiyonel pypresence sarmalayici (Discord acik + Client ID ister),
  hataya dayanikli + throttle'li; calan parca/oynat-duraklat Discord'a yansir
- Web: Efektler'de 'Gecis & Discord' karti (crossfade slider, gapless toggle,
  Discord toggle + Client ID alani); TR/EN i18n
- requirements/build: pypresence eklendi, --collect-all pypresence
2026-09-20 17:01:18 +03:00

65 lines
2.5 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
# Stüdyo karaoke (htdemucs / CPU): torch + demucs ve yerel bağımlılıkları.
# Not: torchaudio GEREKMEZ (demucs 4.x ses G/Ç için sphn kullanır).
"--collect-all", "torch",
"--collect-all", "demucs",
"--collect-all", "julius",
"--collect-all", "einops",
"--collect-all", "lameenc",
"--collect-all", "safetensors",
"--collect-all", "sphn",
"--collect-all", "huggingface_hub",
"--collect-all", "pypresence", # Discord Rich Presence (opsiyonel)
# 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())