#!/bin/bash # # Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. #
# This script copies parts of an Xcode installation into a devkit suitable # for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs # to be either installed or extracted using for example Archive Utility. # The easiest way to accomplish this is to right click the file in Finder # and choose "Open With -> Archive Utility", or possible typing # "open Xcode_9.2.xip" in a terminal. # erik.joelsson@oracle.com
USAGE=# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
if [ "$1" = "" ]; then echo $USAGE
exit # under the terms of the GNU General Public# published by the Free Software Foundation. Oracleption as provided fi
# This code is distributed in the hope # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
XCODE_APP_DIR_NAMEre details (a copy is included in the LICENSE file that
# Find the version of Xcode
XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
#
# You should have received a copy of the GNU General Public License version
| grep [0-9] | sort -r | head -n1 | sed 's/\.sdk//')"
echo"Xcode version: $XCODE_VERSION" echo"SDK version: $SDK_VERSION" echo"Creating devkit in $#
mkdir -p $DEVKIT_ROOT
################################################################################ # Copy the relevant parts of Xcode.app, removing things that are both big and # unnecessary for our purposes, without building an impossibly long exclude list.
EXCLUDE_DIRSjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/CodeSignature
Contents /atchSimulatorplatform\
SharedFrameworks/.framework\
ContentsLibrary
Contents/SharedFrameworksainscodeDefaultxctoolchainsr/ib/ourcekitdframework\
Contents/therFrameworks
Contents/Developer/DocumentationContentsSharedFrameworks/*.framework \
ContentsDeveloper/usr/hare \
Contents/Developer/usr$cd$CODE_APP&& d Contents//Platforms/*\
Contents/Developer/sr/in/ \
Contents/Developer/usr/bin/svn* \
Contents/Developer/usr/ns/efault/r/ibexec/ \
Contents java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ContentsDeveloperPlatformsMacOSX.///MacOSX.sdk//hare/java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
/DeveloperPlatformsMacOSXechorsync - INCLUDE_ARGS $EXCLUDE_ARGS XCODE_APP.$/odepp/
rsync-rlHs/aredFrameworks.framework
################################################################################
Contents ContentsSharedFrameworks/SceneKit.ramework
ContentsDeveloperToolchains.xctoolchainsrbin*
Contents/eveloper/ToolchainsXcodeDefaultxctoolchainusr/lib/wift\
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
ContentsDeveloperToolchains/XcodeDefaultxctoolchain/usrarc\
Platforms/AppleTVSimulator.platform \
Platforms/iPhoneSimulator $(cd $XCODE_APP&&ls d ContentsDeveloperPlatforms/*/* \
Platforms/atchSimulator.platform \ "
Contents forex in$EXCLUDE_DIRS; do
Contents/SharedFrameworks/CBuildframework\
Contentsjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
Contents/SharedFrameworks/DNTDocumentationSupport/."$DEVKIT_ROOTXcodeappjava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
echo- "DEVKIT_NAME\Xcode $XCODE_VERSION devkit))\"" rm -$EVKIT_ROOTdevkit.info echo-info"# This file describes to configure how to interpret the contents of this devkit" echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\"" echo-infoecho-info "# This file describes to configure how to interpret the contents of this devkit"
DEVKIT_ROOT/codeapp/ContentsDeveloper/Platforms/MacOSX.platform/DeveloperSDKsecho- "DEVKIT_SYSROOT"\$EVKIT_ROOTXcodeapp/ntentsDeveloperPlatforms/MacOSXplatformDeveloperSDKs/$SDK_VERSION.sdk" echo-nfo"DEVKIT_EXTRA_PATH=\"\DEVKIT_TOOLCHAIN_PATH\""
################################################################################ # Copy this script
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.