Kodi plugin to to play various online streams (mostly Latvian)

kmake.bat 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. @echo off
  2. :=== Parameters ===
  3. python -c "import re,sys; print re.search('<addon.+?version=""([^""]+)""',open('addon.xml').read()).group(1)" >version.txt
  4. set /p ver=<version.txt
  5. python -c "import re,sys; print re.search('<addon.+?id=""([^""]+)""',open('addon.xml').read()).group(1)" >id.txt
  6. set /p pack_name=<id.txt
  7. echo %pack_name% %ver%
  8. pause
  9. set release_dir=release\
  10. set repo_dir=q:\web\repo\
  11. :set feed_dir=q:\web\repo\
  12. set AR=\MinGW\bin\ar.exe
  13. set TAR=\MinGW\msys\1.0\bin\tar.exe
  14. set CP=\MinGW\msys\1.0\bin\cp.exe
  15. set ZIP=
  16. rem set ZIP=\Program Files (x86)\Gow\bin\zip.exe
  17. :=== Pull content submodule ===
  18. pushd resources\lib\content
  19. :git commit -a -m labojumi
  20. git checkout .
  21. git pull
  22. popd
  23. :=== Create package zip file ===
  24. if exist "%pack_name%" rm -r -f "%pack_name%"
  25. mkdir "%pack_name%""
  26. if not exist %release_dir% mkdir %release_dir%
  27. echo Copying files to %pack_name%
  28. for %%f in (
  29. readme.md
  30. changelog.md
  31. addon.xml
  32. addon.py
  33. context_menu.py
  34. context_download.py
  35. downloadqueue.py
  36. service.py
  37. icon.png
  38. kodiswift\*.py
  39. resources\__init__.py
  40. resources\settings.xml
  41. resources\icon.png
  42. resources\language\English\*
  43. resources\lib\__init__.py
  44. resources\lib\content\__init__.py
  45. resources\lib\content\ContentSources.py
  46. resources\lib\content\playstreamproxy.py
  47. resources\lib\content\Downloader.py
  48. resources\lib\content\resolver.py
  49. resources\lib\content\util.py
  50. resources\lib\content\run.py
  51. resources\lib\content\file.py
  52. resources\lib\content\demjson.py
  53. resources\lib\content\ordereddict.py
  54. resources\lib\content\sources\__init__.py
  55. resources\lib\content\sources\SourceBase.py
  56. resources\lib\content\sources\cinemalive.py
  57. resources\lib\content\sources\config.py
  58. resources\lib\content\sources\euronews.py
  59. resources\lib\content\sources\filmix.py
  60. resources\lib\content\sources\filmon.py
  61. resources\lib\content\sources\iplayer.py
  62. resources\lib\content\sources\movieplace.py
  63. resources\lib\content\sources\ltc.py
  64. resources\lib\content\sources\mtgplay.py
  65. resources\lib\content\sources\xtv.py
  66. resources\lib\content\sources\replay.py
  67. resources\lib\content\sources\lmt.py
  68. resources\lib\content\sources\serialguru.py
  69. resources\lib\content\sources\tvdom.py
  70. resources\lib\content\sources\ustvnow.py
  71. resources\lib\content\sources\viaplay.py
  72. resources\lib\content\sources\filmas.py
  73. resources\lib\content\sources\tvplay.py
  74. resources\lib\content\sources\enigma2.py
  75. resources\lib\content\sources\YouTubeVideoUrl.py
  76. resources\lib\content\sources\jsinterp.py
  77. resources\lib\content\sources\swfinterp.py
  78. resources\lib\content\sources\streams.cfg
  79. resources\lib\content\resolvers\__init__.py
  80. resources\lib\content\resolvers\aadecode.py
  81. resources\lib\content\resolvers\hqqresolver.py
  82. resources\lib\content\resolvers\openload3.py
  83. resources\lib\content\resolvers\hdgo.py
  84. resources\lib\content\resolvers\kapnob.py
  85. resources\lib\content\resolvers\kodik.py
  86. resources\lib\content\resolvers\cloudsany.py
  87. resources\lib\content\resolvers\youtuberesolver.py
  88. ) do echo f| xcopy %%f %pack_name%\%%f
  89. xcopy /y /q resources\lib\content\picons\* %pack_name%\resources\picons\
  90. echo Creating %release_dir%%pack_name%-%ver%.zip
  91. if exist %release_dir%%pack_name%-%ver%.zip rm %release_dir%%pack_name%-%ver%.zip
  92. 7za a -r -tzip -bb0 -bsp1 -bso0 %release_dir%%pack_name%-%ver%.zip %pack_name%
  93. if exist %pack_name% rm -r -f %pack_name%
  94. if ()==(%1%) (
  95. GOTO :EOF
  96. )
  97. :=== Add to git ===
  98. echo Adding to git
  99. git add %release_dir%%pack_name%-%ver%.zip
  100. git commit -m %ver%
  101. git tag -d %ver%
  102. git tag %ver%
  103. git push
  104. :=== Copy package to repo ===
  105. echo Copying %release_dir%%pack_name%-%ver%.zip to %repo_dir%%pack_name%
  106. if not exist %repo_dir% mkdir %repo_dir%
  107. if not exist %repo_dir%%pack_name% mkdir %repo_dir%%pack_name%
  108. cp addon.xml %repo_dir%%pack_name%\addon.xml -fpv
  109. cp %release_dir%%pack_name%-%ver%.zip %repo_dir%%pack_name%\%pack_name%-%ver%.zip -fpv
  110. 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
  111. python ..\generate_repo.py %repo_dir%
  112. )