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

Logo absent in Linux package for Linux #28

Open
myselfhimself opened this issue Sep 8, 2021 · 2 comments
Open

Logo absent in Linux package for Linux #28

myselfhimself opened this issue Sep 8, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@myselfhimself
Copy link

Hello,

in order to have a nice install of the binary release (0.2.0) for Linux, I downloaded the file listed here https://github.com/rbreu/beeref/releases/tag/v0.2.0 //// BeeRef-0.2.0-linux . Added +x permission to it.

Then downloaded the .desktop file..
and the logo.svg file
Edited the .desktop file and edited the paths to logo.svg and the executable.

Worked good..

But those three files could be in a directory, itself compressed into, .tar.gz file or so for Linux users.. With a setup.sh script that makes a properly filled .desktop file and stores it in the relevant home apps folder for Linux... (according to xdesktop standards or so..). No need to install perfectly for all distributions for now... Another idea, instead of the setup.sh script, the Python executable could deal with that setup actions, silently or with a dialog ("Do you agree to add Beeref to your application shortcuts?") to be run on the first start.

Just an idea :)

@myselfhimself myselfhimself added the bug Something isn't working label Sep 8, 2021
@manuq
Copy link

manuq commented Oct 17, 2021

Or even better, it can be packaged as a flatpak and distributed in flathub.org

@LLKoder
Copy link

LLKoder commented Nov 3, 2021

I wrote small script to install for myself.
Maybe it help for you at first time.

Copy BeeRef-0.2.0-linux to /opt/BeeRef/ and rename to BeeRef.
Unpack Source code (tar.gz) to /opt/BeeRef/beeref/.
It show app for all users and use icon with all *.bee files.

EDIT: I have Ubuntu 20.04, ImageMagick.

#!/bin/bash
#

temp_dir=$(mktemp -d)

if ! [ -d /usr/local/share/applications ]
then
	mkdir -p /usr/local/share/applications
	chown root:root /usr/local/share/applications
	chmod 755 /usr/local/share/applications
fi

if ! [ -d /usr/local/share/mime ]
then
	mkdir -p /usr/local/share/mime
	chown root:root /usr/local/share/mime
	chmod 755 /usr/local/share/mime
fi

if ! [ -d /usr/local/share/mime/packages ]
then
	mkdir -p /usr/local/share/mime/packages
	chown root:root /usr/local/share/mime/packages
	chmod 755 /usr/local/share/mime/packages
fi

if ! [ -d /usr/local/share/icons ]
then
	mkdir -p /usr/local/share/icons
	chown root:root /usr/local/share/icons
	chmod 755 /usr/local/share/icons
fi

if ! [ -d /usr/local/share/icons/hicolor ]
then
	mkdir -p /usr/local/share/icons/hicolor
	chown root:root /usr/local/share/icons/hicolor
	chmod 755 /usr/local/share/icons/hicolor
fi

ln -s /opt/BeeRef/BeeRef /usr/local/bin/BeeRef
chown root:root /usr/local/bin/BeeRef
chmod 755 /usr/local/bin/BeeRef

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<mime-info xmlns=\"http://www.freedesktop.org/standards/shared-mime-info\">
  <mime-type type=\"application/x-beeref\">
    <comment>BeeRef File (*.bee)</comment>
    <icon name=\"BeeRef\"/>
    <generic-icon name=\"BeeRef\"/>
    <glob pattern=\"*.bee\"/>
  </mime-type>
</mime-info>" > ${temp_dir}/BeeRef.xml

cp /opt/BeeRef/beeref/beeref/assets/logo.png ${temp_dir}/logo.png
convert -background none -resize 128x128 ${temp_dir}/logo.png ${temp_dir}/BeeRef.png

echo "[Desktop Entry]
Type=Application
Name=BeeRef
Exec=BeeRef %f
Icon=BeeRef
NoDisplay=false
Terminal=false
Categories=Qt;KDE;Graphics;
MimeType=application/x-beeref;
StartupNotify=true" > ${temp_dir}/BeeRef.desktop

xdg-mime install --novendor --mode system ${temp_dir}/BeeRef.xml

xdg-icon-resource install --novendor --mode system --size 128 ${temp_dir}/BeeRef.png

xdg-icon-resource install --novendor --mode system --context mimetypes --size 128 ${temp_dir}/BeeRef.png

xdg-desktop-menu install --novendor --mode system ${temp_dir}/BeeRef.desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants