Commit f432a2da authored by Peter Zhigalov's avatar Peter Zhigalov

Доработал деплой-скрипты для OS X

parent 0555c550
#!/bin/bash
V_PROJECT=fem_draw_qt
V_BUILDDIR=build_osx_qt4.8.7_clang64
V_APPNAME="FEM Draw"
V_DMGNAME="fem_draw_qt"
V_INFO_PLIST="resources/Info.plist"
V_ICON="resources/fem_draw.icns"
CMD_QMAKE="qmake"
CMD_DEPLOY="macdeployqt"
cd "$(dirname $0)"/..
rm -rf "${V_BUILDDIR}"
mkdir -p "${V_BUILDDIR}"
cd "${V_BUILDDIR}"
${CMD_QMAKE} CONFIG+="release" CONFIG+="x86_64" -r -spec unsupported/macx-clang QMAKE_MACOSX_DEPLOYMENT_TARGET=10.5 "../${V_PROJECT}.pro"
make
cp -a "../${V_INFO_PLIST}" "${V_APPNAME}.app/Contents/Info.plist"
sed -e 's/10.7/10.5/' -i "" "${V_APPNAME}.app/Contents/Info.plist"
cp -a "../${V_ICON}" "${V_APPNAME}.app/Contents/Resources/"
${CMD_DEPLOY} "${V_APPNAME}.app" -dmg -verbose=2
hdiutil convert -format UDRW -o "${V_APPNAME}_rw.dmg" "${V_APPNAME}.dmg"
mkdir "${V_APPNAME}_rw_mount"
hdiutil attach -mountpoint "${V_APPNAME}_rw_mount" -noautoopen "${V_APPNAME}_rw.dmg"
cd "${V_APPNAME}_rw_mount"
ln -s /Applications ./Applications
cd ..
hdiutil detach "${V_APPNAME}_rw_mount"
hdiutil convert -format UDRO -o "${V_APPNAME}_ro.dmg" "${V_APPNAME}_rw.dmg"
cp "${V_APPNAME}_ro.dmg" ../"${V_DMGNAME}.dmg"
#!/bin/bash
V_PROJECT=fem_draw_qt
V_BUILDDIR=build_osx_qt5.3.0_clang64
V_APPNAME="FEM Draw"
V_DMGNAME="fem_draw_qt"
QTDIR="${HOME}/Qt/5.3/clang_64"
CMD_QMAKE="${QTDIR}/bin/qmake"
CMD_DEPLOY="${QTDIR}/bin/macdeployqt"
cd "$(dirname $0)"/..
rm -rf "${V_BUILDDIR}"
mkdir -p "${V_BUILDDIR}"
cd "${V_BUILDDIR}"
${CMD_QMAKE} CONFIG+="release" QMAKE_MACOSX_DEPLOYMENT_TARGET=10.6 "../${V_PROJECT}.pro"
make
sed -e 's/10.7/10.6/' -i "" "${V_APPNAME}.app/Contents/Info.plist"
${CMD_DEPLOY} "${V_APPNAME}.app" -dmg -verbose=2
hdiutil convert -format UDRW -o "${V_APPNAME}_rw.dmg" "${V_APPNAME}.dmg"
mkdir "${V_APPNAME}_rw_mount"
hdiutil attach -mountpoint "${V_APPNAME}_rw_mount" -noautoopen "${V_APPNAME}_rw.dmg"
cd "${V_APPNAME}_rw_mount"
ln -s /Applications ./Applications
cd ..
hdiutil detach "${V_APPNAME}_rw_mount"
hdiutil convert -format UDRO -o "${V_APPNAME}_ro.dmg" "${V_APPNAME}_rw.dmg"
cp "${V_APPNAME}_ro.dmg" ../"${V_DMGNAME}.dmg"
#!/bin/bash
V_PROJECT=fem_draw_qt
QTDIR=/Applications/Qt/5.6/clang_64
V_BUILDDIR=build_osx_qt5.6.0_clang64
V_APPNAME="FEM Draw"
V_DMGNAME="fem_draw_qt"
QTDIR="${HOME}/Qt/5.6/clang_64"
CMD_QMAKE="${QTDIR}/bin/qmake"
CMD_DEPLOY="${QTDIR}/bin/macdeployqt"
cd "$(dirname $0)"/..
rm -rf "${V_BUILDDIR}"
mkdir -p "${V_BUILDDIR}"
cd "${V_BUILDDIR}"
"${QTDIR}"/bin/qmake CONFIG+="release" QMAKE_MACOSX_DEPLOYMENT_TARGET=10.7 "../${V_PROJECT}.pro"
${CMD_QMAKE} CONFIG+="release" QMAKE_MACOSX_DEPLOYMENT_TARGET=10.7 "../${V_PROJECT}.pro"
make
"${QTDIR}"/bin/macdeployqt "${V_APPNAME}.app" -dmg -verbose=2
${CMD_DEPLOY} "${V_APPNAME}.app" -dmg -verbose=2
hdiutil convert -format UDRW -o "${V_APPNAME}_rw.dmg" "${V_APPNAME}.dmg"
mkdir "${V_APPNAME}_rw_mount"
......@@ -20,5 +24,5 @@ ln -s /Applications ./Applications
cd ..
hdiutil detach "${V_APPNAME}_rw_mount"
hdiutil convert -format UDRO -o "${V_APPNAME}_ro.dmg" "${V_APPNAME}_rw.dmg"
cp "${V_APPNAME}_ro.dmg" ../"${V_APPNAME}.dmg"
cp "${V_APPNAME}_ro.dmg" ../"${V_DMGNAME}.dmg"
......@@ -47,6 +47,7 @@ macx {
QMAKE_INFO_PLIST = resources/Info.plist
ICON = resources/fem_draw.icns
TARGET = "FEM Draw"
QMAKE_CXXFLAGS += -Wno-invalid-constexpr
}
*g++*|*clang* {
......
......@@ -33,7 +33,7 @@
<string>x86_64</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>10.7.0</string>
<string>10.7</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright (c) 2014-2016, Peter Zhigalov</string>
<key>CFBundleDocumentTypes</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment