Skip to content

Commit

Permalink
Updated server to support XCode 15.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JCash committed Nov 6, 2023
1 parent 07519c5 commit d252371
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 24 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ The stand-alone server is currently used on a machine runing macOS. The server i
### Prerequisites
Ensure that you have the following tools packaged

* macOS 12.1
* XCode 13.2.1
* iOS SDK 15.2
* Clang 13.0.0
* Swift 5.5
* macOS
* XCode
* iOS SDK
* Clang 13.0.0
* Swift

NOTE: Above requirements taken [from the Dockerfile](https://github.com/defold/extender/blob/dev/server/docker-base/Dockerfile#L436-L441). Double-check that they are still accurate!
NOTE: Above requirements taken [from the Dockerfile](https://github.com/defold/extender/blob/dev/server/docker-base/Dockerfile#L436-L441). Double-check that they are still accurate! Also see `server/scripts/standalone/service-standalone.sh`.

### Run
To run the stand-alone server locally, you need to give it access to `/usr/local/extender`:
Expand Down Expand Up @@ -154,4 +154,4 @@ Use the `rebuild-and-run-standalone-local.sh` script to quickly rebuild and laun
$ ./server/scripts/rebuild-and-run-standalone-local.sh /path/to/localextender
```

This will set the `TARGET_DIR` environment variable to `/path/to/localextender`, stop any currently running server, build a new one, deploy and start it and show the server log in the console.
This will set the `TARGET_DIR` environment variable to `/path/to/localextender`, stop any currently running server, build a new one, deploy and start it and show the server log in the console.
15 changes: 6 additions & 9 deletions server/scripts/standalone/service-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,27 @@ export JAVA_HOME=`/usr/libexec/java_home`
# From Dockerfile
# Also update setup-standalone-server.sh

# Versions from >=1.2.191
export XCODE_13_VERSION=13.2.1
export MACOS_12_VERSION=12.1
export IOS_15_VERSION=15.2
export XCODE_13_CLANG_VERSION=13.0.0
export LIB_TAPI_1_6_PATH=/usr/local/tapi1.6/lib

# Versions from >=1.4.4
export XCODE_14_VERSION=14.2
export XCODE_14_CLANG_VERSION=14.0.0
export MACOS_13_VERSION=13.1
export IOS_16_VERSION=16.2
export XCODE_14_CLANG_VERSION=14.0.0
export SWIFT_5_5_VERSION=5.5
export IOS_VERSION_MIN=11.0
export MACOS_VERSION_MIN=10.13

# Versions from >=1.6.2
export XCODE_15_VERSION=15.0.1
export XCODE_15_CLANG_VERSION=15.0.0

# Added 1.4.9
export ZIG_PATH_0_11=${PLATFORMSDK_DIR}/zig-0-11

export EXTENSION_PODFILE_TEMPLATE=${EXTENDER_DIR}/current/template.podfile
export EXTENSION_MODULEMAP_TEMPLATE=${EXTENDER_DIR}/current/template.modulemap

# We need access to the toolchain binary path from within the application
export PATH=${PLATFORMSDK_DIR}/XcodeDefault${XCODE_14_VERSION}.xctoolchain/usr/bin:/usr/local/bin:${PATH}
export PATH=${PLATFORMSDK_DIR}/XcodeDefault${XCODE_15_VERSION}.xctoolchain/usr/bin:/usr/local/bin:${PATH}

start_service() {
echo "${SERVICE_NAME} starting..."
Expand Down
4 changes: 4 additions & 0 deletions server/scripts/standalone/setup-standalone-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ function download_package() {
if [ "XcodeDefault14.2.xctoolchain.darwin" == "$package_name" ]; then
out_package_name="XcodeDefault14.2.xctoolchain"
fi
if [ "XcodeDefault15.0.1.xctoolchain.darwin" == "$package_name" ]; then
out_package_name="XcodeDefault15.0.1.xctoolchain"
fi

if [[ ! -e ${PLATFORMSDK_DIR}/${out_package_name} ]]; then
mkdir -p ${TMP_DOWNLOAD_DIR}
Expand Down Expand Up @@ -97,6 +100,7 @@ PACKAGES=(
iPhoneSimulator16.2.sdk
MacOSX13.1.sdk
XcodeDefault14.2.xctoolchain.darwin
XcodeDefault15.0.1.xctoolchain.darwin
)

ZIG_VERSION=0.11.0
Expand Down
4 changes: 2 additions & 2 deletions server/src/test/java/com/defold/extender/ExtenderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ static Map<String, String> createEnv()
// TODO: Read these from the Dockerfile itself
env.put("PLATFORMSDK_DIR", "/opt/platformsdk");
env.put("MANIFEST_MERGE_TOOL", "/opt/local/bin/manifestmergetool.jar");
env.put("XCODE_14_VERSION", "14.2");
env.put("XCODE_15_VERSION", "15.0.1");
env.put("XCODE_15_CLANG_VERSION", "15.0.0");
env.put("IOS_16_VERSION", "16.2");
env.put("LIB_TAPI_1_6_PATH", "/usr/local/tapi1.6/lib");
env.put("MACOS_13_VERSION", "13.1");
env.put("MACOS_VERSION_MIN", "10.13");
env.put("XCODE_14_CLANG_VERSION", "14.0.0");
env.put("SWIFT_5_5_VERSION", "5.5");
env.put("SYSROOT", "/opt/platformsdk/MacOSX13.1.sdk");
env.put("LD_LIBRARY_PATH", "/usr/local/tapi1.6/lib");
Expand Down
8 changes: 4 additions & 4 deletions server/test-data/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ ANDROID_64_NDK_API_VERSION='21'
ANDROID_SYS_ROOT=${ANDROID_NDK}/toolchains/llvm/prebuilt/${HOST}-x86_64/sysroot
ANDROID_INCLUDE_ARCH=${ANDROID_NDK}/sources/android/cpufeatures

IOS_GCC=${DYNAMO_HOME}/ext/SDKs/XcodeDefault14.2.xctoolchain/usr/bin/clang++
IOS_AR=${DYNAMO_HOME}/ext/SDKs/XcodeDefault14.2.xctoolchain/usr/bin/ar
IOS_GCC=${DYNAMO_HOME}/ext/SDKs/XcodeDefault15.0.1.xctoolchain/usr/bin/clang++
IOS_AR=${DYNAMO_HOME}/ext/SDKs/XcodeDefault15.0.1.xctoolchain/usr/bin/ar
IOS_MIN_VERSION=11.0
IOS_SYS_ROOT=${DYNAMO_HOME}/ext/SDKs/iPhoneOS16.2.sdk

OSX_GCC=${DYNAMO_HOME}/ext/SDKs/XcodeDefault14.2.xctoolchain/usr/bin/clang++
OSX_AR=${DYNAMO_HOME}/ext/SDKs/XcodeDefault14.2.xctoolchain/usr/bin/ar
OSX_GCC=${DYNAMO_HOME}/ext/SDKs/XcodeDefault15.0.1.xctoolchain/usr/bin/clang++
OSX_AR=${DYNAMO_HOME}/ext/SDKs/XcodeDefault15.0.1.xctoolchain/usr/bin/ar
OSX_MIN_VERSION=10.13
OSX_SYS_ROOT=${DYNAMO_HOME}/ext/SDKs/MacOSX13.1.sdk

Expand Down
5 changes: 3 additions & 2 deletions server/test-data/sdk/a/defoldsdk/extender/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ platforms:

x86_64-osx:
env:
PATH: "{{env.PLATFORMSDK_DIR}}/XcodeDefault{{env.XCODE_15_VERSION}}.xctoolchain/usr/bin:{{env.PATH}}"
PLATFORMSDK_DIR: "{{env.PLATFORMSDK_DIR}}"
MANIFEST_MERGE_TOOL: "{{env.MANIFEST_MERGE_TOOL}}"
XCODE_VERSION: "{{env.XCODE_14_VERSION}}"
XCODE_CLANG_VERSION: "{{env.XCODE_14_CLANG_VERSION}}"
XCODE_VERSION: "{{env.XCODE_15_VERSION}}"
XCODE_CLANG_VERSION: "{{env.XCODE_15_CLANG_VERSION}}"
MACOS_VERSION: "{{env.MACOS_13_VERSION}}"
MACOS_VERSION_MIN: "{{env.MACOS_VERSION_MIN}}"
SWIFT_VERSION: "{{env.SWIFT_5_5_VERSION}}"
Expand Down

0 comments on commit d252371

Please sign in to comment.