diff --git a/logger.py b/logger.py index 31da854..84c3fc2 100644 --- a/logger.py +++ b/logger.py @@ -19,4 +19,5 @@ def log(level, process, subProcess, activity, entry): formattedEntry = "[" + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time())) + "][" + process + "] " + entry + "\n" mmLogFileObject.write(formattedEntry) mmLogFileObject.flush() - print(formattedEntry, sys.stdout.flush()) + print(formattedEntry, end="") + sys.stdout.flush() diff --git a/mistake.ico b/mistake.ico new file mode 100644 index 0000000..a928f9f Binary files /dev/null and b/mistake.ico differ diff --git a/setup-win.py b/setup-win.py new file mode 100644 index 0000000..f4c932e --- /dev/null +++ b/setup-win.py @@ -0,0 +1,28 @@ +import os +from cx_Freeze import setup, Executable + +build_exe_options = {"build_exe": ".\\build\\"} + +recipesAtHome = Executable(script="start.py", targetName="RecipesAtHome.exe", + icon='mistake.ico') + +setup(name = "Recipes@Home", + description = "Program to find good recipe routes for the 100% TAS", + options = {"build_exe": build_exe_options}, + executables = [recipesAtHome]) + +directories = ["build/itemSorts", "build/results"] + +extra_files = ["config.txt", "inventory.txt", "README.md", "recipes-JP.txt", + "itemSorts/alphabetic_sort-JP.txt", + "itemSorts/type_sort-JP.txt", "results/readme.md"] + +for directory in directories: + if not os.path.isdir(directory): + os.mkdir(directory) + +for infile in extra_files: + infile_contents = open(infile, "r").read() + outfile = infile[:-2] + "txt" if infile.endswith("md") else infile + with open("build/" + outfile, "w", newline="\r\n") as f: + f.write(infile_contents)