Commit 3e2ed659 authored by Eric Duminil's avatar Eric Duminil
Browse files

Check if SimStadt is installed

parent 87e2bb3d
...@@ -46,7 +46,15 @@ SCRIPT_DIR = Path(__file__).parent ...@@ -46,7 +46,15 @@ SCRIPT_DIR = Path(__file__).parent
WAIT_BETWEEN_DOWNLOADS = 5 # [s] Be nice to LGL Server. WAIT_BETWEEN_DOWNLOADS = 5 # [s] Be nice to LGL Server.
if EXTRACT_REGIONS: if EXTRACT_REGIONS:
SIMSTADT_FOLDER = next(Path.home().glob('Desktop/SimStadt*_0.*/')) try:
SIMSTADT_FOLDER = next(x for x in Path.home().glob('Desktop/SimStadt*_0.*/') if x.is_dir())
print(f"RegionChooser has been found in {SIMSTADT_FOLDER}")
except StopIteration:
exit("No SimStadt installation found!"
"\nPlease copy a SimStadt installation to the desktop,"
"\nset EXTRACT_REGIONS to False,"
"\nor set SIMSTADT_FOLDER manually: SIMSTADT_FOLDER = Path('/path/to/SimStadt')"
)
GML_GLOB = "LoD2_*/LoD2_*.gml" GML_GLOB = "LoD2_*/LoD2_*.gml"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment