Author Topic: Compiling apps for Sailfish  (Read 3784 times)

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Compiling apps for Sailfish
« on: July 19, 2018, 06:39:01 pm »
Hopefully you are reading this even with the silly title. One thing I love about sailfish is that it is a linux distro, and as such can do things like compile third party apps. I compile on the gemini, and it is actually pretty good. With 10 processors, you can compile things quick smart. Anyway, I have compiled ffmpeg, which can be used to convert media from almost any formats. It also has a very basic video player which uses SDL. It works really well except for the sound (silly pulseaudio....). Does anyone have experience getting SDL2 sound working on sailfish? I was going to wrap a nice QML gui around it so it can be used as a generic video player.

Secondly, I compiled scummvm (I love the old point and click games like discworld, monkey island etc). It compiles, but SDL2 on sailfish doesn't natively support landscape, so I am creating a video mode scaler for it. There are a few other issues like sound and touchscreen which need a bit of a push as well, but hopefully I can get a working scummvm soon.

If anyone has any pointers on SDL2 sound on sailfish, please post them. Thanks.

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Compiling apps for Sailfish
« Reply #1 on: July 30, 2018, 10:30:37 am »
Quote from: vader
Hopefully you are reading this even with the silly title. One thing I love about sailfish is that it is a linux distro, and as such can do things like compile third party apps. I compile on the gemini, and it is actually pretty good.
How are you compiling? I assume you've downloaded the customary tools and the source tarballs -- are you compiling from mainstream source repositories, some trick port repositories, or what? It would be cool if we could d/l the tarball of any old thing and compile it, but this sounds almost too easy.
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Compiling apps for Sailfish
« Reply #2 on: July 31, 2018, 02:32:50 am »
Quote from: depscribe
Quote from: vader
Hopefully you are reading this even with the silly title. One thing I love about sailfish is that it is a linux distro, and as such can do things like compile third party apps. I compile on the gemini, and it is actually pretty good.
How are you compiling? I assume you've downloaded the customary tools and the source tarballs -- are you compiling from mainstream source repositories, some trick port repositories, or what? It would be cool if we could d/l the tarball of any old thing and compile it, but this sounds almost too easy.

That is pretty much all I do. I have installed the gcc tools, make, cmake etc. I cloned (git) the ffmpeg source, ran ./configure, added the correct options - namely --arch=armv8 (it fails with aarch64 btw), added the required libraries and compiled. Make sure you do something like:

make -j 9

So that you use 9 threads (CPUs). I was generous and left one for the gemini to keep doing its thing. I also patched a few things to get the correct rotation, as the gemini by default is LandscapeInverted. SDL2 sound still isn't working, but from what I can see it is an SDL/pulseaudio thing - still looking into it. The video plays well though - much better than the builtin gstreamer, or LLsVideoPlayer. Sailfish uses wayland, but has SDL2 and GLES libs, so if your app can make use of SDL, then all is good. I don't have Xwayland running, so pretty much all X apps wont run without mods. Qt stuff should work as well.

I am starting to learn QML - might as well play nicely. For that, there is a native IDE called tIDE - which works well. You can create projects, edit, run, build and package from tIDE. Its almost painless

You can of course build/run command line apps, eg. inotifywait. I got mplayer compiling, but it would only use the frame buffer and didn't play nicely with Qt (flicker between background and video). So it is possible to do, but due to wayland, systemd (hiss), pulseaudio (bigger hiss), it can be a bit of a hard slog. Have a play and see how far you get.

depscribe

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Compiling apps for Sailfish
« Reply #3 on: August 18, 2018, 01:17:27 pm »
The one application I absolutely must have is something that handles Protonmail. No normal mail client will without the intervention of something called Protonmail bridge, which I use with some success on the Linux desktop and the GPD, but there's nothing close to a version for Gemini. It's possible to gain access through the default Sailfish browser, but apparently even this bites the dust with the latest version of Sailfish.

Fortunately, there is a dedicated third-party client, found here: https://github.com/protonmail-desktop/application

It works very well. And I haven't the first clue how to build it for Gemini/Sailfish.

Any sense where I might begin? I should note that while I've built a lot of stuff in the past, it was the distant past, when it was configure, make, make install. So I have next to no familiarity with the modern tools, let alone modern RPM-based systems.

UPDATE: Never mind. It uses a toolkit that itself hasn't been ported yet. Damn.
« Last Edit: August 18, 2018, 05:28:34 pm by depscribe »
dep

Atari Portfolio (yes, it still works and yes, I bought it new)
Libretto 110 CT (with docking station and all kinds of PCMCIA stuff)
And, now, a Gemini and, fortunately, a GPD Pocket