make_old.bat 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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+watchdog.py+utils.py+consts.py+compressedcookielib.py+utils.py+api.py+plugin.py "..\out.py" >NUL 2>NUL
  10. cd "..\"
  11. copy /b /Y utf8.txt+out.py "tmp.py"
  12. copy /b /Y tmp.py "out.py"
  13. timeout /t 1 >NUL 2>NUL
  14. echo do replace...
  15. python "replace.py" "out.py" "stable"
  16. echo do minify...
  17. copy /Y "out.py" "output/plugin.py" >NUL 2>NUL
  18. copy /Y "startup.py" "output/startup.py" >NUL 2>NUL
  19. rem D:\dev\Python27\Scripts\pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-import-methods --prepend=utf8.txt -o "output/plugin_pure.py" out.py
  20. rem D:\dev\Python27\Scripts\pyminifier --obfuscate-variables --obfuscate-classes --obfuscate-import-methods --gzip_modified --prepend=utf8.txt -o "output/plugin.py" out.py
  21. rem copy /b /Y "utf8.txt"+"src\startup.py" "output\startup.py" >NUL 2>NUL
  22. 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"
  23. echo do cleanup...
  24. DEL /Q /F /S "*.pyc" >NUL 2>NUL
  25. del out.py >NUL 2>NUL
  26. rd /s /q "../Repo/source/stable/resources" >NUL 2>NUL
  27. rd /s /q "../Repo/source/stable/framework" >NUL 2>NUL
  28. echo V | xcopy "resources" /f /y /s "../Repo/source/stable/resources" >NUL 2>NUL
  29. echo V | xcopy "framework" /f /y /s "..//Repo/source/stable/framework" >NUL 2>NUL
  30. echo D | xcopy "output/startup.py" /f /y "../Repo/source/stable/startup.py" >NUL 2>NUL
  31. echo D | xcopy "output/plugin.py" /f /y "../Repo/source/stable/plugin.py" >NUL 2>NUL
  32. echo D | xcopy "addon.xml" /f /y "../Repo/source/stable/addon.xml" >NUL 2>NUL
  33. echo D | xcopy "fanart.jpg" /f /y "../Repo/source/stable/fanart.jpg" >NUL 2>NUL
  34. echo D | xcopy "icon.png" /f /y "../Repo/source/stable/icon.png" >NUL 2>NUL
  35. echo D | xcopy "changelog.txt" /f /y "../Repo/source/stable/changelog.txt" >NUL 2>NUL
  36. echo D | xcopy "addon.xml" /f /y "C:\Users\SevenX\AppData\Roaming\Kodi\addons\plugin.video.cryflix/addon.xml" >NUL 2>NUL
  37. echo D | xcopy "output/plugin.py" /f /y "C:\Users\SevenX\AppData\Roaming\Kodi\addons\plugin.video.cryflix/plugin.py" >NUL 2>NUL
  38. echo D | xcopy "output/startup.py" /f /y "DC:\Users\SevenX\AppData\Roaming\Kodi\addons\plugin.video.cryflix/startup.py" >NUL 2>NUL
  39. rem pause