mirror of
https://github.com/Relintai/broken_seals_2d.git
synced 2024-11-11 20:35:10 +01:00
Updated the projects setup / build script.
This commit is contained in:
parent
8b72e02c2c
commit
e2476504eb
122
SConstruct
122
SConstruct
@ -46,6 +46,9 @@ exports = {
|
||||
'windows': [],
|
||||
'android': [],
|
||||
'javascript': [],
|
||||
'osx': [],
|
||||
'ios': [],
|
||||
'server': [],
|
||||
}
|
||||
|
||||
additional_commands = {
|
||||
@ -54,6 +57,9 @@ additional_commands = {
|
||||
'windows': [],
|
||||
'android': [],
|
||||
'javascript': [],
|
||||
'osx': [],
|
||||
'ios': [],
|
||||
'server': [],
|
||||
}
|
||||
|
||||
target_commits = {}
|
||||
@ -433,6 +439,14 @@ if len(sys.argv) > 1:
|
||||
build_string += 'debug_symbols=no'
|
||||
build_string += ' '
|
||||
|
||||
if 'threads' in arg_split:
|
||||
build_string += 'threads_enabled=yes'
|
||||
build_string += ' '
|
||||
|
||||
if 'c' in arg:
|
||||
build_string += 'compiledb=yes'
|
||||
build_string += ' '
|
||||
|
||||
target = ' '
|
||||
|
||||
if 'E' in arg:
|
||||
@ -497,67 +511,73 @@ if len(sys.argv) > 1:
|
||||
elif 'i' in arg:
|
||||
build_string += 'platform=iphone'
|
||||
|
||||
subprocess.call(build_string + ' arch=arm', shell=True)
|
||||
subprocess.call(build_string + ' arch=arm64', shell=True)
|
||||
print('Running command: ' + build_string)
|
||||
subprocess.call(build_string, shell=True)
|
||||
|
||||
#subprocess.call('lipo -create bin/libgodot.iphone.{0}.arm.a bin/libgodot.iphone.{0}.arm64.a -output bin/libgodot.iphone.{1}.fat.a'.fomat(), shell=True)
|
||||
#print('Running command: ' + build_string + " arch=arm")
|
||||
#subprocess.call(build_string + ' arch=arm', shell=True)
|
||||
#print('Running command: ' + build_string + " arch=arm64")
|
||||
#subprocess.call(build_string + ' arch=arm64', shell=True)
|
||||
#print('Running command: ' + build_string + " arch=x86_64")
|
||||
#subprocess.call(build_string + ' arch=x86_64', shell=True)
|
||||
elif 'x' in arg:
|
||||
build_string += 'platform=osx'
|
||||
|
||||
#lipo -create bin/libgodot.iphone.opt.debug.arm.a bin/libgodot.iphone.opt.debug.arm64.a -output bin/libgodot.iphone.debug.fat.a
|
||||
#rm bin/ios_xcode/libgodot.iphone.debug.fat.a
|
||||
#cp bin/libgodot.iphone.debug.fat.a bin/ios_xcode/libgodot.iphone.debug.fat.a
|
||||
build_string = get_exports_for('osx') + get_additional_commands_for('osx') + build_string + target
|
||||
|
||||
#lipo -create bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a -output bin/libgodot.iphone.release.fat.a
|
||||
#rm bin/ios_xcode/libgodot.iphone.release.fat.a
|
||||
#cp bin/libgodot.iphone.release.fat.a bin/ios_xcode/libgodot.iphone.release.fat.a
|
||||
print('Running command: ' + build_string)
|
||||
subprocess.call(build_string, shell=True)
|
||||
elif 'h' in arg:
|
||||
#headless
|
||||
build_string += 'platform=server'
|
||||
|
||||
subprocess.call('rm bin/iphone.zip', shell=True)
|
||||
#cd bin/ios_xcode
|
||||
subprocess.call(build_string + ' arch=arm64', shell=True)
|
||||
subprocess.call('zip -r -X ../iphone.zip .', shell=True)
|
||||
build_string = get_exports_for('server') + get_additional_commands_for('server') + build_string
|
||||
|
||||
print('Running command: ' + build_string)
|
||||
|
||||
subprocess.call(build_string, shell=True)
|
||||
|
||||
else:
|
||||
print('No platform specified')
|
||||
exit()
|
||||
|
||||
exit()
|
||||
elif arg[0] == 'p':
|
||||
if arg == 'p':
|
||||
print("Applies a patch. No Patches right now.Append s for the skeleton editor patch. For example: ps ")
|
||||
exit()
|
||||
|
||||
cwd = os.getcwd()
|
||||
full_path = cwd + '/engine/'
|
||||
|
||||
if not os.path.isdir(full_path):
|
||||
print('engine directory does not exists.')
|
||||
exit()
|
||||
|
||||
os.chdir(full_path)
|
||||
|
||||
#apply the patch to just the working directory, without creating a commit
|
||||
|
||||
if 's' in arg:
|
||||
subprocess.call('git apply --index ../patches/custom_skeleton_3d_editor_plugin.patch', shell=True)
|
||||
|
||||
#unstage all files
|
||||
subprocess.call('git reset', shell=True)
|
||||
|
||||
vman_full_path = cwd + '/engine/modules/voxelman/'
|
||||
|
||||
#also patch voxelman as the plugin changes forward_spatial_gui_input's definition
|
||||
if os.path.isdir(vman_full_path):
|
||||
os.chdir(vman_full_path)
|
||||
|
||||
subprocess.call('git apply --index ../../../patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch', shell=True)
|
||||
|
||||
#unstage all files
|
||||
subprocess.call('git reset', shell=True)
|
||||
else:
|
||||
print('Voxelman directory does not exists, skipping patch.')
|
||||
|
||||
|
||||
|
||||
exit()
|
||||
# elif arg[0] == 'p':
|
||||
# if arg == 'p':
|
||||
# print("Applies a patch. No Patches right now.Append s for the skeleton editor patch. For example: ps ")
|
||||
# exit()
|
||||
#
|
||||
# cwd = os.getcwd()
|
||||
# full_path = cwd + '/engine/'
|
||||
#
|
||||
# if not os.path.isdir(full_path):
|
||||
# print('engine directory does not exists.')
|
||||
# exit()
|
||||
#
|
||||
# os.chdir(full_path)
|
||||
#
|
||||
# #apply the patch to just the working directory, without creating a commit
|
||||
#
|
||||
# if 's' in arg:
|
||||
# subprocess.call('git apply --index ../patches/custom_skeleton_3d_editor_plugin.patch', shell=True)
|
||||
#
|
||||
# #unstage all files
|
||||
# subprocess.call('git reset', shell=True)
|
||||
#
|
||||
# vman_full_path = cwd + '/engine/modules/voxelman/'
|
||||
#
|
||||
# #also patch voxelman as the plugin changes forward_spatial_gui_input's definition
|
||||
# if os.path.isdir(vman_full_path):
|
||||
# os.chdir(vman_full_path)
|
||||
#
|
||||
# subprocess.call('git apply --index ../../../patches/fix-voxel-editor-after-the-skeleton-editor-patch.patch', shell=True)
|
||||
#
|
||||
# #unstage all files
|
||||
# subprocess.call('git reset', shell=True)
|
||||
# else:
|
||||
# print('Voxelman directory does not exists, skipping patch.')
|
||||
#
|
||||
# exit()
|
||||
|
||||
opts = Variables(args=ARGUMENTS)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user