diff --git a/README.md b/README.md index 1315b85f5..863bf6c25 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,9 @@ On Linux/Unix: To install QupZilla, run this command: (it may be necessary to ru $ make install -On Mac OS X: To deploy QupZilla in bundle, run this command: +On Mac OS X: To deploy QupZilla in dmg image, run this command: - $ ./scripts/macdeploy.sh full-path-to-macdeployqt + $ ./mac/macdeploy.sh full-path-to-macdeployqt You need to specify path to `macdeployqt` only if it is not in PATH. diff --git a/mac/QupZilla-template.dmg b/mac/QupZilla-template.dmg new file mode 100644 index 000000000..9491debda Binary files /dev/null and b/mac/QupZilla-template.dmg differ diff --git a/mac/create_dmg.sh b/mac/create_dmg.sh new file mode 100755 index 000000000..20897099f --- /dev/null +++ b/mac/create_dmg.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +BUNDLE_PATH=bin +test -d bin || BUNDLE_PATH=../bin + + +echo "We just want to make sure it's not in use" +hdiutil detach /tmp/tmp-release-qupzilla + +echo "Creating writable DMG from template" +hdiutil convert QupZilla-template.dmg -format UDRW -o /tmp/tmp-qupzilla.dmg + +echo "Attach DMG for write" +hdiutil attach /tmp/tmp-qupzilla.dmg -mountpoint /tmp/tmp-qupzilla-release + +echo "Copying…" +cp -fpR $BUNDLE_PATH/QupZilla.app/Contents /tmp/tmp-qupzilla-release/QupZilla.app + +hdiutil detach /tmp/tmp-qupzilla-release + +echo "Creating final compressed(bz2) DMG…" +rm $BUNDLE_PATH/QupZilla.dmg +hdiutil convert /tmp/tmp-qupzilla.dmg -format UDBZ -o $BUNDLE_PATH/QupZilla.dmg + +echo "Removing temp files…" +rm /tmp/tmp-qupzilla.dmg +exit diff --git a/mac/images/qupzilla-dmg-background.png b/mac/images/qupzilla-dmg-background.png new file mode 100644 index 000000000..f71c641c5 Binary files /dev/null and b/mac/images/qupzilla-dmg-background.png differ diff --git a/mac/images/qupzilla-dmg-icon.png b/mac/images/qupzilla-dmg-icon.png new file mode 100644 index 000000000..b815cad4f Binary files /dev/null and b/mac/images/qupzilla-dmg-icon.png differ diff --git a/scripts/macdeploy.sh b/mac/macdeploy.sh similarity index 88% rename from scripts/macdeploy.sh rename to mac/macdeploy.sh index c391f3860..3935f8c62 100755 --- a/scripts/macdeploy.sh +++ b/mac/macdeploy.sh @@ -1,15 +1,15 @@ #!/bin/bash # # Usage: ./macdeploy.sh [] -# +# # macdeployqt is usually located in QTDIR/bin/macdeployqt # If path to macdeployqt is not specified, using it from PATH -COMMAND="macdeployqt" +MACDEPLOYQT="macdeployqt" LIBRARY_NAME="libQupZilla.1.dylib" if [ -n "$1" ]; then - COMMAND=$1 + MACDEPLOYQT=$1 fi # cd to directory with bundle @@ -33,4 +33,8 @@ do done # run macdeployqt -$COMMAND QupZilla.app +$MACDEPLOYQT QupZilla.app + +# create final dmg image +./create_dmg.sh +