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

Let "make install" do the right thing. #41

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rderooy
Copy link

@rderooy rderooy commented Oct 20, 2020

This lets make install do the right thing. Instead of one 16x16 xpm
icon on Linux which looks horrible, you now get a nice desktop icon,
just like for openMSX itself.

Also updated the .desktop file, this matches what is used for the
flatpak. The PNG files are extracted from the ICO file.

And change the .desktop file to reverse DNS notation as the
freedesktop standard nowadays indicates you should use. This also
matches what is mandated by flatpak and will all help to simplify
packaging the next openMSX, not only for flatpak, but also for RPM.

This lets make install do the right thing. Instead of one 16x16 xpm
icon, you now get a nice desktop icon, just like for openMSX itself.

Also updated the .desktop file, this matches what is used for the
flatpak. And extract the PNG files from the ICO file for use on
Linux.

And change the .desktop file to reverse DNS notation as the
freedesktop standard nowadays indicates you should use. This also
matches what is mandated by flatpak and will all help to simplify
packaging the next openMSX, not only for flatpak, but also for RPM.
@MBilderbeek
Copy link
Member

Just a question: isn't that logo of 210x210 a copy of resources/bitmaps/resources/bitmaps/openMSX-Catapult-logo.png?
Did you create all these from the xcf file? Or downscaled the openMSX-Catapult-logo.png?
Anyway, would probably good to have one single source of the same thing, instead of putting multiple copies in the repo. (The downscaled ones may be an exception, but the high-res source should not be copied IMHO... Or can we even derive the downscaled ones from the source during the build?)

@rderooy
Copy link
Author

rderooy commented Sep 21, 2022

@MBilderbeek I'm a bit hazy on it, almost 2 years after creating the PR. But based on what I wrote back then, they were extracted from the ICO file. I would have preferred an SVG file, but it is better then the default 16x16 image...

identify src/catapult.ico 
src/catapult.ico[0] ICO 128x128 128x128+0+0 8-bit sRGB 0.000u 0:00.001
src/catapult.ico[1] ICO 210x210 210x210+0+0 8-bit sRGB 0.000u 0:00.001
src/catapult.ico[2] ICO 32x32 32x32+0+0 8-bit sRGB 0.000u 0:00.000
src/catapult.ico[3] ICO 48x48 48x48+0+0 8-bit sRGB 0.000u 0:00.000
src/catapult.ico[4] ICO 16x16 16x16+0+0 4-bit sRGB 0.000u 0:00.000
src/catapult.ico[5] ICO 64x64 64x64+0+0 8-bit sRGB 0.000u 0:00.000
src/catapult.ico[6] ICO 16x16 16x16+0+0 8-bit sRGB 0.000u 0:00.000
src/catapult.ico[7] ICO 32x32 32x32+0+0 4-bit sRGB 0.000u 0:00.000
src/catapult.ico[8] ICO 32x32 32x32+0+0 8-bit sRGB 0.000u 0:00.000
src/catapult.ico[9] ICO 48x48 48x48+0+0 4-bit sRGB 0.000u 0:00.000
src/catapult.ico[10] ICO 48x48 48x48+0+0 8-bit sRGB 0.000u 0:00.000
src/catapult.ico[11] ICO 64x64 64x64+0+0 4-bit sRGB 0.000u 0:00.000
src/catapult.ico[12] ICO 64x64 64x64+0+0 8-bit sRGB 0.000u 0:00.000
src/catapult.ico[13] ICO 16x16 16x16+0+0 8-bit sRGB 300510B 0.000u 0:00.000

Converting images during the build is ugly. It requires that we temporarily install for the build process some tool to convert the image. This is actually what is done right now for both the Fedora RPM package and the Flatpak. And it does not solve the basic problem of "make install" doing the right thing.

e.g.
https://src.fedoraproject.org/rpms/openmsx/blob/rawhide/f/openmsx.spec
https://github.com/flathub/org.openmsx.openMSX/blob/master/org.openmsx.openMSX.yaml

If you want me to drop the 210x210 image, fine. It is not a supported size on Linux anyway.

@MBilderbeek
Copy link
Member

What is wrong to require a tool during build? There are already tools required for that, like a compiler... So I don't think that is a bad thing.
I think the 210x210 image is the original one that Eric Boon has drawn. It is probably the source, see openMSX-Catapult-logo.xcf.

@MBilderbeek
Copy link
Member

One more question: do the changes still support an installation in /opt?

@rderooy
Copy link
Author

rderooy commented Nov 13, 2022

Yes the packages can still be installed in /opt if that is what you really want.

As I pointed out, converting the images each time is just ugly. I also consider it a hack to have to convert the images and copy them to the right location outside of make install. make install should do all the work necessary to properly setup the application. This will simplify packaging openMSX for Linux distributions. Just look at the RPM and flatpak files I liked above to see how ugly it is to package openMSX right now.

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