Skip to content

Commit

Permalink
[MacOS] Fixed SynfigStudio.app won't start if renamed (or contain spa…
Browse files Browse the repository at this point in the history
…ces in name) (#1834)
  • Loading branch information
ice0 authored Nov 12, 2020
1 parent 03ab84d commit 5ad6ac5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion autobuild/osx/app-template/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>

<key>LSMultipleInstancesProhibited</key>
<true/>

<key>CFBundleDevelopmentRegion</key>
<string>English</string>

<key>CFBundleIdentifier</key>
<string>org.synfig.SynfigStudio</string>


<key>CFBundleExecutable</key>
<string>SynfigStudio</string>

<key>CFBundleGetInfoString</key>
<string>_VERSION_, © 2001-2020 The Synfig Team</string>
<key>CFBundleShortVersionString</key>
Expand Down
4 changes: 3 additions & 1 deletion autobuild/osx/synfig_osx_launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ int main(int argc, char* argv[]) {
buf = buf.substr(0, found + 1); // get the directory where exe is located
}

return system(buf.append("SynfigStudio.sh").c_str());
buf = "\"" + buf + "SynfigStudio.sh" + "\"";

return system(buf.c_str());
}

0 comments on commit 5ad6ac5

Please sign in to comment.