Help with creating an appimage for rawstudio?

I have been using the discontinued program rawstudio for many years. There is some development on github, but there are always problems. Since the last properly working version was made for ubuntu 14.04, I’m thinking that it should be possible to create an appimage for it that works on more recent distributions. As long as it can process dng-files, it is usable (the dnglab app helps alot in this regard, for example). I am no programmer, and have no such skills, but I have tried to create an appimage from the rawstudio daily PPA using pkg2appimage. I have only been able to create an appimage that runs on the virtual ubuntu 14.04-machine I created it on however. I realise that this program is not very popular, but it is nice, fast and lightweight, and it would be sad to see it disappear. Any help with this would be greatly appreciated.

My very basic .yml-file looks as follows, and I guess something important is missing:

app: rawstudio-daily
binpatch: true

ingredients:
dist: trusty
sources:
- deb Index of /ubuntu trusty main universe
ppas:
- rawstudio/ppa

script:
(instuctions on how to convert these ingredients to an AppImage)

For my hack software rawproc, I wrote a Perl script to wrap all the AppImage construction goofiness:

https://github.com/butcherg/rawproc/blob/master/make-appimage.pl

It’s commented to spell out usage and dependencies, but it may have some rawproc-unique logic, YMMV…

Edit: Oh, almost forgot; it also needs access to the internet in order to download the AppImage excludelist, which it uses to cull the ldd list of rawproc library dependencies…

Perhaps @probonopd can help

1 Like

Thanks! I actually came across this the other day when trying to figure out a solution. Seems like the perfect thing for what I want to do, but I didn’t really understand how to use it. I will give it a second look and see if I can figure out what to write where.

The concise instructions for using the script are in comments at the top of the file. Essentially, you run it from the command line like this (assuming the script is in the same directory):

$ make-appimage.pl rawstudio-1.0 BIN:/path/to/rawstudio CONF:/path/to/rawstudio.conf

and the script will:

  • make a directory structure;
  • copy each argument prepended with BIN: to usr/bin/;
  • copy each argument prepended with DATA: to share/$program/;
  • set executable permissions for each application in usr/bin/;
  • fill the usr/lib directory with the libraries the application requires, minus the libraries listed in the excludelist;
  • establish the unpacked location of the appimage;
  • for first-time use, insert code to offer the opportunity to install configuration/data files;
  • create the apprun script;
  • create a desktop entry;
  • finally, remove the created root directory.

Let me know how it goes; I wrote it more with rawproc in mind, and less with general use in mind…

1 Like

I’ve tried figuring out how to run the script now, but I am afraid I lack alot of basic knowledge here. Rawstudio.conf, is that a file I should be able to find somewhere? And for BIN: I do not understand what path to rawstudio I should use? To the rawstudio bin-file, to a rawstudio tarball, a deb-file, or something else? I am very grateful for all the help I can get, but as you understand I am in a bit over my head.

No problem, shell is not all that easy to do if you’re not familiar…

So, you’d want to use the path to the rawstudio bin file. If you installed it in /usr/local/bin, you’d put BIN:/usr/local/bin/rawstudio in your make-appimage.pl command.

If rawstudio has a configuration file, that’s the file/path you’d want to put in a CONF:… entry, same as for the program with BIN:… If it doesn’t don’t worry about it; the program will probably run just fine.

I have unfortunately not been able to make the script work for rawstudio. It claims to have created an exclude-list in the terminal, and exits, but no excludelist is to be seen. Any ideas as to where the problem lies?

I have been trying more with the other strategy (pkg2appimage, and appimagetool). If I extract the appimage, remove the libgmodule- and sqlite3-packages, as well as a file called dcp.so the program starts and loads thumbnails, but crashes when trying to load an image. Tried using linuxdeploy as well, but using it on the appdir created by pkg2appimage is probably not the right way to do it.

Yes, line 110 removes the excludelist after it is used. If you want to keep it, comment out this line by putting a ‘#’ character in the leftmost position of the line.

Ok, thanks! The problem is however not only that I can’t find the excludelist. When I run the script, the only thing it says it is doing is creating an excludelist, then it says it is done. Does not create appdir or anything else. The script can probably be made to work somehow, but I will give the excludelist a try in pkg2appimage first.

Did you download and install appimagetool?

https://appimage.github.io/appimagetool/

It’s listed in the dependencies as appimagetool-x86_64.AppImage

Thanks for your patience; I probably should write a section on using the script…

Yes, I have that one. And regarding patience, I think I should be the one thanking you…

This is the output in terminal:

svante@svante-VirtualBox:~$ ./make-appimage.pl rawstudio-daily BIN:/usr/bin/rawstudio-daily
rawstudio-daily…
BIN:
/usr/bin/rawstudio-daily
DATA:
–2022-01-14 01:09:02-- https://raw.githubusercontent.com/AppImage/pkg2appimage/master/excludelist
Slår upp raw.githubusercontent.com (raw.githubusercontent.com)… 185.199.111.133, 185.199.109.133, 185.199.108.133, …
Ansluter till raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443… ansluten.
HTTP-begäran skickad, väntar på svar… 200 OK
Längd: 9978 (9,7K) [text/plain]
Sparar till: “excludelist”

100%[======================================>] 9 978 --.-K/s på 0,01s

2022-01-14 01:09:02 (995 KB/s) - “excludelist” sparades [9978/9978]

Excluded: libX11.so.6
Excluded: libm.so.6
Excluded: libgio-2.0.so.0
Excluded: libgobject-2.0.so.0
Excluded: libglib-2.0.so.0
Excluded: libpthread.so.0
Excluded: libc.so.6
Excluded: libpango-1.0.so.0
Excluded: libstdc++.so.6
Excluded: libgcc_s.so.1
Excluded: libdl.so.2
Excluded: libz.so.1
Excluded: libxcb.so.1
Excluded: librt.so.1
Excluded: libpangocairo-1.0.so.0
Excluded: libpangoft2-1.0.so.0
Excluded: libfontconfig.so.1
Excluded: libfreetype.so.6
Excluded: libresolv.so.2
Excluded: libthai.so.0
Excluded: libexpat.so.1
Excluded: libharfbuzz.so.0
Excluded: libgpg-error.so.0
Excluded: libp11-kit.so.0
Excluded: libcom_err.so.2
svante@svante-VirtualBox:~$

Hmm, the next code is:

  • An in-line here-doc defining the apprun script (lines 131-220)
  • write the apprun script (222-224)
  • create and write the desktop entry (228-239)
  • the hack cps for the icon and a rawproc file - Ha, you can comment that line out… (241-243)
  • and finally, run the appimagetool to make the appimage (245)
  • the last line removes all the directory and temp files (246)

Comment out line 246, then rerun and see what files/directories get created. I’m rather surprised it fails silently…