Expose windowsapp target
This commit is contained in:
parent
f786924587
commit
9ac648e49c
|
@ -135,7 +135,8 @@ def export_data(fp, sdk_path, is_play=False, is_publish=False, in_viewport=False
|
|||
write_data.write_compiledglsl()
|
||||
|
||||
# Write khafile.js
|
||||
write_data.write_khafilejs(is_play, export_physics, export_navigation, export_ui, is_publish)
|
||||
enable_dce = is_publish and wrd.arm_dce
|
||||
write_data.write_khafilejs(is_play, export_physics, export_navigation, export_ui, is_publish, enable_dce)
|
||||
|
||||
# Write Main.hx - depends on write_khafilejs for writing number of assets
|
||||
resx, resy = arm.utils.get_render_resolution(arm.utils.get_active_scene())
|
||||
|
@ -428,7 +429,9 @@ def on_compiled(mode): # build, play, play_viewport, publish
|
|||
elif target_name == 'ios' or target_name == 'osx': # TODO: to macos
|
||||
print('XCode project files are located in ' + files_path + '-build')
|
||||
elif target_name == 'windows':
|
||||
print('VisualStudio 2015 project files are located in ' + files_path + '-build')
|
||||
print('VisualStudio 2017 project files are located in ' + files_path + '-build')
|
||||
elif target_name == 'windowsapp':
|
||||
print('VisualStudio 2017 project files are located in ' + files_path + '-build')
|
||||
elif target_name == 'android-native':
|
||||
print('Android Studio project files are located in ' + files_path + '-build/' + arm.utils.safestr(wrd.arm_project_name))
|
||||
else:
|
||||
|
|
|
@ -43,6 +43,8 @@ def target_to_gapi():
|
|||
return 'arm_gapi_mac'
|
||||
elif wrd.arm_project_target == 'windows':
|
||||
return 'arm_gapi_win'
|
||||
elif wrd.arm_project_target == 'windowsapp':
|
||||
return 'arm_gapi_winapp'
|
||||
elif wrd.arm_project_target == 'android-native':
|
||||
return 'arm_gapi_android'
|
||||
else:
|
||||
|
|
|
@ -70,6 +70,12 @@ def update_gapi_win(self, context):
|
|||
bpy.data.worlds['Arm'].arm_recompile = True
|
||||
assets.invalidate_compiled_data(self, context)
|
||||
|
||||
def update_gapi_winapp(self, context):
|
||||
if os.path.isdir(arm.utils.get_fp_build() + '/windowsapp-build'):
|
||||
shutil.rmtree(arm.utils.get_fp_build() + '/windowsapp-build')
|
||||
bpy.data.worlds['Arm'].arm_recompile = True
|
||||
assets.invalidate_compiled_data(self, context)
|
||||
|
||||
def update_gapi_linux(self, context):
|
||||
if os.path.isdir(arm.utils.get_fp_build() + '/linux-build'):
|
||||
shutil.rmtree(arm.utils.get_fp_build() + '/linux-build')
|
||||
|
@ -106,6 +112,7 @@ def init_properties():
|
|||
bpy.types.World.arm_project_target = EnumProperty(
|
||||
items = [('html5', 'HTML5', 'html5'),
|
||||
('windows', 'Windows', 'windows'),
|
||||
('windowsapp', 'WindowsApp', 'windowsapp'),
|
||||
('macos', 'MacOS', 'macos'),
|
||||
('linux', 'Linux', 'linux'),
|
||||
('ios', 'iOS', 'ios'),
|
||||
|
@ -179,6 +186,7 @@ def init_properties():
|
|||
name="Runtime", description="Player runtime used when launching in new window", default='Krom', update=assets.invalidate_shader_cache)
|
||||
bpy.types.World.arm_loadbar = BoolProperty(name="Load Bar", description="Show asset loading progress on published builds", default=True)
|
||||
bpy.types.World.arm_vsync = BoolProperty(name="VSync", description="Vertical Synchronization", default=True)
|
||||
bpy.types.World.arm_dce = BoolProperty(name="DCE", description="Enable dead code elimination for publish builds", default=True)
|
||||
bpy.types.World.arm_winmode = EnumProperty(
|
||||
items = [('Window', 'Window', 'Window'),
|
||||
('BorderlessWindow', 'Borderless', 'BorderlessWindow'),
|
||||
|
@ -192,6 +200,10 @@ def init_properties():
|
|||
('direct3d11', 'Direct3D11', 'direct3d11'),
|
||||
('direct3d12', 'Direct3D12', 'direct3d12')],
|
||||
name="Graphics API", default='opengl', description='Based on currently selected target', update=update_gapi_win)
|
||||
bpy.types.World.arm_gapi_winapp = EnumProperty(
|
||||
items = [('direct3d11', 'Auto', 'direct3d11'),
|
||||
('direct3d11', 'Direct3D11', 'direct3d11')],
|
||||
name="Graphics API", default='direct3d11', description='Based on currently selected target', update=update_gapi_winapp)
|
||||
bpy.types.World.arm_gapi_linux = EnumProperty(
|
||||
items = [('opengl', 'Auto', 'opengl'),
|
||||
('opengl', 'OpenGL', 'opengl'),
|
||||
|
|
|
@ -451,6 +451,7 @@ class ArmoryProjectPanel(bpy.types.Panel):
|
|||
row.operator("arm.publish_project")
|
||||
layout.prop(wrd, 'arm_project_target')
|
||||
layout.prop(wrd, make_utils.target_to_gapi())
|
||||
layout.prop(wrd, 'arm_dce')
|
||||
|
||||
layout.label("Libraries")
|
||||
rows = 2
|
||||
|
|
|
@ -23,7 +23,7 @@ def add_assets(path):
|
|||
return 'project.addAssets("' + path + '");\n'
|
||||
|
||||
# Write khafile.js
|
||||
def write_khafilejs(is_play, export_physics, export_navigation, export_ui, is_publish):
|
||||
def write_khafilejs(is_play, export_physics, export_navigation, export_ui, is_publish, enable_dce):
|
||||
global check_dot_path
|
||||
|
||||
sdk_path = arm.utils.get_sdk_path()
|
||||
|
@ -86,7 +86,7 @@ project.addSources('Sources');
|
|||
recastjs_path = recastjs_path.replace('\\', '/')
|
||||
f.write(add_assets(recastjs_path))
|
||||
|
||||
if is_publish:
|
||||
if enable_dce:
|
||||
f.write("project.addParameter('-dce full');")
|
||||
|
||||
shaderload = state.target == 'krom' or state.target == 'html5'
|
||||
|
|
Loading…
Reference in a new issue