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)
|
SLIC3R_BUILD_ID=$(git describe)
|
||||||
else
|
else
|
||||||
TAGGED=false
|
TAGGED=false
|
||||||
SLIC3R_BUILD_ID=${SLIC3R_VERSION}d
|
SLIC3R_BUILD_ID=${SLIC3R_VERSION}dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If we're on a branch, add the branch name to the app name.
|
# 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
|
rm -rf $macosfolder/local-lib/lib/perl5/darwin-thread-multi-2level/Alien/wxWidgets/osx_cocoa_3_0_2_uni/include
|
||||||
|
|
||||||
echo "Relocating dylib paths..."
|
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
|
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 \;
|
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
|
done
|
||||||
@ -89,6 +89,7 @@ echo "Copying perl from $PERL_BIN"
|
|||||||
cp $PERL_BIN $macosfolder/perl-local
|
cp $PERL_BIN $macosfolder/perl-local
|
||||||
${PP_BIN} -M attributes -M base -M bytes -M B -M POSIX \
|
${PP_BIN} -M attributes -M base -M bytes -M B -M POSIX \
|
||||||
-M FindBin -M Unicode::Normalize -M Tie::Handle \
|
-M FindBin -M Unicode::Normalize -M Tie::Handle \
|
||||||
|
-M Time::Local -M Math::Trig \
|
||||||
-M lib -M overload \
|
-M lib -M overload \
|
||||||
-M warnings -M local::lib \
|
-M warnings -M local::lib \
|
||||||
-M strict -M utf8 -M parent \
|
-M strict -M utf8 -M parent \
|
||||||
|
@ -1,47 +1,98 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
function make_plist() {
|
function make_plist() {
|
||||||
# Create information property list file (Info.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
|
cat << EOF > $plistfile
|
||||||
echo '<plist version="1.0">' >>$plistfile
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
echo '<dict>' >>$plistfile
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
echo ' <key>CFBundleExecutable</key>' >>$plistfile
|
<plist version="1.0">
|
||||||
echo ' <string>'$appname'</string>' >>$plistfile
|
<dict>
|
||||||
echo ' <key>CFBundleGetInfoString</key>' >>$plistfile
|
<key>CFBundleExecutable</key>
|
||||||
echo " <string>Slic3r Copyright (C) 2011-$(date +%Y) Alessandro Ranellucci</string>" >>$plistfile
|
<string>$appname</string>
|
||||||
echo ' <key>CFBundleIconFile</key>' >>$plistfile
|
<key>CFBundleGetInfoString</key>
|
||||||
echo ' <string>Slic3r.icns</string>' >>$plistfile
|
<string>Slic3r Copyright (C) 2011-$(date +%Y) Alessandro Ranellucci</string>
|
||||||
echo ' <key>CFBundleName</key>' >>$plistfile
|
<key>CFBundleIconFile</key>
|
||||||
echo ' <string>Slic3r</string>' >>$plistfile
|
<string>Slic3r.icns</string>
|
||||||
echo ' <key>CFBundleShortVersionString</key>' >>$plistfile
|
<key>CFBundleName</key>
|
||||||
|
<string>Slic3r</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
EOF
|
||||||
|
|
||||||
if [ $TAGGED ]; then
|
if [ $TAGGED ]; then
|
||||||
echo " <string>Slic3r $SLIC3R_BUILD_ID</string>" >>$plistfile
|
echo " <string>Slic3r $SLIC3R_BUILD_ID</string>" >>$plistfile
|
||||||
else
|
else
|
||||||
echo " <string>Slic3r $SLIC3R_BUILD_ID-$(git rev-parse --short head)</string>" >>$plistfile
|
echo " <string>Slic3r $SLIC3R_BUILD_ID-$(git rev-parse --short head)</string>" >>$plistfile
|
||||||
fi
|
fi
|
||||||
echo ' <key>CFBundleIdentifier</key>' >>$plistfile
|
|
||||||
echo ' <string>org.slic3r.Slic3r</string>' >>$plistfile
|
cat << EOF >> $plistfile
|
||||||
echo ' <key>CFBundleInfoDictionaryVersion</key>' >>$plistfile
|
<key>CFBundleIdentifier</key>
|
||||||
echo ' <string>6.0</string>' >>$plistfile
|
<string>org.slic3r.$appname</string>
|
||||||
echo ' <key>CFBundlePackageType</key>' >>$plistfile
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
echo ' <string>APPL</string>' >>$plistfile
|
<string>6.0</string>
|
||||||
echo ' <key>CFBundleSignature</key>' >>$plistfile
|
<key>CFBundlePackageType</key>
|
||||||
echo ' <string>????</string>' >>$plistfile
|
<string>APPL</string>
|
||||||
echo ' <key>CFBundleVersion</key>' >>$plistfile
|
<key>CFBundleSignature</key>
|
||||||
echo " <string>${SLIC3R_BUILD_ID}</string>" >>$plistfile
|
<string>????</string>
|
||||||
echo ' <key>CFBundleTypeRole</key>' >>$plistfile
|
<key>CFBundleVersion</key>
|
||||||
echo ' <string>Viewer</string>' >>$plistfile
|
<string>${SLIC3R_BUILD_ID}</string>
|
||||||
# Associate with a few file types (amf, stl, obj)
|
<key>CFBundleDocumentTypes</key>
|
||||||
echo ' <key>CFBundleTypeExtensions</key>' >>$plistfile
|
<array>
|
||||||
echo ' <array> ' >> $plistfile
|
<dict>
|
||||||
echo ' <string>stl</string> ' >> $plistfile
|
<key>CFBundleTypeExtensions</key>
|
||||||
echo ' <string>amf</string> ' >> $plistfile
|
<array>
|
||||||
echo ' <string>obj</string> ' >> $plistfile
|
<string>stl</string>
|
||||||
echo ' </array> ' >> $plistfile
|
<string>STL</string>
|
||||||
echo ' <key>LISsAppleDefaultForType</key> <true/>' >> $plistfile
|
</array>
|
||||||
echo ' <key>CGDisableCoalescedUpdates</key>' >>$plistfile
|
<key>CFBundleTypeIconFile</key>
|
||||||
echo ' <false/>' >>$plistfile
|
<string>Slic3r.icns</string>
|
||||||
echo '</dict>' >>$plistfile
|
<key>CFBundleTypeName</key>
|
||||||
echo '</plist>' >>$plistfile
|
<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