diff --git a/projects/mtg/MacOS/Info.plist b/projects/mtg/MacOS/Info.plist new file mode 100644 index 000000000..3f2c494ee --- /dev/null +++ b/projects/mtg/MacOS/Info.plist @@ -0,0 +1,20 @@ + + + + + NSPrincipalClass + NSApplication + CFBundlePackageType + APPL + CFBundleGetInfoString + Created by Qt/QMake + CFBundleSignature + ???? + CFBundleExecutable + wagic.launcher + CFBundleIdentifier + wagic.wagic + NOTE + This file was generated by Qt/QMake. + + diff --git a/projects/mtg/MacOS/wagic.icns b/projects/mtg/MacOS/wagic.icns new file mode 100644 index 000000000..a5cf7d686 Binary files /dev/null and b/projects/mtg/MacOS/wagic.icns differ diff --git a/projects/mtg/MacOS/wagic.launcher b/projects/mtg/MacOS/wagic.launcher new file mode 100755 index 000000000..09a36f175 --- /dev/null +++ b/projects/mtg/MacOS/wagic.launcher @@ -0,0 +1,5 @@ +#!/bin/bash + +cd ${0%/*/*}/Resources +#cd ../Resources +exec ../MacOS/wagic -platformpluginpath ../PlugIns >> ../logs/out.log 2> ../logs/err.log diff --git a/projects/mtg/wagic-qt.pro b/projects/mtg/wagic-qt.pro index 9c547d11a..d53f75fcd 100644 --- a/projects/mtg/wagic-qt.pro +++ b/projects/mtg/wagic-qt.pro @@ -134,6 +134,28 @@ maemo5: { USERDIR = /sdcard/Wagic/Res DEFINES += RESDIR=\\\"$$RESDIR\\\" DEFINES += USERDIR=\\\"$$USERDIR\\\" +} else:macx { + # Copy the custom Info.plist to the app bundle + QMAKE_INFO_PLIST = MacOS/Info.plist + # Icon is mandatory for submission + ICON = MacOS/wagic.icns + + #Move resource file + res.commands = cd $$_PRO_FILE_PWD_/bin/Res; python createResourceZip.py; + res.depends = all + QMAKE_EXTRA_TARGETS += res + + # Create a dmg file + dmg.commands = mkdir wagic.app/Contents/logs; mkdir wagic.app/Contents/Resources/Res; mv $$_PRO_FILE_PWD_/bin/Res/core*.zip wagic.app/Contents/Resources/Res; cp $$_PRO_FILE_PWD_/MacOS/wagic.launcher wagic.app/Contents/MacOS; $$dirname(QMAKE_QMAKE)/macdeployqt wagic.app -dmg + dmg.depends = res + QMAKE_EXTRA_TARGETS += dmg + + QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9 + QMAKE_MAC_SDK = macosx + + # Only Intel binaries are accepted so force this + CONFIG += x86 + } else:unix { # Variables BINDIR = /usr/bin