Fix Kha path

This commit is contained in:
Lubos Lenco 2017-10-17 14:45:19 +02:00
parent 5dbcdbf91f
commit ffa3f2cd91
2 changed files with 13 additions and 12 deletions

View file

@ -127,19 +127,19 @@ def get_kha_path():
return 'Kha'
if get_os() == 'win':
return get_sdk_path() + '/win32/Kha'
return get_sdk_path() + '/win32/Kha' # Using symlink on Windows
elif get_os() == 'mac':
return get_sdk_path() + '/Kode Studio.app/Contents/Kha'
return get_sdk_path() + '/Kode Studio.app/Contents/Resources/app/extensions/kha/Kha'
else:
return get_sdk_path() + '/linux64/Kha'
return get_sdk_path() + '/linux64/app/extensions/kha/Kha'
def get_haxe_path():
if get_os() == 'win':
return get_sdk_path() + '/win32/Kha/Tools/haxe/haxe.exe'
return get_kha_path() + '/Tools/haxe/haxe.exe'
elif get_os() == 'mac':
return get_sdk_path() + '/Kode Studio.app/Contents/Kha/Tools/haxe/haxe-osx'
return get_kha_path() + '/Tools/haxe/haxe-osx'
else:
return get_sdk_path() + '/linux64/Kha/Tools/haxe/haxe-linux64'
return get_kha_path() + '/Tools/haxe/haxe-linux64'
def get_khamake_path():
return get_kha_path() + '/make'
@ -147,13 +147,13 @@ def get_khamake_path():
def krom_paths():
sdk_path = get_sdk_path()
if arm.utils.get_os() == 'win':
krom_location = sdk_path + '/win32/Krom/win32'
krom_location = sdk_path + '/win32/Krom/win32' # Using symlink on Windows
krom_path = krom_location + '/Krom.exe'
elif arm.utils.get_os() == 'mac':
krom_location = sdk_path + '/Kode Studio.app/Contents/Krom/macos/Krom.app/Contents/MacOS'
krom_location = sdk_path + '/Kode Studio.app/Contents/Resources/app/extensions/krom/Krom/macos/Krom.app/Contents/MacOS'
krom_path = krom_location + '/Krom'
else:
krom_location = sdk_path + '/linux64/Krom/linux'
krom_location = sdk_path + '/linux64/app/extensions/krom/Krom/linux'
krom_path = krom_location + '/Krom'
return krom_location, krom_path

View file

@ -41,16 +41,17 @@ def write_probes(image_filepath, disable_hdr, cached_num_mips, arm_radiance=True
# Get paths
sdk_path = arm.utils.get_sdk_path()
kha_path = arm.utils.get_kha_path()
if arm.utils.get_os() == 'win':
cmft_path = sdk_path + '/armory/tools/cmft/cmft.exe'
kraffiti_path = sdk_path + '/win32/Kha/Kore/Tools/kraffiti/kraffiti.exe'
kraffiti_path = kha_path + '/Kore/Tools/kraffiti/kraffiti.exe'
elif arm.utils.get_os() == 'mac':
cmft_path = '"' + sdk_path + '/armory/tools/cmft/cmft-osx"'
kraffiti_path = '"' + sdk_path + '/Kode Studio.app/Contents/Kha/Kore/Tools/kraffiti/kraffiti-osx"'
kraffiti_path = '"' + kha_path + '/Kore/Tools/kraffiti/kraffiti-osx"'
else:
cmft_path = '"' + sdk_path + '/armory/tools/cmft/cmft-linux64"'
kraffiti_path = '"' + sdk_path + '/linux64/Kha/Kore/Tools/kraffiti/kraffiti-linux64"'
kraffiti_path = '"' + kha_path + '/Kore/Tools/kraffiti/kraffiti-linux64"'
output_gama_numerator = '2.2' if disable_hdr else '1.0'
input_file = arm.utils.asset_path(image_filepath)