setup.py 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import sys, os
  2. import os.path
  3. import git
  4. from cx_Freeze import setup, Executable
  5. targetName="wowviewer"
  6. __version__ = "0.1.0"
  7. copyright = "© 2018 986-Studio"
  8. packages = ["datetime", "PIL", "tkinter", "wow"]
  9. base = None
  10. if sys.platform == "win32":
  11. base = "Win32GUI"
  12. targetName = targetName + ".exe"
  13. PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
  14. os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
  15. os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')
  16. options = {
  17. 'build_exe': {
  18. 'include_files':[
  19. os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'),
  20. os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'),
  21. ],
  22. 'packages': packages,
  23. 'include_msvcr': True,
  24. },
  25. }
  26. executable = [
  27. Executable("main.py", base=base, targetName=targetName, copyright=copyright)
  28. ]
  29. setup(
  30. name = "WOWFileViewer",
  31. description='Viewer for SparkMaker WOW files',
  32. version=__version__,
  33. options=options,
  34. executables=executable
  35. )