rooklift / nibbler

Chess analysis GUI for UCI engines, with extra features for Leela (Lc0) in particular.
GNU General Public License v3.0
572 stars 71 forks source link

Add Linux packaging resources #210

Closed cyqsimon closed 1 year ago

cyqsimon commented 1 year ago

Closes #172.

I was going through my old issues and saw this one, so I thought I'd finish it up.

I used the icon from https://github.com/rooklift/nibbler/issues/47#issuecomment-657897858. @ciriousjoker

Providing these files is sufficient on Linux; the rest (installing those files) is the packagers' job that we need not worry about. (FYI .desktop goes in /usr/share/applications; icon goes in /usr/share/icons/hicolor/512x512/apps or /usr/share/pixmaps.)

I'm not certain how to properly package icons on Windows though, sorry ¯\_(ツ)_/¯. Maybe some changes need to be made in Electron's manifest or something. But at least having the files doesn't hurt.

What it looks like on KDE

In the launcher: shot-20221212-145707

Launched: shot-20221212-145527

cyqsimon commented 1 year ago

I realised that we still need to update builder.py and install.sh.

I am not that familiar with Python. @rooklift can you please help update builder.py to include these files? (I think you have permission to push to my branch.) Then I can update install.sh depending on where you put them. Thanks.

ciriousjoker commented 1 year ago

Woohoo! One OS at a time guys! ;)

rooklift commented 1 year ago

If you just want these included in the repo for Linux users to copy, I guess that's fine. I suggest they go in /src/res rather than just /res.

cyqsimon commented 1 year ago

Is it possible to use an svg icon or does that lead to incompatibilities with some DEs?

I think SVG icon support is mandated by FreeDesktop, so there shouldn't be any issues. I only used PNG because I didn't have a SVG =(. Can you post/link one?

cyqsimon commented 1 year ago

I suggest they go in /src/res rather than just /res.

Okay, will do.

rooklift commented 1 year ago

Also builder.py is really just for my own use, I guess you don't need to worry about that.

cyqsimon commented 1 year ago

Also builder.py is really just for my own use, I guess you don't need to worry about that.

Unfortunately it does matter if we use the current install.sh. What it does is that it grabs the release zip file, and extracts its contents. If I understand correctly, the release zips are generated by builder.py, so it would have to be updated to include res/*.

Alternatively I can rewrite install.sh, since I think it's pretty janky in its current state. Since the original author is here as well, I will open a new issue to discuss this with @ciriousjoker .

Edit: sorry, wrong person. For some reason I thought ciriousjoker wrote the script.

ciriousjoker commented 1 year ago

Is it possible to use an svg icon or does that lead to incompatibilities with some DEs?

I think SVG icon support is mandated by FreeDesktop, so there shouldn't be any issues. I only used PNG because I didn't have a SVG =(. Can you post/link one?

I was preparing the svgs, here are all the files I created:

AppIcon_sources.zip

I also created an updated version which I think looks much cleaner (warped glass + gradients) and cleaned up the Illustrator files.

Can you create a PR for this separately?

cyqsimon commented 1 year ago

Can you create a PR for this separately?

I mean, this icon is your work. Are you sure you want me to create this PR?

ciriousjoker commented 1 year ago

@cyqsimon I'm not too familar with Freedesktop and I don't have a test environment right now to make sure the PR is working. I assume all I have to do is replace the nibbler.png with nibbler.svg? In that case sure I can create it.

cyqsimon commented 1 year ago

I assume all I have to do is replace the nibbler.png with nibbler.svg?

Yep. I'll do the rest.