Skip to content

Commit a3068a8

Browse files
committed
[[ Xcode Config ]] Use legacy build system
This patch copies into the Xcode projects a plist which makes Xcode use its legacy build system as the projects generated by our gyp version are not compatible with the new build system.
1 parent a5e000a commit a3068a8

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

config.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import re
2121
import os
2222
import subprocess
23+
import shutil
2324

2425
# The set of platforms for which this branch supports automated builds
2526
BUILDBOT_PLATFORM_TRIPLES = (
@@ -789,6 +790,7 @@ def configure_mac(opts):
789790
validate_target_arch(opts)
790791
validate_xcode_sdks(opts)
791792
validate_java_tools(opts)
793+
copy_workspace_settings(opts)
792794

793795
args = core_gyp_args(opts) + ['-Dtarget_sdk=' + opts['XCODE_TARGET_SDK'],
794796
'-Dhost_sdk=' + opts['XCODE_HOST_SDK'],
@@ -815,5 +817,23 @@ def configure(args):
815817
}
816818
configure_procs[opts['OS']](opts)
817819

820+
def copy_workspace_settings(opts):
821+
validate_gyp_settings(opts)
822+
if opts['BUILD_EDITION'] == 'commercial':
823+
project = os.path.join(opts['GENERATOR_OUTPUT'], '..', 'livecode-commercial.xcodeproj')
824+
else:
825+
project = os.path.join(opts['GENERATOR_OUTPUT'], 'livecode.xcodeproj')
826+
827+
xcshareddata = os.path.join(project, 'project.xcworkspace', 'xcshareddata')
828+
829+
if not os.path.exists(xcshareddata):
830+
os.makedirs(xcshareddata)
831+
832+
workspacesettingsdest= os.path.join(xcshareddata, 'WorkspaceSettings.xcsettings')
833+
workspacesettingssource = os.path.join('config', 'WorkspaceSettings.xcsettings')
834+
835+
if not os.path.exists(workspacesettingsdest):
836+
shutil.copyfile(workspacesettingssource, workspacesettingsdest)
837+
818838
if __name__ == '__main__':
819839
configure(sys.argv[1:])
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>BuildSystemType</key>
6+
<string>Original</string>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)