mirror of
https://github.com/rgriebl/brickstore.git
synced 2026-05-02 05:01:43 -05:00
Fix macos installer
This commit is contained in:
@@ -80,7 +80,7 @@ jobs:
|
||||
dist=$(lsb_release -c -s)
|
||||
|
||||
cat >debian/changelog <<EOF
|
||||
$package ($release) $dist; urgency=low
|
||||
$package ($version) $dist; urgency=low
|
||||
|
||||
* Current Release
|
||||
|
||||
|
||||
+32
-21
@@ -14,7 +14,7 @@
|
||||
|
||||
MIN_QT_VERSION = 5.11.0
|
||||
|
||||
TARGET = "BrickStore"
|
||||
NAME = "BrickStore"
|
||||
DESCRIPTION = "An offline BrickLink inventory management tool."
|
||||
COPYRIGHT = "2004-2020 Robert Griebl"
|
||||
GITHUB_URL = "github.com/rgriebl/brickstore"
|
||||
@@ -28,13 +28,15 @@ requires(linux|macos|win32:!winrt:!android)
|
||||
error("$$escape_expand(\\n\\n) *** BrickStore needs to be built against $$MIN_QT_VERSION or higher ***$$escape_expand(\\n\\n)")
|
||||
}
|
||||
|
||||
TEMPLATE = app
|
||||
TEMPLATE = app
|
||||
|
||||
CONFIG *= no_private_qt_headers_warning
|
||||
CONFIG *= lrelease embed_translations
|
||||
# CONFIG *= modeltest
|
||||
TARGET = $$NAME
|
||||
unix:!macos:TARGET = $$lower($$TARGET)
|
||||
|
||||
CONFIG *= no_private_qt_headers_warning
|
||||
CONFIG *= lrelease embed_translations
|
||||
# CONFIG *= modeltest
|
||||
|
||||
unix:!macos:TARGET = $$lower(TARGET)
|
||||
|
||||
DESTDIR = bin
|
||||
|
||||
@@ -61,10 +63,19 @@ OTHER_FILES += \
|
||||
unix/brickstore-mime.xml \
|
||||
windows/brickstore.iss \
|
||||
|
||||
RESOURCES += brickstore.qrc
|
||||
RESOURCES += brickstore.qrc
|
||||
|
||||
LANGUAGES = de fr nl sl
|
||||
|
||||
for(l, LANGUAGES) {
|
||||
TRANSLATIONS += translations/brickstore_$${l}.ts
|
||||
qt_qm = $$[QT_INSTALL_TRANSLATIONS]/qtbase_$${l}.qm
|
||||
exists($$qt_qm):qt_translations.files += $$qt_qm
|
||||
}
|
||||
qt_translations.base = $$[QT_INSTALL_TRANSLATIONS]
|
||||
qt_translations.prefix = i18n
|
||||
RESOURCES += qt_translations
|
||||
|
||||
LANGUAGES = de fr nl sl
|
||||
for(l, LANGUAGES):TRANSLATIONS += translations/brickstore_$${l}.ts
|
||||
|
||||
include(src/src.pri)
|
||||
include(src/utility/utility.pri)
|
||||
@@ -78,6 +89,7 @@ qtPrepareTool(LUPDATE, lupdate)
|
||||
lupdate.commands = $$QMAKE_CD $$system_quote($$system_path($$PWD)) && $$LUPDATE $$_PRO_FILE_
|
||||
QMAKE_EXTRA_TARGETS += lupdate-all
|
||||
|
||||
|
||||
#
|
||||
# Windows specific
|
||||
#
|
||||
@@ -192,17 +204,16 @@ macos {
|
||||
bundle_icons.path = Contents/Resources
|
||||
bundle_icons.files = $$files("assets/generated-icons/*.icns")
|
||||
bundle_printtemplates.path = Contents/Resources/print-templates
|
||||
bundle_printtemplates.files = $$system(find $$PWD/print-templates -name \'*.qs\' -or -name \'*.ui\') #TODO5: $$files ???
|
||||
bundle_printtemplates.files = $$files("print-templates/*.qs") \
|
||||
$$files("print-templates/*.ui")
|
||||
|
||||
# bundle_locversions.path = Contents/Resources
|
||||
# for(l, LANGUAGES) {
|
||||
# cp $$PWD/macos/locversion.plist.in
|
||||
# bundle_locversions.files += $$system(find $$PWD/../macos/Resources/ -name \'*.lproj\')
|
||||
# }
|
||||
|
||||
|
||||
bundle_locversions.path = Contents/Resources ## TODO5: generate lproj from template
|
||||
bundle_locversions.files = $$system(find $$PWD/../macos/Resources/ -name \'*.lproj\')
|
||||
bundle_locversions.path = Contents/Resources
|
||||
for(l, LANGUAGES) {
|
||||
outpath = $$OUT_PWD/.locversions/$${l}.lproj
|
||||
mkpath($$outpath)
|
||||
system(sed -e "s,@LANG@,$$l," < "$$PWD/macos/locversion.plist.in" > "$$outpath/locversion.plist")
|
||||
bundle_locversions.files += $$outpath
|
||||
}
|
||||
|
||||
QMAKE_BUNDLE_DATA += bundle_icons bundle_locversions bundle_printtemplates
|
||||
|
||||
@@ -214,8 +225,8 @@ macos {
|
||||
installer.commands += rm -rf $$OUT_PWD/dmg
|
||||
installer.commands += && mkdir $$OUT_PWD/dmg
|
||||
installer.commands += && mkdir $$OUT_PWD/dmg/.background
|
||||
installer.commands += && cp macos/dmg-background.png $$OUT_PWD/dmg/.background/background.png
|
||||
installer.commands += && cp macos/dmg-ds_store $$OUT_PWD/dmg/.DS_Store
|
||||
installer.commands += && cp $$PWD/macos/dmg-background.png $$OUT_PWD/dmg/.background/background.png
|
||||
installer.commands += && cp $$PWD/macos/dmg-ds_store $$OUT_PWD/dmg/.DS_Store
|
||||
installer.commands += && cp -a $$OUT_PWD/$$DESTDIR/$${TARGET}.app $$OUT_PWD/dmg/
|
||||
installer.commands += && ln -s /Applications "$$OUT_PWD/dmg/"
|
||||
installer.commands += && hdiutil create \"$$OUT_PWD/$${TARGET}-$${VERSION}.dmg\" -volname \"$$TARGET $$VERSION\" -fs \"HFS+\" -srcdir \"$$OUT_PWD/dmg\" -quiet -format UDBZ -ov
|
||||
|
||||
+63
-63
@@ -1,88 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<dict>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>application.icns</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>application.icns</string>
|
||||
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Bundle for BrickStore</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>Bundle for BrickStore</string>
|
||||
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>de.softforge.@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>de.softforge.@EXECUTABLE@</string>
|
||||
|
||||
<key>CFBundleSignature</key>
|
||||
<string>ttxt</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>ttxt</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>BrickStore</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>BrickStore</string>
|
||||
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@VERSION@</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@FULL_VERSION@</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@FULL_VERSION@</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@FULL_VERSION@</string>
|
||||
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>bti</string>
|
||||
</array>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>bti</string>
|
||||
</array>
|
||||
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/x-brickstore</string>
|
||||
</array>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/x-brickstore</string>
|
||||
</array>
|
||||
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>BrickStore Data File</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>BrickStore Data File</string>
|
||||
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>bsx</string>
|
||||
</array>
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>bsx</string>
|
||||
</array>
|
||||
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/x-brickstore-xml</string>
|
||||
</array>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>application/x-brickstore-xml</string>
|
||||
</array>
|
||||
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>BrickStore XML</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>BrickStore XML</string>
|
||||
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<key>LprojCompatibleVersion</key>
|
||||
<string>123</string>
|
||||
<key>LprojLocale</key>
|
||||
<string>${LANG}</string>
|
||||
<string>@LANG@</string>
|
||||
<key>LprojRevisionLevel</key>
|
||||
<string>1</string>
|
||||
<key>LprojVersion</key>
|
||||
|
||||
+1
-1
@@ -239,7 +239,7 @@ void Application::updateTranslations()
|
||||
bool qtLoaded = false, bsLoaded = false;
|
||||
|
||||
for (const QString &sp : qAsConst(spath)) {
|
||||
qtLoaded = qtLoaded || m_trans_qt->load(QLatin1String("qt_") + locale, sp);
|
||||
qtLoaded = qtLoaded || m_trans_qt->load(QLatin1String("qtbase_") + locale, sp);
|
||||
bsLoaded = bsLoaded || m_trans_brickstore->load(QLatin1String("brickstore_") + locale, sp);
|
||||
}
|
||||
if (qtLoaded)
|
||||
|
||||
+4
-4
@@ -21,7 +21,7 @@
|
||||
#define BRICKSTORE_BUILD_HOST '"$$BUILD_HOST"'
|
||||
#define BRICKSTORE_GIT_VERSION '"$$GIT_VERSION"'
|
||||
|
||||
// stringification sucks :)
|
||||
// 2 step stringification
|
||||
#define BS_STR(s) BS_STR2(s)
|
||||
#define BS_STR2(s) #s
|
||||
|
||||
@@ -41,6 +41,6 @@
|
||||
#endif
|
||||
|
||||
#define BRICKSTORE_VERSION BS_STR(BRICKSTORE_MAJOR) '"."' BS_STR(BRICKSTORE_MINOR) '"."' BS_STR(BRICKSTORE_PATCH)
|
||||
#define BRICKSTORE_COPYRIGHT '"$$QMAKE_TARGET_COPYRIGHT"'
|
||||
#define BRICKSTORE_URL '"$$QMAKE_TARGET_COMPANY"'
|
||||
#define BRICKSTORE_NAME '"$$QMAKE_TARGET_PRODUCT"'
|
||||
#define BRICKSTORE_COPYRIGHT '"$$COPYRIGHT"'
|
||||
#define BRICKSTORE_URL '"$$GITHUB_URL"'
|
||||
#define BRICKSTORE_NAME '"$$TARGET"'
|
||||
|
||||
Reference in New Issue
Block a user