forked from vcmi/vcmi-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvcmiconf.py
More file actions
22 lines (19 loc) · 785 Bytes
/
vcmiconf.py
File metadata and controls
22 lines (19 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import sys
import json
import vcmiutil
def updateProjectProps():
replacements = [ vcmiutil.ReplacementEntry("PROJECT_PATH_BASE", "PROJECT_PATH_BASE = " + config["projectRoot"]) ]
vcmiutil.fixFile("./project/gradle.properties", replacements, False)
def createLocalProps():
vcmiutil.rewriteFile("./project/local.properties",
"sdk.dir=" + config["sdkRoot"].replace(":", "\\:")
+ "\nndk.dir=" + config["ndkRoot"].replace(":", "\\:"))
config = []
with open("./vcmiconf.json", "r") as confFile:
try:
config = json.loads(confFile.read())
config["extOutput"] = config["projectRoot"] + "/ext-output"
config["bash"]["extOutput"] = config["bash"]["projectRoot"] + "/ext-output"
except Exception as ex:
print("Could not load config", ex)
sys.exit(1)