-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_data.py
28 lines (26 loc) · 1.02 KB
/
install_data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import appdirs
import shutil
import os
program_dir = str(appdirs.user_config_dir(appname='Bane-Of-Wargs'))
try:
print("$PROGRAM_DIR = " + program_dir)
print("Installing vanilla data files...")
data_files = os.listdir("data")
for f in data_files:
shutil.copy2(os.path.join("data",f), program_dir + "/game/data")
print("Installing vanilla txt images files...")
data_files = os.listdir("imgs")
for f in data_files:
shutil.copy2(os.path.join("imgs",f), program_dir + "/game/imgs")
print("Installing vanilla schemas files...")
data_files = os.listdir("schemas")
for f in data_files:
shutil.copy2(os.path.join("schemas",f), program_dir + "/game/schemas")
print("Installing vanilla scripts files...")
data_files = os.listdir("scripts")
for f in data_files:
shutil.copy2(os.path.join("scripts",f), program_dir + "/game/scripts")
print("Installing credits file...")
shutil.copy2("credits.txt", program_dir + "/game/docs")
except Exception as e:
print(e)