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

AppImage package #25

Closed
TomBous opened this issue Mar 29, 2016 · 44 comments
Closed

AppImage package #25

TomBous opened this issue Mar 29, 2016 · 44 comments

Comments

@TomBous
Copy link

TomBous commented Mar 29, 2016

I know this app is intended for Elemenary, but it would be awesome to have an AppImage package for other distributions.

Have a look : http://appimage.org/

I would love to be able to use your app on Fedora.

Thx anyway for your hard work !

@probonopd
Copy link

Can this app be built on CentOS 6? If so, how? (Building on CentOS 6 is a good way to ensure binary compatibility with a wide variety of desktop Linux distributions.)

@ghost
Copy link

ghost commented Apr 6, 2016

Based on some light searching the EPEL repo for CentOS 6, trying to build Notes-Up on CentOS 6 may not be possible. Notes-Up requires the vala 0.26 version. The latest version for Vala is 0.10 in the EPEL repo [1].

Right now I am currently testing the application out in Ubuntu. Next week I will start on trying to get the application running on Fedora Gnome.

[1] https://dl.fedoraproject.org/pub/epel/6/x86_64/repoview/vala.html

@Philip-Scott
Copy link
Owner

Yeah, if AppImages does what i think it does, it should solve: #29 #27 #24, so im going to mark those as "Duplicates" for now, and close them so this can be the main bug tread 😄

If with AppImage it all works and it fixes everything then great! If not then it will not have support :P

See: http://www.birdieapp.eu/2016/01/23/building-our-future-on-elementary-os.html

@ghost
Copy link

ghost commented Apr 11, 2016

I will look into AppImage this week then.

@Philip-Scott
Copy link
Owner

@demonpig: Thank you for your help Max! 😃

@probonopd
Copy link

@demonpig still working on this?

@probonopd
Copy link

Ping @demonpig

@demonpig
Copy link
Contributor

Hey guys, I am really, really sorry for being absent all this time. I dont have an excuse besides just forgetting all about this. I will be trying to get it packaged this weekend for AppImage. Will update this thread on Sunday of the results.

@Philip-Scott
Copy link
Owner

@demonpig I really appreciate that, thanks :) And don't worry

@demonpig
Copy link
Contributor

OK. So the weekend was a lot more busy than I would have liked. But I was able to get Notes-up packaged into an AppImage. The base OS that I am using is elementary 0.3.2 (Freya). When I try to run the AppImage on openSUSE Leap 42.2 I was getting an error message:

Schema not installed 'org.notes'

So I still have some more work to do to get it properly packaged.

@Philip-Scott
Copy link
Owner

Philip-Scott commented Nov 28, 2016

Ahh yeah, that's a problem with using Granite.Settings. If the schema is not installed, it causes that error since it expects it to be installed

If you want to get rid of it for now, you can change 'Granite.Services.Settings' to 'Object' in https://github.com/Philip-Scott/Notes-up/blob/master/src/Services/Settings.vala, and give some default values to the properties. But hopefully you'll be able to package it properly :)

Thank you for your time btw!

@demonpig
Copy link
Contributor

Well I solved the schema not installed issue. I had to run the following command:

glib-compile-schemas ./usr/share/glib-2.0/schemas

The file path is local to the AppImage. Now I am working on other issues:

(Notes:16796): CRITICAL **: file /build/notes-up-HEDxs2/notes-up-0.1/src/Widgets/Headerbar.vala: line 115: uncaught error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.elementary.Contractor was not provided by any .service files (g-dbus-error-quark, 2)

./Notes-0.1.glibc2.14-x86_64.AppImage: symbol lookup error: /usr/lib64/libpangoft2-1.0.so.0: undefined symbol: hb_buffer_set_cluster_level

This is me trying to run the newly packaged AppImage on openSUSE 42.2 Gnome Edition.

@Philip-Scott
Copy link
Owner

I can get rid of contractor using compiler flags such as #If_ELEMENTARY

Contractor is a utility to allow apps passing things to other apps easily such as Send by Email, Compress and other actions, but it's really an elementary thing

@demonpig
Copy link
Contributor

Would that be something easy to implement? I am not too handy with CMake or Vala. I think we are almost there with packaging this into an AppImage. I will look into the libpango issue.

@Philip-Scott
Copy link
Owner

I honestly have no idea on how to set them up using CMake, but iirc there is at least another elementary project using them. So I'll look into that :) (I probably won't have time this week though... I'm on my last week of the semester)

If i'm not mistaken, if you remove this block of code it should get rid of the contractor problem. The compiler flag i set up will basically just get rid of those lines

@demonpig
Copy link
Contributor

I will try that and re-compile and repackage to see if that works. Good luck with exams!

