2011-06-26 18:14:19 -04:00
|
|
|
# Windows-only cx_freeze setup file
|
|
|
|
from cx_Freeze import setup, Executable
|
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
import shutil
|
2020-10-04 09:25:19 -04:00
|
|
|
import requests
|
|
|
|
import urllib
|
|
|
|
import PyQt4
|
2020-10-04 16:15:59 -04:00
|
|
|
import configparser
|
2020-10-04 09:25:19 -04:00
|
|
|
from Queue import *
|
2011-06-26 18:14:19 -04:00
|
|
|
|
|
|
|
if sys.platform == "win32":
|
|
|
|
base = "Win32GUI"
|
|
|
|
else:
|
|
|
|
base = "Console"
|
|
|
|
|
2020-10-04 09:25:19 -04:00
|
|
|
build_exe_options = {
|
2020-10-04 16:15:59 -04:00
|
|
|
"includes": ["requests","urllib"],
|
|
|
|
'excludes': ['collections.sys',
|
|
|
|
'collections._sre',
|
|
|
|
'collections._json',
|
|
|
|
'collections._locale',
|
|
|
|
'collections._struct',
|
|
|
|
'collections.array',
|
|
|
|
'collections._weakref'], # Not excluding these is the only way I could get it to build while using configparser. I don't know why though.
|
2020-10-04 09:25:19 -04:00
|
|
|
}
|
|
|
|
|
2011-06-26 18:14:19 -04:00
|
|
|
setup(
|
2020-10-04 16:15:59 -04:00
|
|
|
name = "PESTERCHUM",
|
2011-06-26 18:14:19 -04:00
|
|
|
version = "3.41",
|
|
|
|
description = "P3ST3RCHUM",
|
2020-10-04 16:15:59 -04:00
|
|
|
options = {"build_exe": build_exe_options},
|
2011-06-26 18:14:19 -04:00
|
|
|
executables = [Executable("pesterchum.py",
|
|
|
|
base=base,
|
|
|
|
compress=True,
|
|
|
|
icon="pesterchum.ico",
|
|
|
|
),
|
|
|
|
Executable("pesterchum_debug.py",
|
|
|
|
base=base,
|
|
|
|
compress=True,
|
|
|
|
icon="pesterchum.ico",
|
|
|
|
)])
|
2020-10-04 09:25:19 -04:00
|
|
|
|
|
|
|
#Replace exe.win-amd64-2.7 with whatever it seems to generate as for you.
|
2011-06-26 18:14:19 -04:00
|
|
|
if sys.platform == "win32":
|
2020-10-04 09:25:19 -04:00
|
|
|
os.rename("build/exe.win-amd64-2.7", "build/pesterchum")
|
2011-06-26 18:14:19 -04:00
|
|
|
|
|
|
|
shutil.copytree("themes", "build/pesterchum/themes")
|
|
|
|
shutil.copytree("smilies", "build/pesterchum/smilies")
|
|
|
|
shutil.copy("pesterchum.nsi", "build/pesterchum/")
|
|
|
|
shutil.copy("pesterchum-update.nsi", "build/pesterchum/")
|
2020-10-04 16:15:59 -04:00
|
|
|
shutil.copy("server.ini", "build/pesterchum/")
|
2011-06-26 18:14:19 -04:00
|
|
|
os.mkdir("build/pesterchum/profiles")
|
|
|
|
os.mkdir("build/pesterchum/logs")
|
2020-10-04 10:01:43 -04:00
|
|
|
|
|
|
|
#Readme & txt
|
|
|
|
shutil.copy("README.md", "build/pesterchum/")
|
|
|
|
shutil.copy("README-pesterchum.mkdn", "build/pesterchum/")
|
|
|
|
shutil.copy("README-karxi.mkdn", "build/pesterchum/")
|
2011-06-26 18:14:19 -04:00
|
|
|
shutil.copy("themes.txt", "build/pesterchum/")
|