Files
turkanime-gui/docs/build-win.bat
T
Barış Keser 9a14b68987 chore(release): paketleme, CI ve dokümantasyon — sürüm 10.0.0
Qt geçişinin istemci tarafı bitti; paketleme/CI/doküman yeni gerçeğe uyduruldu.

version.json şema uyumsuzluğu (uygulama içi güncelleme HİÇ çalışmıyordu)
------------------------------------------------------------------------
release.yml platforms[os] = {"gui":..., "cli":...} yazıyordu ama
updater.platform_paketi ["url"] bekliyordu; her platformda sessizce
"desteklenmiyor"a düşülüyordu. Üretici (CI) tarafı değiştirildi, tüketici değil:
depodaki mevcut version.json zaten url/checksum şemasında ve sahadaki 9.4.x
ikilileri o şemayı okuyor — tüketiciyi değiştirmek onları kalıcı kırardı,
üreticiyi düzeltmek hepsini birden onarıyor.

checksum alanı artık gerçekten doluyor: CI eskiden yalnızca .md5 sidecar
üretiyordu, version.json'daki checksum hep boştu, yani updater'ın SHA-256
doğrulaması hiç devreye girmiyordu. Sidecar'lar da .sha256 oldu.

İkinci ve daha sinsi sorun: uygulama version.json'ı release asset'inden değil
raw.githubusercontent'ten **main dalından** okuyor. Dosya main'e hiç
yazılmadığı için güncelleme denetimi 9.4.9.3'te donmuştu. Release job'a
version.json'ı main'e işleyen bir adım eklendi — continue-on-error ile, yani
başarısız olsa bile release ayakta kalıyor; değişiklik yoksa commit atmıyor.

