Play images and video from Synology PhotoStation server

kmake.bat 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. @echo off
  2. :=== Parameters ===
  3. :--- Pull content submodule ---
  4. rem pushd resources\lib\content
  5. rem git checkout .
  6. rem git pull
  7. rem popd
  8. python get_version.py addon.xml >version.txt
  9. set /p ver=<version.txt
  10. echo %ver%
  11. pause
  12. set prog=PhotoStation
  13. set pack_name=plugin.image.photostation
  14. set desc=Play Synology PhotoStation media
  15. set ipk_dir=ipkg\
  16. set release_dir=release\
  17. set repo_dir=..\repo\
  18. set feed_dir=q:\web\repo\
  19. set AR=\MinGW\bin\ar.exe
  20. set TAR=\MinGW\msys\1.0\bin\tar.exe
  21. rem set ZIP=\Program Files (x86)\Gow\bin\zip.exe
  22. :=== data files ===
  23. if exist "%pack_name%" rm -r -f "%pack_name%"
  24. mkdir "%pack_name%""
  25. if not exist %release_dir% mkdir %release_dir%
  26. if not exist %repo_dir% mkdir %repo_dir%
  27. if not exist %repo_dir%%pack_name% mkdir %repo_dir%%pack_name%
  28. if not exist %pack_name% mkdir %pack_name%
  29. for %%f in (
  30. readme.md
  31. changelog.md
  32. addon.xml
  33. addon.py
  34. icon.png
  35. kodiswift\*.py
  36. resources\__init__.py
  37. resources\settings.xml
  38. resources\icon.png
  39. resources\language\English\*
  40. resources\lib\__init__.py
  41. resources\lib\photostation_api.py
  42. ) do echo f| xcopy %%f %pack_name%\%%f
  43. if exist %release_dir%%pack_name%-%ver%.zip rm %release_dir%%pack_name%-%ver%.zip
  44. rem zip -r %release_dir%%pack_name%-%ver%.zip %pack_name%
  45. "C:\Program Files\WinRAR\winrar.exe" a -afzip -r %release_dir%%pack_name%-%ver%.zip %pack_name%
  46. copy addon.xml %repo_dir%%pack_name%\addon.xml /Y
  47. copy %release_dir%%pack_name%-%ver%.zip %repo_dir%%pack_name%\%pack_name%-%ver%.zip /Y
  48. python -c "import hashlib; print hashlib.md5(open(r'%repo_dir%%pack_name%\%pack_name%-%ver%.zip','r').read()).hexdigest()" >%repo_dir%%pack_name%\%pack_name%-%ver%.zip.md5
  49. git add %release_dir%%pack_name%-%ver%.zip
  50. rm -r -f "%pack_name%"
  51. if not ()==(%1%) (
  52. git commit -m %ver%
  53. git tag -d "%ver%"
  54. git tag %ver%
  55. git push
  56. pushd %repo_dir%..
  57. call update_repo.bat
  58. rem xcopy /s /y /u repo %feed_dir%
  59. robocopy repo %feed_dir% addons.* /copy:dat
  60. robocopy repo\%pack_name% q:\web\repo\%pack_name% /copy:DAT /xo
  61. popd
  62. )
  63. pause