Added MacOS bundle creation in Qt .pro file
This commit is contained in:
20
projects/mtg/MacOS/Info.plist
Normal file
20
projects/mtg/MacOS/Info.plist
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Created by Qt/QMake</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>wagic.launcher</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>wagic.wagic</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
projects/mtg/MacOS/wagic.icns
Normal file
BIN
projects/mtg/MacOS/wagic.icns
Normal file
Binary file not shown.
5
projects/mtg/MacOS/wagic.launcher
Executable file
5
projects/mtg/MacOS/wagic.launcher
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd ${0%/*/*}/Resources
|
||||
#cd ../Resources
|
||||
exec ../MacOS/wagic -platformpluginpath ../PlugIns >> ../logs/out.log 2> ../logs/err.log
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user