Skip to content

Commit

Permalink
DEF-2778 Updated sdks to iPhoneOS10.3 and MacOSX10.12 (#49)
Browse files Browse the repository at this point in the history
* Kept backwards compatibility to iPhoneOS9.3 and MacOSX10.11
  • Loading branch information
mathiaswking authored Jul 5, 2017
1 parent 495ca90 commit 6ba65cf
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 8 deletions.
43 changes: 38 additions & 5 deletions server/docker-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

# The old install flow (Kept for backwards compatibility until all builds are done using darwin12)
RUN \
apt-get update && \
apt-get install -y git && \
Expand All @@ -93,16 +94,48 @@ RUN \
make install && \
apt-get remove -y git

# Right now, the package contains iPhoneOS.sdk, in the future, we want iPhoneOS9.3.sdk
# The updated install flow
RUN \
apt-get update && \
apt-get install -y git cmake && \
cd /tmp && \
TPAPITMP=/tmp/tpapi && \
mkdir $TPAPITMP && \
git clone https://github.com/tpoechtrager/apple-libtapi.git && \
cd apple-libtapi && \
INSTALLPREFIX=$TPAPITMP ./build.sh && \
./install.sh && \
git clone https://github.com/tpoechtrager/cctools-port.git && \
cd cctools-port/cctools && \
git checkout 22ebe727a5cdc21059d45313cf52b4882157f6f0 && \
./configure --prefix=/usr/local --target=arm-apple-darwin12 --with-libtapi=$TPAPITMP && \
make -j8 && \
make install && \
make distclean && \
./autogen.sh && \
./configure --prefix=/usr/local --target=x86_64-apple-darwin12 --with-libtapi=$TPAPITMP && \
make -j8 && \
make install && \
apt-get remove -y git cmake


# Keeping iOS 9.3 and MaxOSX 10.11 around for a few weeks (should also remove iPhoneOS.sdk folder)
RUN \
wget -q -O - ${S3_URL}/iPhoneOS9.3.sdk.tar.gz | tar xz -C /opt && \
mv /opt/iPhoneOS.sdk /opt/iPhoneOS9.3.sdk && \
ln -s /opt/iPhoneOS9.3.sdk /opt/iPhoneOS.sdk && \
wget -q -O - ${S3_URL}/iPhoneOS10.3.sdk.tar.gz | tar xz -C /opt && \
mv /opt/iPhoneOS.sdk /opt/iPhoneOS10.3.sdk && \
wget -q -O - ${S3_URL}/MacOSX10.11.sdk.tar.gz | tar xz -C /opt && \
mv /opt/MacOSX.sdk /opt/MacOSX10.11.sdk && \
wget -q -O - ${S3_URL}/MacOSX10.12.sdk.tar.gz | tar xz -C /opt && \
mv /opt/MacOSX.sdk /opt/MacOSX10.12.sdk && \
ln -s /opt/iPhoneOS9.3.sdk /opt/iPhoneOS.sdk && \
ln -s /opt/MacOSX10.11.sdk /opt/MacOSX.sdk && \
ln -s /usr/local/bin/llvm-dsymutil /usr/local/bin/dsymutil && \
ln -s /usr/local/bin/clang /usr/local/bin/arm-apple-darwin11-clang && \
ln -s /usr/local/bin/clang /usr/local/bin/x86_64-apple-darwin11-clang && \
ln -s /usr/local/bin/llvm-ar /usr/local/bin/x86_64-apple-darwin11-clang-ar
ln -s /usr/local/bin/clang /usr/local/bin/arm-apple-darwin12-clang && \
ln -s /usr/local/bin/clang /usr/local/bin/x86_64-apple-darwin12-clang && \
ln -s /usr/local/bin/llvm-ar /usr/local/bin/x86_64-apple-darwin12-clang-ar


# EMSCRIPTEN
RUN apt-get install -y --no-install-recommends python2.7 && \
Expand Down
11 changes: 10 additions & 1 deletion server/test-data/build-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,18 @@ function Copy {
CompileLibsToExtension enginelibs engineext/lib

# # copy these into the "a" sdk
cp -v -r engineext/lib/ sdk/a/defoldsdk/
mkdir -p sdk/a/defoldsdk/lib
cp -v -r engineext/lib/ sdk/a/defoldsdk/lib
rm -rf ./engineext

# # The sdk's has different naming
mv sdk/a/defoldsdk/lib/x86-osx sdk/a/defoldsdk/lib/darwin
mv sdk/a/defoldsdk/lib/x86_64-osx sdk/a/defoldsdk/lib/x86_64-darwin

# Need these folders as well (empty is fine)
mkdir -p sdk/a/defoldsdk/ext/lib/darwin
mkdir -p sdk/a/defoldsdk/ext/lib/x86_64-darwin

CompileLibsToExtension alib ext/lib
CompileLibsToExtension alib ext2/lib
CompileLibsToExtension blib ext2/lib
Expand Down
4 changes: 2 additions & 2 deletions server/test-data/sdk/a/defoldsdk/extender/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ platforms:
sourceRe: '(?i).*(.cpp|.c|.cc|.mm|.m)'
allowedLibs: ['lber','apr-1.0','AVFAudio','netsnmpmibs.25','bsm','form.5.4','tk','QMIParserDynamic','gmalloc','ncurses','heimdal-asn1','iodbcinst','krb5','tidy','curl.4','pmenergy','python2.7','icucore','ecpg','ATCommandStudioDynamic','dtrace_dyld','lzma.5','pcre.0','pgtypes.3.4','pq.5.6','pam.1','netsnmp.5','energytrace','sasl2.2.0.15','python2.6','germantok','cmph','ssh-keychain','xar.1','xml2','pcreposix.0','m','pam.2','apr-1','auto','alias','c++','ipconfig','Match','crypto.35','netsnmpmibs','cups','exslt.0','iodbcinst.2.1.18','pgtypes.3','mx.A','CRFSuite','cupsmime.1','aprutil-1.0','objc.A','edit','crypto.0.9.8','pmsample','des425','gcc_s.10.5','ruby.2.0','crypto.0.9.7','CRFSuite0.12','auditd.0','edit.2','pthread','ecpg.6.5','odfde','tcl8.5','z.1.1.3','netsnmp.5.2.1','cupsppdc.1','util','lapack','extension','ffi','System','iodbcinst.2','dns_services','pcreposix','mx','panel','ldap','readline','IASUnifiedProgress','edit.3','ssl.0.9.7','csfde','python','hunspell-1.2.0.0.0','netsnmp.25','charset.1.0.0','panel.5.4','gssapi_krb5','aprutil-1','cupsimage.2','BSDPClient.A','menu.5.4','info','spindump','marisa','dl','cupsimage','pq.5','com_err','auditd','UniversalAccess','sasl2.2.0.22','ecpg.6','blas','XSEvent','z','form','ktrace','krb5support','DiagnosticMessagesClient','c++abi','expat.1','System_debug','iodbc','tk8.5','Xplugin.1','pcap.A','curl.3','dbm','iconv','ssl','gcc_s.10.4','netsnmp.15.1.2','xar','menu','exslt','odmodule','alias.A','sasl2','charset','sasl2.2','ThaiTokenizer','tidy.A','archive','bz2.1.0.5','netsnmptrapd','ncurses.5.4','pcre','Fosl_dynamic','cblas','pq','System.B_debug','mecab','ipsec.A','ecpg_compat.3.5','f77lapack','cupsppdc','ipsec','netsnmphelpers.25','edit.3.0','tls','z.1.2.5','netsnmp.15','xslt','resolv','sasl2.2.0.1','iconv.2','ecpg_compat','netsnmpagent','krb524','OpenScriptingUtil','dtrace','cupsmime','bz2','AccountPolicyTranslation','netsnmpagent.25','expat','ssl.0.9.8','cups.2','netsnmphelpers','crypto','z.1','netsnmp','sandbox','CoreStorage','util1.0','DHCPServer.A','langid','Match.1','iodbc.2.1.18','xml2.2','quit','prequelite','stdc++.6.0.9','pcap','objc','ecpg_compat.3','ruby','ScreenReader','c++.1','tls.6','System.B','ChineseTokenizer','ssl.35','sqlite3','proc','BSDPClient','k5crypto','network','hunspell-1.2.0','cupscgi.1','sysmon','bz2.1.0','IASAuthReboot','ldap_r','c','termcap','ncurses.5','archive.2','cupscgi','bsm.0','lzma','iconv.2.4.0','xcselect','poll','sandbox.1','gcc_s.1','iodbc.2','curl','Xplugin','krb4','hunspell-1.2','stdc++','netsnmptrapd.25','rpcsvc','pam','clapack','tcl','mecabra','sasl2.2.0.21','resolv.9','compression','charset.1','icucore.A','pgtypes','DHCPServer','systemstats','TelephonyUtilDynamic','ruby.2.0.0','system_notify','system_c','system_secinit','system_dnssd','removefile','system_malloc','system_blocks','copyfile','xpc','mathCommon','unwind','system_platform','dyld','system_network','system_sandbox','dispatch','system_trace','system_info','keymgr','system_kernel','mathCommon.A','system_networkextension','system_coreservices','system_asl','unc','launch','system_coretls','dispatch','system_pthread','system_m','system_configuration','kxld','quarantine','corecrypto','macho','commonCrypto','system_pthread','compiler_rt','cache','sqlite3.0','stdc++.6','xslt.1','mecab.1.0.0','curses','Accelerate','Accounts','AddressBook','AGL','AppKit','AppKitScripting','AppleScriptKit','AppleScriptObjC','ApplicationServices','AudioToolbox','AudioUnit','AudioVideoBridging','Automator','AVFoundation','AVKit','CalendarStore','Carbon','CFNetwork','CloudKit','Cocoa','Collaboration','Contacts','ContactsUI','CoreAudio','CoreAudioKit','CoreBluetooth','CoreData','CoreFoundation','CoreGraphics','CoreImage','CoreLocation','CoreMedia','CoreMediaIO','CoreMIDI','CoreMIDIServer','CoreServices','CoreTelephony','CoreText','CoreVideo','CoreWLAN','CryptoTokenKit','DirectoryService','DiscRecording','DiscRecordingUI','DiskArbitration','DrawSprocket','DVComponentGlue','DVDPlayback','EventKit','ExceptionHandling','FinderSync','ForceFeedback','Foundation','FWAUserLib','GameController','GameKit','GameplayKit','GLKit','GLUT','GSS','Hypervisor','ICADevices','ImageCaptureCore','ImageIO','IMServicePlugIn','InputMethodKit','InstallerPlugins','InstantMessage','IOBluetooth','IOBluetoothUI','IOKit','IOSurface','JavaFrameEmbedding','JavaScriptCore','JavaVM','Kerberos','Kernel','LatentSemanticMapping','LDAP','LocalAuthentication','MapKit','MediaAccessibility','MediaLibrary','MediaToolbox','Message','Metal','MetalKit','ModelIO','MultipeerConnectivity','NetFS','NetworkExtension','NotificationCenter','OpenAL','OpenCL','OpenDirectory','OpenGL','OSAKit','PCSC','Photos','PhotosUI','PreferencePanes','PubSub','Python','QTKit','QuartzCore','Quartz','QuickLook','QuickTime','Ruby','SceneKit','ScreenSaver','ScriptingBridge','Scripting','SecurityFoundation','Security','SecurityInterface','ServiceManagement','Social','SpriteKit','StoreKit','SyncServices','SystemConfiguration','System','Tcl','Tk','TWAIN','vecLib','VideoDecodeAcceleration','VideoToolbox','vmnet','WebKit']
allowedFlags: ["-ObjC","-ObjC++","-Wa,{{comma_separated_arg}}","-W{{warning}}","-ansi","--ansi","-std-default={{arg}}","-stdlib=(libstdc\\+\\+|libc\\+\\+)","-w","-std=(c89|c99|c\\+\\+0x|c\\+\\+11|c\\+\\+14|c\\+\\+17)","-Wp,{{comma_separated_arg}}","-W{{warning}}","--extra-warnings","--warn-{{warning}}","--warn-={{warning}}","-ferror-limit={{number}}","-O([0-4]?|fast|s|z)"]
compileCmd: 'clang++ -c -arch i386 -target x86_64-apple-darwin11 -isysroot /opt/MacOSX.sdk/ -m32 -O2 -g -mmacosx-version-min=10.7 {{#defines}}-D{{{.}}} {{/defines}} {{#flags}}{{{.}}} {{/flags}} {{#ext.includes}}-I{{{.}}} {{/ext.includes}} {{#ext.frameworkPaths}}-F{{{.}}} {{/ext.frameworkPaths}} {{#includes}}-I{{{.}}} {{/includes}} {{src}} -o{{tgt}}'
linkCmd: 'clang++ -arch i386 -target x86_64-apple-darwin11 -isysroot /opt/MacOSX.sdk/ -m32 -O2 -g -mmacosx-version-min=10.7 -o {{tgt}} {{#linkFlags}}{{{.}}} {{/linkFlags}} {{#ext.libPaths}}-L{{{.}}} {{/ext.libPaths}} {{#libs}}-l{{{.}}} {{/libs}} {{#ext.libs}}-l{{{.}}} {{/ext.libs}} {{#ext.frameworkPaths}}-F{{{.}}} {{/ext.frameworkPaths}} {{#ext.frameworks}}-framework {{{.}}} {{/ext.frameworks}} {{#frameworks}}-framework {{{.}}} {{/frameworks}} {{#libPaths}}-L{{{.}}} {{/libPaths}} {{#engineLibs}}-l{{{.}}} {{/engineLibs}} {{#src}}{{{.}}} {{/src}}'
compileCmd: 'clang++ -c -arch i386 -target x86_64-apple-darwin12 -isysroot /opt/MacOSX10.12.sdk/ -m32 -O2 -g -mmacosx-version-min=10.7 {{#defines}}-D{{{.}}} {{/defines}} {{#flags}}{{{.}}} {{/flags}} {{#ext.includes}}-I{{{.}}} {{/ext.includes}} {{#ext.frameworkPaths}}-F{{{.}}} {{/ext.frameworkPaths}} {{#includes}}-I{{{.}}} {{/includes}} {{src}} -o{{tgt}}'
linkCmd: 'clang++ -arch i386 -target x86_64-apple-darwin12 -isysroot /opt/MacOSX10.12.sdk/ -m32 -O2 -g -mmacosx-version-min=10.7 -o {{tgt}} {{#linkFlags}}{{{.}}} {{/linkFlags}} {{#ext.libPaths}}-L{{{.}}} {{/ext.libPaths}} {{#libs}}-l{{{.}}} {{/libs}} {{#ext.libs}}-l{{{.}}} {{/ext.libs}} {{#ext.frameworkPaths}}-F{{{.}}} {{/ext.frameworkPaths}} {{#ext.frameworks}}-framework {{{.}}} {{/ext.frameworks}} {{#frameworks}}-framework {{{.}}} {{/frameworks}} {{#libPaths}}-L{{{.}}} {{/libPaths}} {{#engineLibs}}-l{{{.}}} {{/engineLibs}} {{#src}}{{{.}}} {{/src}}'
libCmd: 'llvm-ar rcs {{tgt}} {{#objs}}{{{.}}} {{/objs}}'

armv7-android:
Expand Down
Binary file modified server/test-data/sdk/a/defoldsdk/lib/arm64-ios/libengine_foo.a
Binary file not shown.
Binary file modified server/test-data/sdk/a/defoldsdk/lib/arm64-ios/libengine_main.a
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified server/test-data/sdk/a/defoldsdk/lib/armv7-ios/libengine_foo.a
Binary file not shown.
Binary file modified server/test-data/sdk/a/defoldsdk/lib/armv7-ios/libengine_main.a
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified server/test-data/sdk/a/defoldsdk/lib/js-web/libengine_foo.a
Binary file not shown.
Binary file modified server/test-data/sdk/a/defoldsdk/lib/js-web/libengine_main.a
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 6ba65cf

Please sign in to comment.