make.bat 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. @echo off
  2. md output >NUL 2>NUL
  3. del out.py >NUL 2>NUL
  4. del "output/plugin.py" >NUL 2>NUL
  5. del "output/startup.py" >NUL 2>NUL
  6. echo do copy...
  7. cd "src"
  8. rem copy /b /Y playerwatcher.py+viewids.py+consts.py+compressedcookielib.py+utils.py+portal.py+api.py+plugin.py "..\out.py" >NUL 2>NUL
  9. copy /b /Y viewids.py+utils.py+consts.py+playserver.py+api.py+plugin.py "..\out.py" >NUL 2>NUL
  10. cd "..\"
  11. timeout /t 1 >NUL 2>NUL
  12. echo do replace...
  13. python "replace.py" "out.py" "stable"
  14. echo do minify...
  15. copy /Y /b out.py "tmp.py" >NUL 2>NUL
  16. copy /Y /b "startup.py" "output/startup.py" >NUL 2>NUL
  17. python pypreprocessor.py "tmp.py"
  18. python languageconvert.py
  19. copy /b /Y "tmp_out.py" "out.py"
  20. copy /b /Y "out.py" "tmp.py"
  21. C:\Python27\Scripts\pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-functions --gzip_modified --prepend=utf8.txt -o tmp.py out.py
  22. rem C:\Python27\Scripts\pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-functions --prepend=utf8_stable.txt -o tmp.py out.py
  23. rem C:\Python27\Scripts\pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-functions --prepend=utf8_stable.txt -o tmp.py out.py
  24. rem D:\dev\Python27\Scripts\pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-import-methods --gzip_modified --prepend=utf8.txt -o "output/plugin.py" out.py
  25. rem D:\dev\Python27\Scripts\pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-import-methods --gzip_modified --prepend=utf8.txt -o "output/startup.py" "src/startup.py"
  26. copy /b /Y "tmp.py" "output/plugin.py"
  27. echo do cleanup...
  28. DEL /Q /F /S "*.pyc" >NUL 2>NUL
  29. del tmp.py >NUL 2>NUL
  30. del out.py >NUL 2>NUL
  31. rd /s /q "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/resources" >NUL 2>NUL
  32. rd /s /q "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/framework" >NUL 2>NUL
  33. md "resources/language/resource.language.en_us" >NUL 2>NUL
  34. echo V | xcopy "resources/language/english/strings.po" /f /y /s "resources/language/resource.language.en_us" >NUL 2>NUL
  35. echo V | xcopy "resources/language/resource.language.en_us" /f /y /s "resources/language/resource.language.en_gb" >NUL 2>NUL
  36. echo V | xcopy "resources" /f /y /s "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/resources" >NUL 2>NUL
  37. echo V | xcopy "framework" /f /y /s "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/framework" >NUL 2>NUL
  38. echo D | xcopy "output/startup.py" /f /y "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/startup.py" >NUL 2>NUL
  39. echo D | xcopy "output/plugin.py" /f /y "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/plugin.py" >NUL 2>NUL
  40. echo D | xcopy "addon.xml" /f /y "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/addon.xml" >NUL 2>NUL
  41. echo D | xcopy "fanart.jpg" /f /y "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/fanart.jpg" >NUL 2>NUL
  42. echo D | xcopy "icon.png" /f /y "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/icon.png" >NUL 2>NUL
  43. echo D | xcopy "changelog.txt" /f /y "C:\Users\SevenX\Dropbox\Crynet\Repo/source/stable/changelog.txt" >NUL 2>NUL
  44. echo V | xcopy "resources" /f /y /s "C:\Users\SevenX\AppData\Roaming\Kodi\addons\plugin.video.cryflix/resources" >NUL 2>NUL
  45. echo D | xcopy "addon.xml" /f /y "C:\Users\SevenX\AppData\Roaming\Kodi\addons\plugin.video.cryflix/addon.xml" >NUL 2>NUL
  46. echo D | xcopy "output/plugin.py" /f /y "C:\Users\SevenX\AppData\Roaming\Kodi\addons\plugin.video.cryflix/plugin.py" >NUL 2>NUL
  47. echo D | xcopy "output/startup.py" /f /y "C:\Users\SevenX\AppData\Roaming\Kodi\addons\plugin.video.cryflix/startup.py" >NUL 2>NUL
  48. echo D | xcopy "resources/settings.xml" /f /y "C:\Users\SevenX\AppData\Roaming\Kodi\addons\plugin.video.cryflix/resources/settings.xml" >NUL 2>NUL