AddGecko.sh (1368B)
1 #!/bin/sh 2 # This Source Code Form is subject to the terms of the Mozilla Public 3 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 set -e 7 8 # FIXME: This isn't going to work long-term. 9 if test "${ACTION}" != "clean"; then 10 if [ -z "${GECKO_TOPOBJDIR}" ]; then 11 GECKO_TOPOBJDIR=`"${GECKO_TOPSRCDIR}/mach" environment --format=json | python3 -c 'import sys, json; print(json.load(sys.stdin)["topobjdir"])'` 12 if [ -z "${GECKO_TOPOBJDIR}" ]; then 13 echo "Error: Could not determine GECKO_TOPOBJDIR" 14 fi 15 fi 16 17 echo "Copying files from ${GECKO_TOPOBJDIR}/dist/bin" 18 echo "Copying files to $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks" 19 rsync -pvtrlL --delete --exclude "Test*" \ 20 --exclude "test_*" --exclude "*_unittest" \ 21 "${GECKO_TOPOBJDIR}/dist/bin/" "$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks" 22 23 cp "${GECKO_TOPOBJDIR}/dist/include/GeckoView/"*.h "$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Headers/" 24 25 for x in $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks/*.dylib $BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Frameworks/XUL; do 26 echo "Signing $x" 27 codesign --force --sign "${EXPANDED_CODE_SIGN_IDENTITY}" --preserve-metadata=identifier,entitlements,resource-rules $x 28 done 29 fi