-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix plugins not being embedded when path contains spaces #44
base: main
Are you sure you want to change the base?
Conversation
Up @AdamSzApple |
+ " 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" | ||
+ " continue\n" | ||
+ " elif [[ $item = *'.framework' ]]; then\n" | ||
+ " filename=$(basename $item)\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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Xaverix this line (and others) also reference $item
directly, could that cause problems too? If so, can you please also fix this and the other lines that reference $item
without the double quotes??
@VMaldecoasago I have added quotes around the $item in the missing places. Some of them I left on purpose as they're already in string. Tested it both on path with and without spaces. There still was an issue with codesigning. For some reason the app uploaded and worked properly. Now the codesigning is fixed too. |
That's amazing, thank you @Xaverix ! |
Thanks, we are aware of this issue. |
When building for macOS, Unity generates Xcode project folder based on the Product Name. If Product Name contains spaces then the path will contain them too. Currently the script does not handle paths with spaces and will return exit code 1 during its build phase.
There are already some other Pull Requests (#31 or #38) that address this issue but they only focus on changing
$APPLE_PLUGIN_LIBRARY_ROOT
, the build then runs fine (exit code of the build phase is 0) but the libraries are not getting embedded because of the error when running ditto command.