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

Look into options to inform Mac users about the menu bar item #77

Closed
michaelherger opened this issue Dec 6, 2024 · 22 comments
Closed
Assignees
Labels

Comments

@michaelherger
Copy link
Member

michaelherger commented Dec 6, 2024

The first time a Mac users launches the menu bar item, we should probably tell them about how to use it or something.

https://forums.slimdevices.com/forum/user-forums/logitech-media-server/1738408-installation-on-mac-mini?p=1738549#post1738549

@mikecappella
Copy link

mikecappella commented Dec 6, 2024

To start with, how about a quick Read Me in the dmg ?

Image

@michaelherger
Copy link
Member Author

If you know an easy way to do this in an automated GitHub workflow?...

@michaelherger
Copy link
Member Author

Maybe this? https://github.com/LinusU/node-appdmg

@mikecappella
Copy link

No, and I'm trying to learn now how the current dmg is being built, but I've not found it yet. Any pointers?

@michaelherger
Copy link
Member Author

Ok, I got something working with the above node-appdmg:

Image

What we'd need now is a background image (that should include the arrow between the app and the Applications folder link) and potentially some document. That document could also be online. Or we make the background image self-explanatory (showing a screenshot of the menu bar or something).

@mikecappella
Copy link

mikecappella commented Dec 8, 2024

I've been looking at this today. A thought. Before the icon can be dragged:

  1. the service needs to be stopped
  2. the Platypus app needs to be quit

I don't know if there are plans / ideas for making this automated.

Until that happens, the steps should be indicated to be performed first, otherwise a user cannot drag the Lyrion icon onto the Applications folder link. Then, steps need to instruct:

  1. Launch Lyrion Music Server
  2. Start the service from the menu bar

Is that what your thinking is needed for the dmg's folder appearance?

Given that this may change in the future, perhaps it's best for now to just have a URL file link to an online doc that provides these instructions (and perhaps also how to uninstall the old LMS + control panel). This way, the docs can be updated out of band of the builds.

@michaelherger
Copy link
Member Author

There certainly are ideas (you just expressed some good ones!). But we lack work power. I can do the small improvements here and there. But I'm no macOS development expert (nor Windows, FWIW).

A readme file (or link) outlining what you say up there would be great. With an easy introduction for the first time user ("start the app, click the menu bar item..."), and a section for upgrades (your two bullet points up there). Would be great if you could come up with a draft!

@michaelherger michaelherger moved this from Backlog to In progress in Next Release Dec 9, 2024
@michaelherger
Copy link
Member Author

FWIW: I pushed a change which should provide something like the above as an early POC in 9.0.1+. Background, arrow, additional document TBD.

@mikecappella
Copy link

I was planning on working on this today. I see also an offer from @MilGil here. Let see what we come up with.

@michaelherger
Copy link
Member Author

I've only dealt with the technical side of things 😁. Replacing the tool to create the image, plus testing some additional document (which could also be a link).

@michaelherger michaelherger self-assigned this Dec 9, 2024
@mikecappella
Copy link

Well, this first draft idea took a lot longer than I'd anticipated. I kept running into some odd caching issues where new images I'd generate weren't being used. Also, it seems if you change the order of the items in the contents portion of the JSON, the background image will render in all black with none of the images. The app's docs leave a little for serendipitous discover.

Is this on the right track?

image

The Read Me First is a .webloc with an icon. Right now it just lands on the community docs home page.

@michaelherger
Copy link
Member Author

Oh, you went all the way to actually building the image? Wow 😀!

I've read about a bug which would make the background disappear... (LinusU/node-appdmg#227)

What about the content for the read me link?

@mikecappella
Copy link

I tripped over some of the same issues in #277. Finicky app.

I was think it was time to write up some instructions, perhaps landing at Getting Started and directing to an Quit + Uninstall section. I assume migration from 8.x is the priority, then basic updating using 9.x ?

I wonder if there should be some script to shut down LMS, remove the current version, etc.? Or should we rely simply on directions?

@mikecappella
Copy link

I've carried on over here.

@mikecappella
Copy link

Sorry, just checking so I can finish up, or abandon work. Is there no interest in the proposal I have for the installer and updated dmg?

@michaelherger
Copy link
Member Author

That's the problem with discussing the same topic in two places: the answer is always on the other side 😁. I responded on the linked thread in the forums. I believe adding an AppleScript kind of defeats the purpose of a simple drag'n'drop DMG installation. We would rather re-introduce an installer, like we had before.

FWIW: I've tweaked some of the existing menu item's behaviour for the update use case. It should stop LMS and quit the menu after opening the DMG from the menu. Hopefully this simplifies at least this use case already.

