Skip to content

Conversation

@hoffie
Copy link
Member

@hoffie hoffie commented Mar 9, 2022

Short description of changes

Jamulus.pro sets QMAKE_APPLICATION_BUNDLE_NAME. (note the trailing dot). This sets the variable with exactly this name, but not the probably intended dot-less QMAKE_APPLICATION_BUNDLE_NAME .

As this can't have worked in the past, it's obviously not necessary. So instead of fixing the assignment, the line is dropped altogether.

The docs suggest that QMAKE_APPLICATION_BUNDLE_NAME is used in the plist generation logic, but that the relevant place defaults to using TARGET, which we do set properly. This highlights that it should be ok to work without QMAKE_APPLICATION_BUNDLE_NAME.

CHANGELOG: Build: Removed broken QMAKE_APPLICATION_BUNDLE_NAME. logic.
(I'll probably merge this Changelog line with other autobuild improvements)

Context: Fixes an issue?

Remove broken code.

Does this change need documentation? What needs to be documented and how?

No.

Status of this Pull Request

Ready on CI green.

What is missing until this pull request can be merged?

Reviews.

Checklist

  • I've verified that this Pull Request follows the general code principles
  • I tested my code and it does what I want
  • My code follows the style guide
  • I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • I've filled all the content above

Jamulus.pro sets `QMAKE_APPLICATION_BUNDLE_NAME.` (note the trailing
dot).
This sets the variable with exactly this name, but not the probably
intended dot-less QMAKE_APPLICATION_BUNDLE_NAME.

As this can't have worked in the past, it's obviously not necessary. So
instead of fixing the assignment, the line is dropped altogether.

The docs[1] suggest that QMAKE_APPLICATION_BUNDLE_NAME is used in the
plist generation logic, but that the relevant place defaults to using
TARGET, which we do set properly. This highlights that it should be ok
to work without QMAKE_APPLICATION_BUNDLE_NAME.

[1] https://doc.qt.io/qt-5/qmake-variable-reference.html
@hoffie hoffie added this to the Release 3.9.0 milestone Mar 9, 2022
Copy link
Member

@softins softins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So long as we set TARGET, that should be fine. It appears that QMAKE_APPLICATION_BUNDLE_NAME is only intended to override TARGET if desired. So there's no point in actually setting it from TARGET.

I found only these references in the qmake specs files:

resolve_target.prf:

            app_bundle {
                !isEmpty(QMAKE_APPLICATION_BUNDLE_NAME): \
                    app_target = $$QMAKE_APPLICATION_BUNDLE_NAME
                else: \
                    app_target = $$TARGET

separate_debug_info.prf:

        if(any_bundle:!build_pass)|if(!any_bundle:if(build_pass|isEmpty(BUILDS))) {
            equals(TEMPLATE, lib):lib_bundle:!isEmpty(QMAKE_FRAMEWORK_BUNDLE_NAME): \
                BUNDLEIDENTIFIER = $$replace(QMAKE_FRAMEWORK_BUNDLE_NAME, \\.framework$, )
            else: equals(TEMPLATE, app):app_bundle:!isEmpty(QMAKE_APPLICATION_BUNDLE_NAME): \
                BUNDLEIDENTIFIER = $$replace(QMAKE_APPLICATION_BUNDLE_NAME, \\.app$, )
            else: \
                BUNDLEIDENTIFIER = $${TARGET}

@hoffie hoffie merged commit 980582e into jamulussoftware:master Mar 9, 2022
@hoffie hoffie deleted the drop-qmake-application-bundle-name branch March 9, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants