mirror of
https://github.com/barkeser2002/just-music-premium.git
synced 2026-09-25 05:19:51 +03:00
- Studyo karaoke (yeni justmusic/separation.py): Demucs htdemucs ile gercek vokal/enstruman ayirma, YALNIZCA CPU. Enstrumantal (karaoke) / Akapella (sadece vokal) / hizli mid-side / kapali secenekleri mikrofon dugmesindeki menude. Stem'ler ~/Music/JustMusic/stems/<hash>/ altinda onbellege alinir, yani ayni sarki bir daha ayrilmaz. Ilk ayirma ~4-5 dk/sarki (olculdu: 258s), ilerleme gosterilir. engine.swap_source() ile gecis CALDIGI SANIYEYI KORUR ve DSP efektleri stem'e de uygulanir. - Kucuk ekran: player kontrolleri artik cakismiyor. Kademeli responsive (1140/1010/900px) ile nis kontroller gizlenir; olcum: 980px ve 900px'te sifir cakisma, yatay tasma yok. Pencere alt siniri 1120 -> 900. - Native select'ler tamamen ozel: appearance:none + kendi SVG chevron'u, hover/focus halkasi, ozel option renkleri (tarayici oku kalmadi). - YouTube aramasi: satira tiklayinca ANINDA iner (her satirda ayrica indir dugmesi). Checkbox + toplu indirme butonu secim akisi olarak korundu. - Fix: karaoke menusu acilir acilmaz kapaniyordu. Global disari-tikla-kapat dinleyicisi butonun kendi tiklamasini yakaliyordu (stopPropagation ile cozuldu). - Paketleme: torch + demucs exe'ye gomuldu (kullanici tercihi). Donmus derlemede dogrulandi: demucs=True, UI yuklendi, toplam 1391 MB.
64 lines
2.4 KiB
Python
64 lines
2.4 KiB
Python
"""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",
|
||
# 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())
|