@mikecappella
Copy link

And two different topics as well. Sorry about that. I don't see a response addressing the DMG and results I'd shown, but no matter.

I was trying to resolve the issue re: DnD can't work until both slimserver.pl has been stopped and the Platypus app has been quit. This requires ordered steps (which requires more reading documentation). I was aiming to eliminate ordered steps, and just do what the user really wants - install or update... done. So DnD isn't quit so simple here. I can't think of another Mac app that provides a DMG and implies simple DnD that requires ordered steps. Quitting the app first, sure. I was also hoping to reduce / eliminate the documentation that explains steps when user's shouldn't need to care about these details.

But I fully agree - a real installer is the right way to go here (that's what the AppleScript was substituting ... until that arrived).

FYI: I've never seen an Update offer in the Platypus menu. Perhaps because I'm on dev builds?

@michaelherger
Copy link
Member Author

I added some changes to the "Update LMS" menu item yesterday: if you choose to update from that menu it would stop LMS and quite the menu bar item before opening the DMG (see commit a37c8eda). In that case D'n'D should work.

BTW: I see part of this issue often with applications coming in a DMG. An app would tell me there was an update, but I'd have to quit it manually before being able to update it.

Make sure you have update checks enabled in LMS.

@mikecappella
Copy link

mikecappella commented Dec 14, 2024

Make sure you have update checks enabled in LMS.

Update "checking" was enabled. But auto-downloading was not. Apparently this is required.

Nonetheless, there's a path issue finding required modules:

com.slimdevices.updatecheck runs

 "/Applications/Lyrion Music Server.app/Contents/MacOS/check-update.pl"

with a working directory of

"/Applications/Lyrion Music Server.app/Contents/MacOS"

And this occurs:

Can't locate Slim/Utils/Light.pm in @INC (you may need to install the Slim::Utils::Light module) (@INC contains: /Applications/Lyrion Music Server.app/Contents/MacOS/../.. /Applications/Lyrion Music Server.app/Contents/MacOS/../../CPAN /Library/Perl/5.34/darwin-thread-multi-2level /Library/Perl/5.34 /Network/Library/Perl/5.34/darwin-thread-multi-2level /Network/Library/Perl/5.34 /Library/Perl/Updates/5.34.1 /System/Library/Perl/5.34/darwin-thread-multi-2level /System/Library/Perl/5.34 /System/Library/Perl/Extras/5.34/darwin-thread-multi-2level /System/Library/Perl/Extras/5.34) at /Applications/Lyrion Music Server.app/Contents/MacOS/check-update.pl line 19.
BEGIN failed--compilation aborted at /Applications/Lyrion Music Server.app/Contents/MacOS/check-update.pl line 19.

check-update.pl :

use strict;
use FindBin qw($Bin);

BEGIN {
	my $libPath = "$Bin/../..";

	# This works like 'use lib'
	# prepend our directories to @INC so we look there first.
	unshift @INC, $libPath, "$libPath/CPAN";
}

...

use Slim::Utils::Light;

but it clearly will work fine from the server (and it does):

Resources/server/Slim/Utils/OS/OSX.pm
385: my $script = Slim::Utils::Misc::findbin('check-update.pl');

But from a user agent service, you need the path:

../Resources/server/

Perhaps you want to set libPath like:

my $libPath = $ENV{'LMS_NOTIFICATION_CONTENT'} ? "$Bin/../Resources/server" : "$Bin/../..";

Furthermore...

/usr/bin/perl check-update.pl
zsh: segmentation fault  /usr/bin/perl check-update.pl

So perhaps you want to use Lyrion's perl, and not macOS' version. This:

/Applications/Lyrion\ Music\ Server.app/Contents/MacOS/perl check-update.pl

works fine.

@mikecappella
Copy link

mikecappella commented Dec 14, 2024

Change the plist portion:

	<key>ProgramArguments</key>
	<array>
		<string>/Applications/Lyrion Music Server.app/Contents/MacOS/perl</string>
		<string>/Applications/Lyrion Music Server.app/Contents/MacOS/check-update.pl</string>
	</array>

And with that...

image

@michaelherger
Copy link
Member Author

Thanks a lot! I remember I had seen some of that a few days ago - and already forgot about it. I'll have a change short.y Hopefully this will fix this.

@michaelherger michaelherger moved this from In progress to In review in Next Release Dec 19, 2024
@mikecappella
Copy link

This starting/stopping, etc. via the App has turned out to be very nice and works well. Great work.

@github-project-automation github-project-automation bot moved this from In review to Done in Next Release Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants