kivy / kivy-sdk-packager

Scripts for Kivy SDK generation on Windows, OS X and Linux
MIT License
40 stars 32 forks source link

Spaces in filenames #9

Closed Alamot closed 8 years ago

Alamot commented 9 years ago

The Kivy and the scripts don't deal correctly for filenames with spaces.

In scripts, all variables have to become enclosed with double quotes: e.g rm -rf "$DMG_TEMP" "$STAGING_DIR"

And $1 has to become "$1" everywhere including variables declaration which have already double quotes (e.g. APP_NAME="$(basename "$1" .app)"

Nevertheless, if the name of the filename.app contains spaces then Kivy fails to run:

/Applications/Filename with spaces.app/Contents/Resources/script: line 9: /Applications/Filename: No such file or directory /Applications/Filename with spaces.app/Contents/Resources/script: line 26: /Applications/Filename: No such file or directory /Applications/Filename with spaces.app/Contents/Resources/script: line 26: exec: /Applications/Filename : cannot execute: No such file or directory

The spaces (and other special character) in the filename is a useful feature for Mac OS because this name shows up in the "Applications".