Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if SUBundleName is set before normalizing #1444

Conversation

jfenton-tsc
Copy link
Contributor

@jfenton-tsc jfenton-tsc commented Aug 2, 2019

Inspired by #1442

When changing the name of an app, there's a couple things to do in order
to ensure auto-updates still work:

  1. set SUBundle Name. This basically tells Sparkle "ey, expect an app
    of {SUBundleName}.(app|pkg) instead of the normal name."
  2. set SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME in
    commonConfig.xccconfig to reset the name of the app.

in (2), we always used the host's bundle name, instead of checking to
see if SUBundleName was set, which means normalization doesn't work as
expected during app name changes.

A problem that arises is that we will ALWAYS normalize the installed .app path to SUBundleName--even if the thing you're updating to has a different bundle name from SUBundleName.

I think that's expected behavior, if you specify SUBundleName and Normalize, but it does seem odd.

Testing I've done

made Some App Name.app update to Different App Name.app

  • set SUBundleName to Different App Name
  • compiled with SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 1
  • saw Some App Name.app become Different App Name.app when installing the update

made Some App Name.app update to a later build of Some App Name.app

  • set SUBundleName to Different App Name
  • compiled with SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME = 1
  • saw Some App Name.app become Different App Name.app when installing the update, even though it's really installing Some App Name

Other To-Dos?

  • Do docs need to be updated, since this is a behavior change?
    • I think SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME should be mentioned a bit more prominently--I had to do some digging to find out it was an option for the behavior I want
  • Soliciting other users' feedback
    • it's possible (probably) that this behavior change will have an effect on others that are using it.

When changing the name of an app, there's a couple things to do in order
to ensure auto-updates still work:

1. set SUBundle Name. This basically tells Sparkle "ey, expect an app
of {SUBundleName}.(app|pkg) instead of the normal name."
2. set `SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME` in
commonConfig.xccconfig to reset the name of the app.

in (2), we always used the host's bundle name, instead of checking to
see if SUBundleName was set, which means normalization doesn't work as
expected during app name changes.
@kornelski
Copy link
Member

This looks good. Thank you.

@jfenton-tsc jfenton-tsc deleted the fix/normalize-should-respect-specified-bundle-name branch November 13, 2019 20:15
mrc added a commit to sinefa/Sparkle that referenced this pull request Feb 23, 2024
SPARKLE_NORMALIZE_INSTALLED_APPLICATION_NAME is required to support
renaming an installed application bundle.

See sparkle-project#1444 for details.
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.

2 participants