Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  copy_plugins.sh   Sprache: Shell

 

#!/bin/bash

function plist_key()
{
    KEY="$1"
    VALUE="$2"
    echo '  <key>'"${KEY}"'</key>'
    echo '  <string>'"${VALUE}"'</string>'
}

function generate_info_plist()
{
    EXECUTABLE_NAME="$1"
    # CFBundleIdentifier only allows alphanumerics, '-' and '.', so the
    # underscores found in some plugin names need to be replaced.
    BUNDLE_ID_NAME="${EXECUTABLE_NAME//_/-}"
    echo '<?xml version="1.0" encoding="UTF-8"?>'
    echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">'
    echo '<plist version="1.0">'
    echo '<dict>'
    plist_key CFBundleDevelopmentRegion "en"
    plist_key CFBundleExecutable "${EXECUTABLE_NAME}"
    plist_key CFBundleIdentifier "org.videolan.vlc.plugins.${BUNDLE_ID_NAME}.framework"
    plist_key CFBundleInfoDictionaryVersion "6.0"
    plist_key CFBundlePackageType "FMWK"
    plist_key CFBundleSignature "???"
    echo '</dict>'
    echo '</plist>'
}

# Parse vlc_modules_list with format: plugin_name: relative/path/to/plugin.dylib
PLUGIN_ENTRIES=()
for arch in ${ARCHS}; do
  while IFS= read -r line; do
    [ -z "$line" ] && continue
    # Check if entry already exists (by plugin name)
    plugin="${line%%: *}"
    found=0
    for entry in "${PLUGIN_ENTRIES[@]}"; do
      if [ "${entry%%: *}" = "$plugin" ]; then
        found=1
        break
      fi
    done
    if [ $found -eq 0 ]; then
      PLUGIN_ENTRIES+=( "$line" )
    fi
  done < "${BUILT_PRODUCTS_DIR}/build-${PLATFORM_NAME}-${arch}/build/modules/vlc_modules_list"
done

for entry in "${PLUGIN_ENTRIES[@]}"; do
    plugin="${entry%%: *}"
    plugin_path="${entry#*: }"
    echo "Copying plugin $plugin for platform ${PLATFORM_NAME}"

    INPUT_FILES=()
    for arch in ${ARCHS}; do
        input_file="${BUILT_PRODUCTS_DIR}/build-${PLATFORM_NAME}-${arch}/build/${plugin_path}"
        if [ ! -f "${input_file}" ]; then
            continue
        fi
        echo " - Adding plugin file ${input_file} for lipo"
        INPUT_FILES+=( "$input_file" )
    done
    FRAMEWORK_DIR="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/${plugin}.framework"
    FRAMEWORK_BIN_PATH="${FRAMEWORK_DIR}/${plugin}"

    for file in "${INPUT_FILES[@]}"; do
        if [ -f "${FRAMEWORK_BIN_PATH}" ] && [ "$file" -ot "${FRAMEWORK_BIN_PATH}" ]; then
            continue
        fi
        mkdir -p "${FRAMEWORK_DIR}"
        lipo -create \
            -output "${FRAMEWORK_BIN_PATH}" \
            "${INPUT_FILES[@]}"
        install_name_tool -change "@rpath/libvlccore.dylib" "@rpath/vlccore.framework/vlccore" \
            "${FRAMEWORK_BIN_PATH}"
        dsymutil -o "${FRAMEWORK_DIR}.dSYM" "${FRAMEWORK_BIN_PATH}"
        generate_info_plist "${plugin}" > "${FRAMEWORK_DIR}/Info.plist"
        if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" ]; then
            codesign --force --sign "${EXPANDED_CODE_SIGN_IDENTITY}" "${FRAMEWORK_DIR}"
        fi
        break
    done
done

Messung
CHZG
829610092

¤ Dauer der Verarbeitung: 0.6 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1104848
#Domains=416959