2016-10-27 01:11:11 +02:00
|
|
|
import armutils
|
2016-10-19 13:28:06 +02:00
|
|
|
import subprocess
|
|
|
|
|
|
|
|
def kode_studio():
|
2016-10-27 01:11:11 +02:00
|
|
|
sdk_path = armutils.get_sdk_path()
|
|
|
|
project_path = armutils.get_fp()
|
2016-10-19 13:28:06 +02:00
|
|
|
|
2016-10-27 01:11:11 +02:00
|
|
|
if armutils.get_os() == 'win':
|
2016-11-01 12:02:58 +01:00
|
|
|
kode_path = sdk_path + '/win32/Kode Studio.exe'
|
2016-10-27 01:11:11 +02:00
|
|
|
elif armutils.get_os() == 'mac':
|
2016-11-01 12:02:58 +01:00
|
|
|
kode_path = '"' + sdk_path + '/Kode Studio.app/Contents/MacOS/Electron"'
|
2016-10-19 13:28:06 +02:00
|
|
|
else:
|
2016-11-01 12:02:58 +01:00
|
|
|
kode_path = sdk_path + '/linux64/kodestudio'
|
2016-10-19 13:28:06 +02:00
|
|
|
|
2016-10-31 23:16:48 +01:00
|
|
|
subprocess.Popen([kode_path, armutils.get_fp()], shell=True)
|
2016-10-19 13:28:06 +02:00
|
|
|
|
|
|
|
def def_strings_to_array(strdefs):
|
|
|
|
defs = strdefs.split('_')
|
|
|
|
defs = defs[1:]
|
|
|
|
defs = ['_' + d for d in defs] # Restore _
|
|
|
|
return defs
|
|
|
|
|
|
|
|
def get_kha_target(target_name): # TODO: remove
|
|
|
|
if target_name == 'macos':
|
|
|
|
return 'osx'
|
|
|
|
return target_name
|