@demonpig
Copy link
Contributor

So I have added a conditional compilation statement around the Contractor-specific code. In other words, the program can be compiled without using Contractor. I will submit a pull request on Sunday for review. Just want to clean up the sloppy code i wrote.

@Philip-Scott
Copy link
Owner

Philip-Scott commented Dec 17, 2016

I am so sorry, i completely forgot about it until i got your email.

With the newest branch, you should be able to run
cmake -D noele:BOOL=TRUE .. -DCMAKE_INSTALL_PREFIX=/usr
and it will remove all the elementary-only features :)

It's currently on the Plugins branch since that the current development branch while i'm using master as "stable" :)

https://github.com/Philip-Scott/Notes-up/tree/Plugins

@demonpig
Copy link
Contributor

LOL. OK. I will work with that branch then.

@demonpig
Copy link
Contributor

Sorry that I have not been working on this. I will back around to working on this next month.

@demonpig
Copy link
Contributor

Got an initial script that will build an AppImage for Notes-Up. This is still experimental as I need to figure out what dependencies need to be bundled with the image.

@probonopd
Copy link

@demonpig can I have a look at your script? Where is it?

@demonpig
Copy link
Contributor

@probonopd The AppImage is built on Elementary OS 0.4.1.

Link: https://github.com/demonpig/AppImages/blob/add_notes-up/recipes/notes-up/Recipe

@probonopd
Copy link

Have a look at linuxdeployqt. It works on non-Qt applications, too, and copies in the required libraries for you. https://github.com/probonopd/linuxdeployqt

@demonpig
Copy link
Contributor

@probonopd I wonder if I am doing something wrong with the linuxdeployqt program as it did not copy any required libraries into the AppDir directory. What i did notice is that it took care of setting up the AppRun, desktop file, and application icon. Once the linuxdeployqt program was done running, I ran the appimagetool to create the app image. But the AppImage does not run since Notes-Up will fail if it detects that the gsettings schema is not installed.
screenshot from 2017-07-18 21-41-53

@leoek
Copy link

leoek commented Nov 11, 2017

@Philip-Scott Thanks for this useful tool. I wanted to try it but couldn't get it to run on Mint 18.x with Mate Desktop (Gnome 2). However because there was no way to install it properly on my setup, I made a docker image and a script to run it in a container.

I figured that it might be helpful for those who can't run it because of a missing dependency.

You can find everything needed to run it in a docker container here: https://github.com/leoek/docker-notes-up

*edit posting it here because this was the thread which was marked as duplicate of all the issue about installing it on not elementary (#29 #27 #24) and running it in a container should help with these issues too.

@probonopd
Copy link

@demonpig can you get it to build on Travis CI, then I can have a look at how to fix that issue. Thanks.

@demonpig
Copy link
Contributor

demonpig commented Nov 13, 2017

@probonopd I was able to fix the issue that I had previously. Once linuxdeployqt is done doing its thing, I simply replace AppRun with a shell script that sets GSETTINGS_SCHEMA_DIR. Now I am running into a different issue:

/tmp/.mount_Notes-6yLlgA/usr/bin/notes-up: symbol lookup error: /usr/lib64/libpangoft2-1.0.so.0: undefined symbol: hb_font_funcs_set_variation_glyph_func

I have set the LD_LIBRARY_PATH to use the $APPDIR/usr/lib before $HOST/usr/. At the moment, I am trying to figure out how to work around this.

I have never used TravisCI before so tonight I will learn about it and get something setup on it this week.

Link: https://github.com/demonpig/AppImages/blob/add_notes-up/recipes/notes-up/Recipe

Notes:

  • My host OS is openSUSE Tumbleweed
  • Building AppImage on elementary OS Loki

@probonopd
Copy link

@demonpig yes that's a way to do it. Can you build on Ubuntu 14.04 please? That way the AppImage will become more compatible to older target systems (such as the oldest still-supported LTS), and hopefully the HarfBuzz error will go away, too. If it doesn't, then we need to reconsider what we need to bundle. Possibly we need to bundle libpangoft2-1.0.so as well.

@probonopd
Copy link

probonopd commented Nov 13, 2017

So, according to the error above, the libpangoft2-1.0.so from your system is trying to use the symbol hb_font_funcs_set_variation_glyph_func in libharfbuzz.so which was added there only recently in version 1.2.3 according to https://abi-laboratory.pro/index.php?view=navigator&symbol=hb_font_funcs_set_variation_glyph_func#result, and your AppImage probably bundles an older version of said library. Hence the idea to also bundle an older version of libpangoft2-1.0.so which should not require the newer HarfBuzz.

@probonopd
Copy link

Actually you seem to be doing this here

https://github.com/demonpig/AppImages/blob/468b8768c9b35f28619ad118f0aa6840fe937c1b/recipes/notes-up/Recipe#L51-L58

Probably this is an issue in linuxdeployqt and we should change

https://github.com/probonopd/linuxdeployqt/blob/5dc2aaea62c0222dd7952fd9e0832e8fcdfcf672/tools/linuxdeployqt/shared.cpp#L453

to either not bundle HarfBuzz, or also bundle libpangoft2-1.0.so, as discussed in AppImageCommunity/pkg2appimage#110.

@demonpig
Copy link
Contributor

@probonopd To tell you the truth, I do not believe it will compile on Ubuntu 14.04 due to a dependency of webkit2gtk-4.0 which was merged as of this commit 761b32c. I will give it a shot though once I can get a working AppImage on Loki.

@fbruetting
Copy link

fbruetting commented Nov 27, 2017

I would love to be able to use your app on Fedora.

flatpak install flathub com.github.philip_scott.notes-up Where’s the problem? O_o

Flatpak is available on pretty much every system, provides good sandboxing, leads to less issues as versions dependencys are pretty clear, and most important, this approach doesn’t lead to the users thinking they should download random software from the internet, mark it as executable and run it (what is the root issue of malware on windows machines).

@TomBous
Copy link
Author

TomBous commented Nov 27, 2017

@fbruetting The issue was submitted on march 2016, at this time Flatpack wasn't heavily deployed as it is right now. I agree with you about the benefits of Flatpack, btw i'm using Notes-up flatpack since Fedora 26 ;-)