Paket boyutu (ölçüldü)
----------------------
qtwebengine_locales 53 -> tr + en-US       42,5 MiB
translations/*.qm 304 -> _tr/_en           14,5 MiB
*.debug.pak / *.debug.bin                  77,2 MiB
                                    toplam 134,2 MiB (datas 596,7 -> 413,4 MiB)

Budamanın WebEngine'i bozmadığı doğrulandı: QtWebEngineProcess, icudtl.dat,
qtwebengine_resources{,_100p,_200p}.pak, devtools_resources.pak,
v8_context_snapshot.bin, en-US.pak ve tr.pak hepsi kalıyor. Locale dizini boş
bırakılmıyor — boşsa WebEngine "locales directory not found" deyip açılmıyor.

Diğer
-----
- turkanime-qt.spec -> turkanime-gui.spec; artefakt adları turkanime-gui-<os>.zip.
  Depo, PyPI, giriş noktası ve artefakt artık tek ad kullanıyor.
- Sürüm 9.4.12.2 -> 10.0.0, tek kaynaktan (cli/version.py artık ..version'dan
  okuyor; üç yer birbiriyle tutarlı).
- docs/V9.5.0.md'deki iki yanlış iddia dürüstçe düzeltildi: "Selenium tamamen
  kaldırıldı" o noktada doğru değildi (paket Faz 9'da gitti) ve "varsayılan hâlâ
  CustomTkinter" maddesi artık geçersiz. Not, o günün durumunu belgelemek için
  duruyor.
- docs/V10.0.0.md sürüm notu eklendi; içindeki hata listesinin tamamı koddan
  doğrulandı, ölçülmemiş sayı yazılmadı.
- README/docs/build betikleri Faz 9 sonrası gerçeğe uyduruldu.

Test: 307 -> 313. Yeni testler version.json şemasının üretici-tüketici uyumunu
kilitliyor; sessizce bozulan şey bir daha sessizce bozulmasın.
2026-08-03 13:38:41 +03:00

131 lines
5.3 KiB
Batchfile
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.
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
REM Pure-Batch Windows build helper (no PowerShell)
REM Hem GUI (turkanime-gui.spec, onedir) hem CLI (tek dosya exe) derler.
REM DEPO KOKUNDEN calistirin: docs\build-win.bat
REM (spec, gereksinimler.json ve docs\TurkAnime.ico yollari koke gore.)
echo Preparing build environment...
if not exist bin mkdir bin
echo Downloading 7zr (7-Zip) ...
curl -L -o 7zr.exe https://www.7-zip.org/a/7zr.exe || (
echo Failed to download 7zr.exe & pause & exit /b 1
)
echo Downloading yt-dlp...
curl -L -o bin\yt-dlp.exe "https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe" || echo warn: yt-dlp download failed
echo Downloading aria2...
curl -L -o aria2.zip "https://github.com/aria2/aria2/releases/download/release-1.37.0/aria2-1.37.0-win-64bit-build1.zip" || (echo Failed to download aria2.zip & pause & exit /b 1)
echo Extracting aria2...
7zr.exe x aria2.zip -otmp_aria2 -y >nul 2>&1 || (
echo 7z extraction failed, trying PowerShell Expand-Archive...
powershell -NoProfile -Command "Expand-Archive -LiteralPath 'aria2.zip' -DestinationPath 'tmp_aria2' -Force" >nul 2>&1 || (
echo Failed to extract aria2.zip & pause & exit /b 1
)
)
echo Copying aria2 binaries to bin\ ...
set "ARIA2_DIR="
for /r tmp_aria2 %%f in (aria2c.exe) do (
set "ARIA2_DIR=%%~dpf"
goto :after_aria2_find
)
:after_aria2_find
if not defined ARIA2_DIR (
echo aria2c.exe not found in extracted archive & pause & exit /b 1
) else (
xcopy /E /I "%ARIA2_DIR%*" bin\ >nul 2>&1 || echo warn: aria2 copy failed
)
echo Downloading mpv (may be large)...
curl -L -o mpv.7z "https://sourceforge.net/projects/mpv-player-windows/files/64bit/mpv-x86_64-20231231-git-abc2a74.7z/download" || (echo Failed to download mpv.7z & pause & exit /b 1)
echo Extracting mpv...
7zr.exe x mpv.7z -obin -y >nul 2>&1 || (echo Failed to extract mpv.7z & pause & exit /b 1)
echo Locating mpv.exe...
set "MPV_FOUND="
for /r bin %%f in (mpv.exe) do (
set "MPV_FOUND=%%~f"
goto :after_mpv_find
)
:after_mpv_find
if not defined MPV_FOUND (
echo mpv.exe not found after extraction & pause & exit /b 1
) else (
echo mpv found at %MPV_FOUND%
)
echo Downloading ffmpeg...
curl -L -o ffmpeg.zip "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip" || (echo Failed to download ffmpeg.zip & pause & exit /b 1)
echo Extracting ffmpeg...
7zr.exe x ffmpeg.zip -otmp_ffmpeg -y >nul 2>&1 || (
echo 7z extraction failed, trying PowerShell Expand-Archive...
powershell -NoProfile -Command "Expand-Archive -LiteralPath 'ffmpeg.zip' -DestinationPath 'tmp_ffmpeg' -Force" >nul 2>&1 || (
echo Failed to extract ffmpeg.zip & pause & exit /b 1
)
)
echo Locating ffmpeg.exe...
set "FFMPEG_FOUND="
for /r tmp_ffmpeg %%f in (ffmpeg.exe) do (
set "FFMPEG_FOUND=%%~f"
goto :after_ffmpeg_find
)
:after_ffmpeg_find
if not defined FFMPEG_FOUND (
echo ffmpeg.exe not found after extraction & pause & exit /b 1
) else (
echo Copying ffmpeg to bin\
copy /Y "%FFMPEG_FOUND%" bin\ >nul
)
for /r tmp_ffmpeg %%g in (ffprobe.exe) do (
copy /Y "%%~g" bin\ >nul
goto :after_ffprobe_copy
)
:after_ffprobe_copy
echo Embedded runtime prepared.
echo Installing python deps and building GUI with PyInstaller...
python -m pip install --upgrade pip || (echo pip upgrade failed & pause & exit /b 1)
pip install -r requirements-gui.txt || echo warn: requirements-gui install failed
pip install pyinstaller || echo warn: pyinstaller install failed
:: Faz 9: eski pyinstaller.spec (CustomTkinter) silindi. Tek GUI spec'i bu.
:: Faz 10: spec adi turkanime-qt.spec -> turkanime-gui.spec olarak degisti.
:: onedir uretir -> dist\turkanime-gui\ (QtWebEngine onefile'da kirilgan).
python -m PyInstaller turkanime-gui.spec --noconfirm || echo warn: PyInstaller GUI build failed
echo Building CLI (Windows)...
python -m pip install --upgrade pip
pip install -r requirements.txt || echo warn: requirements install failed
pip install pyinstaller pyinstaller_versionfile || echo warn: pyinstaller_versionfile install failed
echo Generating version_generator.py
>version_generator.py echo import pyinstaller_versionfile
>>version_generator.py echo from turkanime_api.cli.version import __version__
>>version_generator.py echo.
>>version_generator.py echo pyinstaller_versionfile.create_versionfile(
>>version_generator.py echo output_file='versionfile.txt',
>>version_generator.py echo version=__version__,
>>version_generator.py echo company_name='TurkAnime Dev',
>>version_generator.py echo file_description='Anime İndirici ^& Oynatıcı',
>>version_generator.py echo internal_name='TurkAnime',
>>version_generator.py echo legal_copyright='© Barkeser2002, All rights reserved.',
>>version_generator.py echo original_filename='TurkAnime.exe',
>>version_generator.py echo product_name='TurkAnime İndirici'
>>version_generator.py echo )
echo Generating compiled.py
>compiled.py echo from turkanime_api.cli.__main__ import main
>>compiled.py echo if __name__ == "__main__":
>>compiled.py echo main()
echo Running PyInstaller for CLI
pyinstaller --noconfirm --onefile --console --icon "docs\TurkAnime.ico" --name "TurkAnime" --version-file versionfile.txt --hidden-import yt_dlp --hidden-import curl_cffi --hidden-import Crypto --add-data "gereksinimler.json;." compiled.py || echo warn: PyInstaller CLI build failed
echo Build complete. Artifacts are in the dist\ directory.
ENDLOCAL
pause