diff --git a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuild.cs b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuild.cs index 09760784..6de96a4d 100644 --- a/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuild.cs +++ b/plug-ins/Apple.Core/Apple.Core_Unity/Assets/Apple.Core/Editor/AppleBuild.cs @@ -382,14 +382,14 @@ private static string GenerateEmbedNativeLibraryShellScript(string projectRelati + "dstFrameworkFolder=\"$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH\"\n" + "dstBundleFolder=\"$BUILT_PRODUCTS_DIR/$PLUGINS_FOLDER_PATH\"\n" + $"APPLE_PLUGIN_LIBRARY_ROOT=\"$PROJECT_DIR/{projectRelativeNativeLibraryRoot}\"\n" - + "if [ -d $APPLE_PLUGIN_LIBRARY_ROOT ]; then\n" - + " for folder in \"$APPLE_PLUGIN_LIBRARY_ROOT\"/*; do\n" + + "if [ -d \"$APPLE_PLUGIN_LIBRARY_ROOT\" ]; then\n" + + " for folder in \"$APPLE_PLUGIN_LIBRARY_ROOT\"/*/; do\n" + " if [ -d \"$folder\" ]; then\n" + " for item in \"$folder\"/*; do\n" - + " if [[ $item = *'.dSYM' ]]; then\n" + + " if [[ \"$item\" = *'.dSYM' ]]; then\n" + " continue\n" - + " elif [[ $item = *'.framework' ]]; then\n" - + " filename=$(basename $item)\n" + + " elif [[ \"$item\" = *'.framework' ]]; then\n" + + " filename=$(basename \"$item\")\n" + " echo \" Embedding Apple plug-in framework $filename\"\n" + " echo \" Source: $item\"\n" + " echo \" Destination: $dstFrameworkFolder/$filename\"\n" @@ -397,18 +397,18 @@ private static string GenerateEmbedNativeLibraryShellScript(string projectRelati + " echo \" Code signing identity: $EXPANDED_CODE_SIGN_IDENTITY\"\n" + " codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --timestamp\\=none --generate-entitlement-der $item\n" + " fi\n" - + " ditto $item \"$dstFrameworkFolder/$filename\"\n" + + " ditto \"$item\" \"$dstFrameworkFolder/$filename\"\n" + " break\n" - + " elif [[ $item = *'.bundle' ]]; then\n" - + " filename=$(basename $item)\n" + + " elif [[ \"$item\" = *'.bundle' ]]; then\n" + + " filename=$(basename \"$item\")\n" + " echo \" Embedding Apple plug-in bundle $filename\"\n" + " echo \" Source: $item\"\n" + " echo \" Destination: $dstBundleFolder/$filename\"\n" + " if [ ! -z \"$EXPANDED_CODE_SIGN_IDENTITY\" ]; then\n" + " echo \" Code signing identity: $EXPANDED_CODE_SIGN_IDENTITY\"\n" - + " codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --timestamp\\=none --generate-entitlement-der $item\n" + + " codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --timestamp\\=none --generate-entitlement-der \"$item\"\n" + " fi\n" - + " ditto $item \"$dstBundleFolder/$filename\"\n" + + " ditto \"$item\" \"$dstBundleFolder/$filename\"\n" + " break\n" + " fi\n" + " done\n" @@ -432,40 +432,40 @@ private static string GenerateEmbedNativeLibraryShellScript(string projectRelati + "echo \"Embed framework destination folder: $dstFrameworkFolder\"\n" + "echo \"Embed bundle destination folder: $dstBundleFolder\"\n" + $"APPLE_PLUGIN_LIBRARY_ROOT=\"$PROJECT_DIR/{projectRelativeNativeLibraryRoot}\"\n" - + "if [ -d $APPLE_PLUGIN_LIBRARY_ROOT ]; then\n" + + "if [ -d \"$APPLE_PLUGIN_LIBRARY_ROOT\" ]; then\n" + " echo \"Found Apple plug-in native library root: $APPLE_PLUGIN_LIBRARY_ROOT\"\n" + " echo \"Iterating through contents.\"\n" - + " for folder in \"$APPLE_PLUGIN_LIBRARY_ROOT\"/*; do\n" + + " for folder in \"$APPLE_PLUGIN_LIBRARY_ROOT\"/*/; do\n" + " if [ -d \"$folder\" ]; then\n" + " echo \" Discovered potential plug-in library folder: $folder\"\n" + " echo \" Iterating through contents.\"\n" + " for item in \"$folder\"/*; do\n" + " echo \" Found item: $item\"\n" + " echo \" Checking to see if it's a .framework, if so will embed in destination folder.\"\n" - + " if [[ $item = *'.dSYM' ]]; then\n" + + " if [[ \"$item\" = *'.dSYM' ]]; then\n" + " echo \" Debug symbol (.dSYM) file found. Continuing.\"\n" + " continue\n" - + " elif [[ $item = *'.framework' ]]; then\n" - + " filename=$(basename $item)\n" + + " elif [[ \"$item\" = *'.framework' ]]; then\n" + + " filename=$(basename \"$item\")\n" + " echo \" Embedding Apple plug-in framework $filename\"\n" + " echo \" Source: $item\"\n" + " echo \" Destination: $dstFrameworkFolder/$filename\"\n" + " if [ ! -z \"$EXPANDED_CODE_SIGN_IDENTITY\" ]; then\n" + " echo \" Code signing identity: $EXPANDED_CODE_SIGN_IDENTITY\"\n" - + " codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --timestamp\\=none --generate-entitlement-der $item\n" + + " codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --timestamp\\=none --generate-entitlement-der \"$item\"\n" + " fi\n" - + " ditto $item \"$dstFrameworkFolder/$filename\"\n" + + " ditto \"$item\" \"$dstFrameworkFolder/$filename\"\n" + " break\n" - + " elif [[ $item = *'.bundle' ]]; then\n" - + " filename=$(basename $item)\n" + + " elif [[ \"$item\" = *'.bundle' ]]; then\n" + + " filename=$(basename \"$item\")\n" + " echo \" Embedding Apple plug-in bundle $filename\"\n" + " echo \" Source: $item\"\n" + " echo \" Destination: $dstBundleFolder/$filename\"\n" + " if [ ! -z \"$EXPANDED_CODE_SIGN_IDENTITY\" ]; then\n" + " echo \" Code signing identity: $EXPANDED_CODE_SIGN_IDENTITY\"\n" - + " codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --timestamp\\=none --generate-entitlement-der $item\n" + + " codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --timestamp\\=none --generate-entitlement-der \"$item\"\n" + " fi\n" - + " ditto $item \"$dstBundleFolder/$filename\"\n" + + " ditto \"$item\" \"$dstBundleFolder/$filename\"\n" + " break\n" + " fi\n" + " done\n"