forked from LeenkxTeam/LNXSDK
Merge pull request 'main' (#3) from Gorochu/LNXSDK:main into main
Reviewed-on: #3
This commit is contained in:
@ -6,8 +6,8 @@ project.addIncludeDirs('hl/src', 'hl/include/pcre', 'hl/include/mbedtls/include'
|
|||||||
project.addFiles('hl/include/mbedtls/library/**', 'hl/include/zlib/**', 'hl/libs/fmt/fmt.c', 'hl/libs/fmt/sha1.c', 'hl/libs/ssl/ssl.c');
|
project.addFiles('hl/include/mbedtls/library/**', 'hl/include/zlib/**', 'hl/libs/fmt/fmt.c', 'hl/libs/fmt/sha1.c', 'hl/libs/ssl/ssl.c');
|
||||||
|
|
||||||
if (platform == Platform.OSX) {
|
if (platform == Platform.OSX) {
|
||||||
project.addDefine('KINC_DEBUGDIR="macos-hl"');
|
// TODO: Wrong hashlink folder path, remove and check also for ios
|
||||||
project.addDefine('KINC_DEBUGDIR="osx-hl"');
|
project.addDefine('KINC_DEBUGDIR=""');
|
||||||
}
|
}
|
||||||
if (platform == Platform.iOS) project.addDefine('KINC_DEBUGDIR="ios-hl"');
|
if (platform == Platform.iOS) project.addDefine('KINC_DEBUGDIR="ios-hl"');
|
||||||
if (platform !== Platform.Windows || audio !== AudioApi.DirectSound) {
|
if (platform !== Platform.Windows || audio !== AudioApi.DirectSound) {
|
||||||
|
|||||||
Binary file not shown.
@ -242,6 +242,7 @@ function checkKorePlatform(platform) {
|
|||||||
|| platform === 'windowsapp'
|
|| platform === 'windowsapp'
|
||||||
|| platform === 'ios'
|
|| platform === 'ios'
|
||||||
|| platform === 'osx'
|
|| platform === 'osx'
|
||||||
|
|| platform === 'macos'
|
||||||
|| platform === 'android'
|
|| platform === 'android'
|
||||||
|| platform === 'linux'
|
|| platform === 'linux'
|
||||||
|| platform === 'emscripten'
|
|| platform === 'emscripten'
|
||||||
@ -256,7 +257,9 @@ function checkKorePlatform(platform) {
|
|||||||
}
|
}
|
||||||
function koreplatform(platform) {
|
function koreplatform(platform) {
|
||||||
if (platform.endsWith('-hl'))
|
if (platform.endsWith('-hl'))
|
||||||
return platform.substr(0, platform.length - '-hl'.length);
|
platform = platform.substr(0, platform.length - '-hl'.length);
|
||||||
|
if (platform === 'macos')
|
||||||
|
return 'osx'; // krafix only recognizes osx, not macos
|
||||||
else
|
else
|
||||||
return platform;
|
return platform;
|
||||||
}
|
}
|
||||||
@ -413,7 +416,7 @@ async function exportKhaProject(options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let shaderCompiler = new ShaderCompiler_1.ShaderCompiler(exporter, baseTarget, options.krafix, shaderDir, temp, buildDir, options, project.shaderMatchers);
|
let shaderCompiler = new ShaderCompiler_1.ShaderCompiler(exporter, options.target, options.krafix, shaderDir, temp, buildDir, options, project.shaderMatchers);
|
||||||
lastShaderCompiler = shaderCompiler;
|
lastShaderCompiler = shaderCompiler;
|
||||||
try {
|
try {
|
||||||
if (baseTarget !== Platform_1.Platform.Java && baseTarget !== Platform_1.Platform.WPF) {
|
if (baseTarget !== Platform_1.Platform.Java && baseTarget !== Platform_1.Platform.WPF) {
|
||||||
|
|||||||
@ -273,6 +273,7 @@ function checkKorePlatform(platform: string) {
|
|||||||
|| platform === 'windowsapp'
|
|| platform === 'windowsapp'
|
||||||
|| platform === 'ios'
|
|| platform === 'ios'
|
||||||
|| platform === 'osx'
|
|| platform === 'osx'
|
||||||
|
|| platform === 'macos'
|
||||||
|| platform === 'android'
|
|| platform === 'android'
|
||||||
|| platform === 'linux'
|
|| platform === 'linux'
|
||||||
|| platform === 'emscripten'
|
|| platform === 'emscripten'
|
||||||
@ -287,8 +288,12 @@ function checkKorePlatform(platform: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function koreplatform(platform: string) {
|
function koreplatform(platform: string) {
|
||||||
if (platform.endsWith('-hl')) return platform.substr(0, platform.length - '-hl'.length);
|
if (platform.endsWith('-hl'))
|
||||||
else return platform;
|
platform = platform.substr(0, platform.length - '-hl'.length);
|
||||||
|
if (platform === 'macos')
|
||||||
|
return 'osx'; // krafix only recognizes osx, not macos
|
||||||
|
else
|
||||||
|
return platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
let kore = false;
|
let kore = false;
|
||||||
|
|||||||
@ -148,8 +148,8 @@ def invalidate_shader_cache(self, context):
|
|||||||
shutil.rmtree(fp + '/windows-resources', onerror=remove_readonly)
|
shutil.rmtree(fp + '/windows-resources', onerror=remove_readonly)
|
||||||
if os.path.isdir(fp + '/linux-resources'):
|
if os.path.isdir(fp + '/linux-resources'):
|
||||||
shutil.rmtree(fp + '/linux-resources', onerror=remove_readonly)
|
shutil.rmtree(fp + '/linux-resources', onerror=remove_readonly)
|
||||||
if os.path.isdir(fp + '/osx-resources'):
|
if os.path.isdir(fp + '/macos-resources'):
|
||||||
shutil.rmtree(fp + '/osx-resources', onerror=remove_readonly)
|
shutil.rmtree(fp + '/macos-resources', onerror=remove_readonly)
|
||||||
|
|
||||||
def invalidate_compiled_data(self, context):
|
def invalidate_compiled_data(self, context):
|
||||||
global invalidate_enabled
|
global invalidate_enabled
|
||||||
|
|||||||
@ -225,6 +225,8 @@ def export_data_impl(fp, sdk_path):
|
|||||||
shutil.rmtree(build_dir + '/linux-resources', onerror=remove_readonly)
|
shutil.rmtree(build_dir + '/linux-resources', onerror=remove_readonly)
|
||||||
if os.path.isdir(build_dir + '/osx-resources'):
|
if os.path.isdir(build_dir + '/osx-resources'):
|
||||||
shutil.rmtree(build_dir + '/osx-resources', onerror=remove_readonly)
|
shutil.rmtree(build_dir + '/osx-resources', onerror=remove_readonly)
|
||||||
|
if os.path.isdir(build_dir + '/macos-resources'):
|
||||||
|
shutil.rmtree(build_dir + '/macos-resources', onerror=remove_readonly)
|
||||||
if os.path.isdir(build_dir + '/compiled/Shaders'):
|
if os.path.isdir(build_dir + '/compiled/Shaders'):
|
||||||
shutil.rmtree(build_dir + '/compiled/Shaders', onerror=remove_readonly)
|
shutil.rmtree(build_dir + '/compiled/Shaders', onerror=remove_readonly)
|
||||||
|
|
||||||
@ -531,7 +533,7 @@ def build(target, is_play=False, is_publish=False, is_export=False):
|
|||||||
target = 'windows-hl'
|
target = 'windows-hl'
|
||||||
elif current_os == 'linux':
|
elif current_os == 'linux':
|
||||||
target = 'linux-hl'
|
target = 'linux-hl'
|
||||||
elif current_os == 'mac' or current_os == 'macos':
|
elif current_os == 'mac' or current_os == 'osx' or current_os == 'macos':
|
||||||
target = 'macos-hl'
|
target = 'macos-hl'
|
||||||
else:
|
else:
|
||||||
log.error(f"Unsupported OS '{current_os}' for Hashlink runtime.")
|
log.error(f"Unsupported OS '{current_os}' for Hashlink runtime.")
|
||||||
@ -1312,7 +1314,7 @@ def build_success():
|
|||||||
if target_name == 'html5':
|
if target_name == 'html5':
|
||||||
project_path = files_path
|
project_path = files_path
|
||||||
print('Exported HTML5 package to ' + project_path)
|
print('Exported HTML5 package to ' + project_path)
|
||||||
elif target_name.startswith('ios') or target_name.startswith('osx'): # TODO: to macos
|
elif target_name.startswith('ios') or target_name.startswith('osx') or target_name.startswith('macos'):
|
||||||
project_path = files_path + '-build'
|
project_path = files_path + '-build'
|
||||||
print('Exported XCode project to ' + project_path)
|
print('Exported XCode project to ' + project_path)
|
||||||
elif target_name.startswith('windows'):
|
elif target_name.startswith('windows'):
|
||||||
|
|||||||
@ -43,6 +43,8 @@ def update_gapi_linux(self, context):
|
|||||||
def update_gapi_mac(self, context):
|
def update_gapi_mac(self, context):
|
||||||
if os.path.isdir(lnx.utils.get_fp_build() + '/osx-build'):
|
if os.path.isdir(lnx.utils.get_fp_build() + '/osx-build'):
|
||||||
shutil.rmtree(lnx.utils.get_fp_build() + '/osx-build', onerror=remove_readonly)
|
shutil.rmtree(lnx.utils.get_fp_build() + '/osx-build', onerror=remove_readonly)
|
||||||
|
if os.path.isdir(lnx.utils.get_fp_build() + '/macos-hl-build'):
|
||||||
|
shutil.rmtree(lnx.utils.get_fp_build() + '/macos-hl-build', onerror=remove_readonly)
|
||||||
bpy.data.worlds['Lnx'].lnx_recompile = True
|
bpy.data.worlds['Lnx'].lnx_recompile = True
|
||||||
assets.invalidate_compiled_data(self, context)
|
assets.invalidate_compiled_data(self, context)
|
||||||
|
|
||||||
|
|||||||
@ -368,7 +368,7 @@ def get_node_path():
|
|||||||
return get_sdk_path() + '/nodejs/node.exe'
|
return get_sdk_path() + '/nodejs/node.exe'
|
||||||
elif get_os() == 'mac':
|
elif get_os() == 'mac':
|
||||||
import platform
|
import platform
|
||||||
node_bin = 'node-macos_arm64' if platform.machine() == 'arm64' else 'node-osx'
|
node_bin = 'node-macos_arm64' if platform.machine() == 'arm64' else 'node-macos_x64'
|
||||||
return get_sdk_path() + f'/nodejs/{node_bin}'
|
return get_sdk_path() + f'/nodejs/{node_bin}'
|
||||||
else:
|
else:
|
||||||
return get_sdk_path() + '/nodejs/node-linux64'
|
return get_sdk_path() + '/nodejs/node-linux64'
|
||||||
@ -1072,8 +1072,8 @@ def def_strings_to_array(strdefs):
|
|||||||
return defs
|
return defs
|
||||||
|
|
||||||
def get_kha_target(target_name): # TODO: remove
|
def get_kha_target(target_name): # TODO: remove
|
||||||
if target_name == 'macos-hl':
|
if target_name == 'osx-hl' or target_name == 'macos-hl':
|
||||||
return 'osx-hl'
|
return 'macos-hl'
|
||||||
elif target_name.startswith('krom'): # krom-windows
|
elif target_name.startswith('krom'): # krom-windows
|
||||||
return 'krom'
|
return 'krom'
|
||||||
elif target_name == 'custom':
|
elif target_name == 'custom':
|
||||||
|
|||||||
Reference in New Issue
Block a user