I7 flatpak or snap package available for Ubuntu?

(John) #1

Hello everyone

Since the with current I7 package for Ubuntu (gnome-inform7_6M62-0ubuntu1_amd64.deb) the IDE crashes on startup due to the canvas utility no longer being compatible, I’m wondering if any of the maintainers are considering making a snap or flatpack version?

I appreciate that it was a great nuisance having to rebuild a .deb package every time some obscure library or utility twitched, but now that the dependencies can be included in the download (which is what snap and flatpack are designed to do) hopefully the load on maintainers will be reduced.

By the way, installing the windows version using Wine results in the IDE opening, but crashing the first time that compilation is attempted due to an unhandled exception. I’d be happy to send the backtrace report to anyone interested but it seemed a bit long to paste here.

2 Likes
#2

There is a flatpak already:
https://flathub.org/apps/details/com.inform7.IDE

I’m running the deb package on Ubuntu with only minor issues though (it sometimes crashes, but not on startup).

2 Likes
(John) #3

Marvellous! Thanks for the link. I’ll try it and report back.

(John) #4

Thanks Stian

Flatpack downloaded and installed. I’ve successfully compiled a simple test game, but I don’t seem to be able to open any previous projects or even a usb drive. Is all this because it’s a flatpack?

#5

It seems there are some permission problems: GNOME Inform 7 6M62 on Fedora 29 (& other recent distros?)
I’ve never used Flatpak myself, so I’m afraid I can’t help you with that. But please let us know if you figure it out.

#6

I got curious and had a look at the Flatpak permissions system:
http://docs.flatpak.org/en/latest/sandbox-permissions-reference.html

It seems it should be able to create, load and save files in your home directory with:
flatpak --filesystem=home:create run com.inform7.IDE

(John) #7

Hi Stan

Yes, I’ve been tinkering with the permissions and am just putting together a howto. I’ve not been able to get it all working but thought I’d post what I’ve managed. Stand by! :slight_smile:

1 Like
(John) #8

Okay, I’ve worked on this a bit, and have managed to make some minor improvements, but there are still some problems I can’t work out.

What’s happening is that the Inform7 flatpak has been built with the default minimum permissons. One of the stated aims of Flatpak is to improve security between applications, so it’s not surprising that these are pretty restrictive.

What we have to do to render the flatpak usable is to override the default permissions using the terminal.

so, open a terminal window and type:

sudo flatpak override com.inform7.IDE --filesystem=home:create

You’ll be asked for your user password and then the ability to create folders will be permitted.

You’ll now be able to create a new project folder (within your home directory) and I7 will be able to save your new project to it.

If you want to keep your I7 projects somewhere other than your home directory, then substitute “host” for “home” so:

sudo flatpak override com.inform7.IDE --filesystem=host:create

This allows access to a subset of “safe” directories on the system, but access to root and other “sensitive” directories is still forbidden.

Unfortunately, when you re-open the I7 IDE, you still won’t be able to browse to that folder and re-open it; (everything remains grayed out) but the “Open last project” button will work, and from there if you click on “File” the “recent” list will also work.

The flatpak is also forbidden to access the net, but this can be over-ridden with:

sudo flatpak override com.inform7.IDE --share=network

This did indeed allow the flatpak to access the 'net, and should in theory allow the IDE to download extensions, but I found the download links didn’t work, producing the error ““Assorted Text Generation.i7x?id=1” by Emily Short could not be downloaded. The error was: Operation not supportedOperation not supported”. Clicking on the download all button crashed the app.

If you want to check what overrides you’ve allowed, then type:

flatpak override com.inform7.IDE --show

(no need for sudo)

If you want to rescind permissions, it appears that you must reset them and then start again.

sudo flatpak override com.inform7.IDE --reset (not tested)

Note that if you don’t specify a particular flatpak (as we’re doing) then you’re granting permissions etc. for all flatpaks on your system.

Hope that helps.

4 Likes
#9

Having progressing further than my first little demo-project, I eventually discovered that the inability to browse when opening a project is also a problem with the deb-package for Ubuntu 18.04. That is, when choosing “open project”, all folders are greyed out.

I then compiled it from source, thinking that at least would work, but the same thing happens then.

One thing I did learn when compiling it was why the goocanvas libraries available on Ubuntu 18.04 does not work with Inform 7: It is built with GTK 3, while Inform 7 and the other dependencies are built with GTK 2. For this reason I needed to download the older goocanvas-dev package in order to be able to compile it.

I guess the best way to get a properly working Inform 7 running on Ubuntu is to port it to GTK 3.

EDIT: I saw now there’s an open bug report about it too: http://inform7.com/mantis/view.php?id=1985

Unexpected file dialog behavior in GNOME version of Inform 7 GUI
#10

I managed to modify the source so that the file dialogue seems to work. There are two files, file.c and story.c that contain the following line:

gtk_file_filter_add_pattern(filter, “*.inform”);

By removing .inform from these, I was able to restore file browsing in the open dialogue. One thing though: When opening a project, I’m not allowed to choose my main project folder but rather have to choose the subfolder projectname.inform. I’m not sure whether this means that the projectname.materials folder is ignored or not (my materials folders are all empty).

#11

Inform 7 is based on a weird MacOS convention where the contents of the .inform folder are hidden, but the .materials folder is accessible to the user. That’s why it’s a second folder parallel to the .inform folder, because users needed to be able to open it to add files etc. It’s not a convention that works in the other OSes though, and it makes opening a project kinda weird.

(John) #12

Thanks Stian, but recompiling from source is a bit – okay, a lot – beyond my skillset. I’ll just have to put I7 on the back burner again. It all feels too sketchy to start putting a lot of work into a project (and no matter how small they start out, they all grow, just like Topsy!) only to have it keel over.

Thanks again for your efforts though.

#13

You actually don’t have to browse to a project folder in order to open a project. In the open project dialogue, you can go to file system and then press ctrl-l. This will allow you to type the location of your project folder, e.g. /home/john/Documents/Inform7/awesomeproject/awesomeproject.inform

(John) #14

Neat! I’ll try that, thanks.