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

Fix the installer icon sizes #53

Closed
wants to merge 1 commit into from
Closed

Fix the installer icon sizes #53

wants to merge 1 commit into from

Conversation

mentaljam
Copy link
Collaborator

@mentaljam mentaljam commented Apr 8, 2022

Fix issue #43.

@Olf0
Copy link
Member

Olf0 commented Apr 8, 2022

Thank you very much. I am not really a fan of Bashisms, here: an array, which always can be replaced by an eval or other constructs, which also allow for multidimensional arrays. But this is not really necessary here, as all new values are just precomputed, so I considered to compute them "on the fly":

for s in 86 108 128 172
do
  prof="%{buildroot}%{hicolor_icons_dir}/${s}x${s}/apps"
  mkdir -p "$prof"
  sailfish_svg2png -z 0.$(expr ${s}128 / 256) . "$prof"
done

But, …

  • I have not had the time yet, but have you taken a look that rpmlint is actually correctly complaining that all PNG icons currently are 256x256 (which is the pixel size provided by the SVG file), when installed?
  • I have not found any documentation for sailfish_svg2png, have you?
  • I cannot even find or call sailfish_svg2png on SailfishOS 3.2.1!?! Is it only available in the Sailfish-SDK, but not on the devices?

It seems to be much more robust to deploy the icons the traditional way: As files installed by RPM. I learnt to avoid Jolla's special tooling: It is often fragile and might be altered any time.

@Olf0
Copy link
Member

Olf0 commented Apr 8, 2022

It seems to be much more robust to deploy the icons the traditional way: As files installed by RPM. I learnt to avoid Jolla's special tooling: It is often fragile and might be altered any time.

Just to notify you: I decided to pursue that. It is fail-safe and well working.

BTW, all necessary PNG icons (in 86, 108, 128 and 172 Px²) together are consuming about 20 KB.

@Olf0 Olf0 mentioned this pull request Apr 8, 2022
@Olf0 Olf0 closed this May 14, 2022
@Olf0
Copy link
Member

Olf0 commented May 14, 2022

Superseded by PR #54.

@Olf0
Copy link
Member

Olf0 commented May 15, 2022

To save Mentaljam's version, when deleting his PR branch.

Original, old version

for s in 86 108 128 172
do
  prof=${s}x${s}
  install -d %{buildroot}%{hicolor_icons_dir}/$prof/apps
  sailfish_svg2png -s 1 1 1 1 1 1 $s . %{buildroot}%{hicolor_icons_dir}/$prof/apps
done

Mentaljam's suggestion

for p in '86x86 0.336' '108x108 0.422' '128x128 0.5' '172x172 0.672'
do
  p=($p)
  sailfish_svg2png -z ${p[1]} . "%{buildroot}%{hicolor_icons_dir}/${p[0]}/apps"
done

Related thread at FSO

@Olf0 Olf0 deleted the mentaljam-patch-1 branch May 15, 2022 22:29
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.

None yet

2 participants