@probonopd
Copy link

@TomBous will you still provide an AppImage for the rest of us who don't run Flatpak?

@probonopd
Copy link

Is this a no @Philip-Scott? An AppImage is missing from https://github.com/Philip-Scott/Notes-up/releases but this was closed without comment.

@Philip-Scott
Copy link
Owner

Ahh looked like I never sent the message. I'm closing it since no progress has been done since 2017, and the flatpak that's available just works

Here's the link for the flatpak page where you can install it: https://flathub.org/apps/details/com.github.philip_scott.notes-up

@leoek
Copy link

leoek commented Feb 5, 2019

@Philip-Scott Did you check out my solution, with running this inside a docker container: #25 (comment) ? Should I put a merge Request together to document that option and/or add the script and Dockerfile to this repository?

@probonopd
Copy link

It's nice that there is a Flatpak but AppImage serves a very different purpose. So I'd still be interested in seeing one.

@Philip-Scott
Copy link
Owner

@leoek Honestly, imo docker isn't the best way to run this application, while it works it's honestly a super hacky way to do it xD (But its a very cool way to run UI apps :) I once ran Spotify like that!) But since I'd honestly won't endose it as an official way to run it, hope you understand :)

@probonopd What other different purpose? The purpose is just being able to bring the app to users right? I think that the PPA, Flatpak and the package also being available in OpenSUSE and Arch should be good enough IMO

@fbruetting
Copy link

@Philip-Scott Don’t get fooled by @probonopd, he’s just trying to get your application on his stupid list on his appimages website. He’s posting these kind of requests in hundreds of repositories – so it’s pretty obvious, that he personally has no interest in Notes-up at all, and instead just tries to waste your time solely for the purpose of bragging more with his appimages. As you can see, he also has no arguments, and the ridiculous advantages he lists on his website are mostly made up. Just look and you will see.

@fbruetting
Copy link

@leoek Containers are things for server applications, i.e. programs that for example require webservers or databases or have to serve a lot of clients. The equivalent to containers for normal applications are Flatpaks – the systems behind those techniques are partly the same. You might try out GTK Broadway, it you want to run GTK applications in browsers.

And you might want to try out Podman instead of Docker, by the way – there you can get rootless (i.e. more secure) containers and everything is not tied to a single daemon.

@probonopd
Copy link

probonopd commented Feb 6, 2019

@fbruetting I respectfully request that you don't spread FUD. I am personally interested helping application developers ship their software to end users in a straightforward way that does not need app stores and the like and that works on Live ISOs (which I use myself every day), and I have helped hundreds of projects (including well-known ones like Inkscape) to do this.

The original poster asked for an AppImage, and so do I. Also, I'm happy to help.

@leoek
Copy link

leoek commented Feb 7, 2019

@Philip-Scott I understand if you don't want it in the repository, although I don't really think of it, as a "hacky way" to run it.

@fbruetting Containers are not only for servers ;) Flatpak is basically kind of a container solution too. (as you even mentioned)
GTK Broadway sounds like a project, however I don't understand why I would want to run my GTK application in a browser if I can have it directly and in it's own window, which is the case with the docker solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants