diff --git a/build.py b/build.py index 0a8fed6..0cac979 100644 --- a/build.py +++ b/build.py @@ -1,8 +1,13 @@ -from subprocess import call +from subprocess import call, Popen, DETACHED_PROCESS from shutil import rmtree from os.path import isdir -if isdir(".\\build"): +if isdir(".\\build"): + print("Removing .\\build") rmtree(".\\build") +if isdir(".\\noui_build"): + print("Removing .\\noui_build") + rmtree(".\\noui_build") +Popen(["powershell", """python3 noui_setup.py build; python3 -c "input('\\n\\n________________________________\\nBUILD FINISHED\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\\n\\n')\""""], shell=True, creationflags=DETACHED_PROCESS) call("python3 setup.py build", shell=True) print( """ diff --git a/noui_setup.py b/noui_setup.py new file mode 100644 index 0000000..30c8db6 --- /dev/null +++ b/noui_setup.py @@ -0,0 +1,20 @@ +from cx_Freeze import setup, Executable + +base = None +executables = [Executable("backend.py", base=base), Executable("wrapper.py", base=base, targetName="Changer.exe")] + +packages = ["idna", "os", "ctypes", "praw", "glob", "time", "urllib", "progressbar", "imgur_downloader", "subprocess"] +options = { + 'build_exe': { + 'build_exe': '.\\noui_build', + 'packages':packages, + }, +} + +setup( + name = "Changer", + options = options, + version = "1.1", + description = 'Wallpaper changer by u/Surferlul', + executables = executables +) \ No newline at end of file diff --git a/setup.py b/setup.py index 64e2b2d..c065283 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ base = None executables = [Executable("backend.py", base=base), Executable("wrapper.py", base=base), Executable("Changer.py", base=base)] -packages = ["idna", "os", "ctypes", "praw", "glob", "time", "urllib", "progressbar", "imgur_downloader", "wx", "subprocess", "_thread"] +packages = ["idna", "os", "ctypes", "praw", "glob", "time", "urllib", "progressbar", "imgur_downloader", "wx", "subprocess"] options = { 'build_exe': { 'build_exe': '.\\build',