Skip to content

Commit

Permalink
Add setup script for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Amphitryon0 committed Jul 20, 2020
1 parent d7cdc7d commit f8f5668
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Binary file added mistake.ico
Binary file not shown.
28 changes: 28 additions & 0 deletions setup-win.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit f8f5668

Please sign in to comment.