Skip to content

Commit

Permalink
Qbs: properly install Info.plist, PkgInfo, and app icon.
Browse files Browse the repository at this point in the history
The icns files have also been moved into an asset catalog because
"source code" as a rule should be stored in the preferred form of
modification.

Change-Id: I883db5704a46d8d7cf601f7fb4471619ebbc34bf
Reviewed-by: Eike Ziller <[email protected]>
  • Loading branch information
jakepetroules committed Oct 21, 2015
1 parent 3fbd210 commit 59ac67c
Show file tree
Hide file tree
Showing 39 changed files with 108 additions and 14 deletions.
2 changes: 2 additions & 0 deletions qbs/imports/QtcProduct.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import QtcFunctions

Product {
property string installDir
property string installSourceBase

Depends { name: "cpp" }
cpp.defines: project.generalDefines
Expand All @@ -23,5 +24,6 @@ Product {
fileTagsFilter: product.type
qbs.install: true
qbs.installDir: installDir
qbs.installSourceBase: installSourceBase
}
}
2 changes: 1 addition & 1 deletion qtcreator.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import qbs 1.0

Project {
name: "Qt Creator"
minimumQbsVersion: "1.4"
minimumQbsVersion: "1.4.3"
property bool withAutotests: qbs.buildVariant === "debug"
property string ide_version_major: '3'
property string ide_version_minor: '5'
Expand Down
6 changes: 3 additions & 3 deletions src/app/Info.plist.in → src/app/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
<key>NSHumanReadableCopyright</key>
<string>(C) 2015 The Qt Company Ltd</string>
<key>CFBundleIconFile</key>
<string>$$ICON</string>
<string>qtcreator</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
Expand All @@ -245,9 +245,9 @@
<key>CFBundleIdentifier</key>
<string>org.qt-project.qtcreator</string>
<key>CFBundleVersion</key>
<string>$$QTCREATOR_VERSION</string>
<string>@FULL_VERSION@</string>
<key>CFBundleShortVersionString</key>
<string>$$QTCREATOR_VERSION</string>
<string>@SHORT_VERSION@</string>
<key>LSMinimumSystemVersion</key>
<string>10.7.0</string>
</dict>
Expand Down
27 changes: 19 additions & 8 deletions src/app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ TEMPLATE = app
CONFIG += qtc_runnable
TARGET = $$IDE_APP_TARGET
DESTDIR = $$IDE_APP_PATH
VERSION = $$QTCREATOR_VERSION
QT -= testlib

HEADERS += ../tools/qtcreatorcrashhandler/crashhandlersetup.h
Expand All @@ -24,20 +25,30 @@ win32 {
INSTALLS += target
} else:macx {
LIBS += -framework CoreFoundation
ICON = qtcreator.icns
FILETYPES.files = profile.icns prifile.icns
FILETYPES.path = Contents/Resources
QMAKE_BUNDLE_DATA += FILETYPES
info.input = Info.plist.in
info.output = $$IDE_BIN_PATH/../Info.plist
QMAKE_SUBSTITUTES = info
ASSETCATALOG.files = $$PWD/qtcreator.xcassets
macx-xcode {
QMAKE_BUNDLE_DATA += ASSETCATALOG
} else {
ASSETCATALOG.output = $$IDE_BIN_PATH/../Resources/qtcreator.icns
ASSETCATALOG.commands = xcrun actool \
--app-icon qtcreator \
--output-partial-info-plist /dev/null \
--platform macosx \
--minimum-deployment-target 10.7 \
--compile $$shell_quote($$IDE_BIN_PATH/../Resources) \
$$shell_quote($$PWD/qtcreator.xcassets)
ASSETCATALOG.input = ASSETCATALOG.files
ASSETCATALOG.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += ASSETCATALOG
}
QMAKE_INFO_PLIST = Info.plist
} else {
target.path = $$INSTALL_BIN_PATH
INSTALLS += target
}

DISTFILES += qtcreator.rc \
Info.plist.in \
Info.plist \
$$PWD/app_version.h.in

QMAKE_SUBSTITUTES += $$PWD/app_version.h.in
Expand Down
17 changes: 15 additions & 2 deletions src/app/app.qbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import qbs

QtcProduct {
Depends { name: "bundle" }
Depends { name: "ib"; condition: qbs.targetOS.contains("osx") }

bundle.isBundle: true
bundle.infoPlistFile: "Info.plist"

ib.appIconName: "qtcreator"

type: ["application"]
name: project.ide_app_target
consoleApplication: qbs.debugInformation
version: project.qtcreator_version

installSourceBase: buildDirectory

cpp.rpaths: qbs.targetOS.contains("osx") ? ["@executable_path/../Frameworks"]
: ["$ORIGIN/../" + project.libDirName + "/qtcreator"]
Expand All @@ -18,7 +29,9 @@ QtcProduct {
Depends { name: "ExtensionSystem" }

files: [
"Info.plist",
"main.cpp",
"qtcreator.xcassets",
"qtcreator.rc",
"../shared/qtsingleapplication/qtsingleapplication.h",
"../shared/qtsingleapplication/qtsingleapplication.cpp",
Expand Down Expand Up @@ -54,8 +67,8 @@ QtcProduct {
}

Group {
fileTagsFilter: product.type
fileTagsFilter: ["infoplist", "pkginfo", "compiled_assetcatalog"]
qbs.install: true
qbs.installDir: project.ide_bin_path
qbs.installSourceBase: installSourceBase
}
}
Binary file removed src/app/prifile.icns
Binary file not shown.
Binary file removed src/app/profile.icns
Binary file not shown.
Binary file removed src/app/qtcreator.icns
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions src/app/qtcreator.xcassets/qtcreator.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images" : [
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "icon_16x16.png",
"scale" : "1x"
},
{
"size" : "16x16",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "icon_32x32.png",
"scale" : "1x"
},
{
"size" : "32x32",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "icon_128x128.png",
"scale" : "1x"
},
{
"size" : "128x128",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "icon_256x256.png",
"scale" : "1x"
},
{
"size" : "256x256",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "icon_512x512.png",
"scale" : "1x"
},
{
"size" : "512x512",
"idiom" : "mac",
"filename" : "[email protected]",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 59ac67c

Please sign in to comment.