Skip to content

Commit

Permalink
Codechange: Upgrade build script
Browse files Browse the repository at this point in the history
  • Loading branch information
2TallTyler committed Jan 7, 2024
1 parent ce7a60d commit 3a9a5d9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions make.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@
# Files to place in alphabetical order below
unordered_stuff = ["coal_mine", "iron_mine", "steel_mill", "forest", "sawmill", "building_materials_factory", "factory", "food_processing_plant", "oil_wells", "oil_refinery", "paper_mill", "farm", "ranch", "recycling_center", "bank", "incinerator"]

# Do you want to copy the completed NewGRF to your OpenTTD folder? (True/False)
# Do you want to copy the completed NewGRF to your OpenTTD folder? (If in the typical location at "~/Documents/OpenTTD/newgrf")
copy_bool = True

# What is the path of your OpenTTD folder?
openttd_path = "C:/Users/tyler/Documents/OpenTTD/newgrf"

#################################
# NO NEED TO CHANGE STUFF BELOW #
#################################
Expand All @@ -26,6 +23,10 @@
import codecs
import subprocess
import shutil
import os

# Get the path of a typical OpenTTD installation
openttd_path = os.path.expanduser("~/Documents/OpenTTD/newgrf")

# Create an empty list where all the NML code will be placed
sections = []
Expand Down Expand Up @@ -58,7 +59,7 @@ def append_code(file):
print("#### nmlc ####")

# Run
nmlc = subprocess.run(["nmlc", "-c", "-t", "src\custom_tags.txt", "-l", "src\lang", "--grf", grf_name, merged_nml_path], stdout = subprocess.PIPE, stderr = subprocess.PIPE, text=True)
nmlc = subprocess.run(["nmlc", "-c", "-t", f"src{os.path.sep}custom_tags.txt", "-l", f"src{os.path.sep}lang", "--grf", grf_name, merged_nml_path], stdout = subprocess.PIPE, stderr = subprocess.PIPE, text=True)
print(nmlc.stdout)
print(nmlc.stderr)

Expand Down

0 comments on commit 3a9a5d9

Please sign in to comment.