mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 06:22:04 +08:00
Make GUI work in OSX package
This commit is contained in:
parent
efd9b4c187
commit
551a40d64b
@ -20,7 +20,7 @@ if [ $(git describe &>/dev/null) ]; then
|
||||
SLIC3R_BUILD_ID=$(git describe)
|
||||
else
|
||||
TAGGED=false
|
||||
SLIC3R_BUILD_ID=${SLIC3R_VERSION}d
|
||||
SLIC3R_BUILD_ID=${SLIC3R_VERSION}dev
|
||||
fi
|
||||
|
||||
# If we're on a branch, add the branch name to the app name.
|
||||
@ -76,7 +76,7 @@ find $macosfolder/local-lib -name .packlist -delete
|
||||
rm -rf $macosfolder/local-lib/lib/perl5/darwin-thread-multi-2level/Alien/wxWidgets/osx_cocoa_3_0_2_uni/include
|
||||
|
||||
echo "Relocating dylib paths..."
|
||||
for bundle in $macosfolder/local-lib/lib/perl5/darwin-thread-multi-2level/auto/Wx/Wx.bundle $(find $macosfolder/local-lib/lib/perl5/darwin-thread-multi-2level/Alien/wxWidgets -name '*.dylib' -type f); do
|
||||
for bundle in $(find $macosfolder/local-lib/lib/perl5/darwin-thread-multi-2level/auto/Wx -name '*.bundle') $(find $macosfolder/local-lib/lib/perl5/darwin-thread-multi-2level/Alien/wxWidgets -name '*.dylib' -type f); do
|
||||
chmod +w $bundle
|
||||
find $SLIC3R_DIR/local-lib -name '*.dylib' -exec bash -c 'install_name_tool -change "{}" "@executable_path/local-lib/lib/perl5/darwin-thread-multi-2level/Alien/wxWidgets/osx_cocoa_3_0_2_uni/lib/$(basename {})" '$bundle \;
|
||||
done
|
||||
@ -89,6 +89,7 @@ echo "Copying perl from $PERL_BIN"
|
||||
cp $PERL_BIN $macosfolder/perl-local
|
||||
${PP_BIN} -M attributes -M base -M bytes -M B -M POSIX \
|
||||
-M FindBin -M Unicode::Normalize -M Tie::Handle \
|
||||
-M Time::Local -M Math::Trig \
|
||||
-M lib -M overload \
|
||||
-M warnings -M local::lib \
|
||||
-M strict -M utf8 -M parent \
|
||||
|
@ -1,47 +1,98 @@
|
||||
#!/bin/bash
|
||||
function make_plist() {
|
||||
# Create information property list file (Info.plist).
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>' >$plistfile
|
||||
echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' >>$plistfile
|
||||
echo '<plist version="1.0">' >>$plistfile
|
||||
echo '<dict>' >>$plistfile
|
||||
echo ' <key>CFBundleExecutable</key>' >>$plistfile
|
||||
echo ' <string>'$appname'</string>' >>$plistfile
|
||||
echo ' <key>CFBundleGetInfoString</key>' >>$plistfile
|
||||
echo " <string>Slic3r Copyright (C) 2011-$(date +%Y) Alessandro Ranellucci</string>" >>$plistfile
|
||||
echo ' <key>CFBundleIconFile</key>' >>$plistfile
|
||||
echo ' <string>Slic3r.icns</string>' >>$plistfile
|
||||
echo ' <key>CFBundleName</key>' >>$plistfile
|
||||
echo ' <string>Slic3r</string>' >>$plistfile
|
||||
echo ' <key>CFBundleShortVersionString</key>' >>$plistfile
|
||||
|
||||
cat << EOF > $plistfile
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$appname</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Slic3r Copyright (C) 2011-$(date +%Y) Alessandro Ranellucci</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>Slic3r.icns</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Slic3r</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
EOF
|
||||
|
||||
if [ $TAGGED ]; then
|
||||
echo " <string>Slic3r $SLIC3R_BUILD_ID</string>" >>$plistfile
|
||||
else
|
||||
echo " <string>Slic3r $SLIC3R_BUILD_ID-$(git rev-parse --short head)</string>" >>$plistfile
|
||||
fi
|
||||
echo ' <key>CFBundleIdentifier</key>' >>$plistfile
|
||||
echo ' <string>org.slic3r.Slic3r</string>' >>$plistfile
|
||||
echo ' <key>CFBundleInfoDictionaryVersion</key>' >>$plistfile
|
||||
echo ' <string>6.0</string>' >>$plistfile
|
||||
echo ' <key>CFBundlePackageType</key>' >>$plistfile
|
||||
echo ' <string>APPL</string>' >>$plistfile
|
||||
echo ' <key>CFBundleSignature</key>' >>$plistfile
|
||||
echo ' <string>????</string>' >>$plistfile
|
||||
echo ' <key>CFBundleVersion</key>' >>$plistfile
|
||||
echo " <string>${SLIC3R_BUILD_ID}</string>" >>$plistfile
|
||||
echo ' <key>CFBundleTypeRole</key>' >>$plistfile
|
||||
echo ' <string>Viewer</string>' >>$plistfile
|
||||
# Associate with a few file types (amf, stl, obj)
|
||||
echo ' <key>CFBundleTypeExtensions</key>' >>$plistfile
|
||||
echo ' <array> ' >> $plistfile
|
||||
echo ' <string>stl</string> ' >> $plistfile
|
||||
echo ' <string>amf</string> ' >> $plistfile
|
||||
echo ' <string>obj</string> ' >> $plistfile
|
||||
echo ' </array> ' >> $plistfile
|
||||
echo ' <key>LISsAppleDefaultForType</key> <true/>' >> $plistfile
|
||||
echo ' <key>CGDisableCoalescedUpdates</key>' >>$plistfile
|
||||
echo ' <false/>' >>$plistfile
|
||||
echo '</dict>' >>$plistfile
|
||||
echo '</plist>' >>$plistfile
|
||||
|
||||
cat << EOF >> $plistfile
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.slic3r.$appname</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${SLIC3R_BUILD_ID}</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>stl</string>
|
||||
<string>STL</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>Slic3r.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>STL</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LISsAppleDefaultForType</key>
|
||||
<true/>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>obj</string>
|
||||
<string>OBJ</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>Slic3r.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>STL</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LISsAppleDefaultForType</key>
|
||||
<true/>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>amf</string>
|
||||
<string>AMF</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>Slic3r.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>STL</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LISsAppleDefaultForType</key>
|
||||
<true/>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Alternate</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.7</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user