periwinkle/mist
3
17
Fork
You've already forked mist
1

Flatpak or AppImage? #34

Closed
opened 2024年08月06日 01:48:50 +02:00 by mules · 4 comments

hi peri :)

So I tried getting this running on bazzite (gaming focused distro based on fedora atomic) and it didn't go well. Getting mystify working wasn't really an issue since it doesn't have as many dependencies as mist. But I couldn't really get mist fully working, there is no doubt some user error involved but after trying for like 4hrs I gave up.

Would it be feasible to make a flatpak or appimage release that bundles all the necessary libraries?

hi peri :) So I tried getting this running on bazzite (gaming focused distro based on fedora atomic) and it didn't go well. Getting mystify working wasn't really an issue since it doesn't have as many dependencies as mist. But I couldn't really get mist fully working, there is no doubt some user error involved but after trying for like 4hrs I gave up. Would it be feasible to make a flatpak or appimage release that bundles all the necessary libraries?

interesting, surely a gaming-focused distro would just have sdl2, sdl2-image, sdl2-gfx, and sdl2-ttf already installed.

What actual problem did you have?

I'll look into alternative packaging but all I have heard from the outside is that it sucks to maintain those. we'll see.

interesting, surely a gaming-focused distro would just have sdl2, sdl2-image, sdl2-gfx, and sdl2-ttf already installed. What actual problem did you have? I'll look into alternative packaging but all I have heard from the outside is that it sucks to maintain those. we'll see.
Author
Copy link

doesn't seem like it, I checked and it only has sdl 1.2 layered by default. I ended up figuring out my issue yesterday though. I should preface this by saying I am by no means an expert at linux. Also fedora atomic does some stuff in unconventional ways in comparison to regular linux distros. It was actually two separate issues:

  1. Mist wasn't able to find the shared sdl2 libraries by default. Bazzite ships with homebrew so I used brew install sdl2 sdl2_gfx sdl2_image sdl2_ttf which seemed to install fine but when launching mist from terminal it complained with: error while loading shared libraries: libSDL2_image-2.0.so.0: cannot open shared object file: No such file or directory. I found this thread that explains that some Rust projects require you to set the library path. After going down a quick rabbit hole about the difference between library_path and ld_library_path I setup a quick bash script to set the ld_library_path then run mist and it worked fine.
  2. The second issue I was having was due to deleting my default split file. I made a quick test.msf file using mystify and selected it on first startup of mist to mess around with it. I then deleted my test.msf and later when launching mist got the following error:
panicked at src/main.rs:40:59:
called `Result::unwrap()` on an `Err` value: No such file or directory (os error 2)
sh: command substitution: line 2: syntax error: unexpected end of file
sh: line 1: Err: command not found

I worked around this by having my bash script replace my mist.cfg with one that has the def_file set to None before it starts mist. I prefer the workflow of being asked what split file to load on every launch of mist (instead of it saving the def_file to the last splits I used) so even if this bug wasn't a thing I probs would have done this anyway.

So yea long story short I had to set my LD_LIBRARY_PATH so mist could find the shared libraries and learned that it crashes when deleting the .msf that is set as the def_file. Here's my run_mist.sh script in the off chance someone else using bazzite wants to use it:

#!/bin/bash
cp /home/username/.config/mist/mist_master.cfg /home/username/.config/mist/mist.cfg
cd /var/home/username/speedrun/apps
export LD_LIBRARY_PATH="/home/linuxbrew/.linuxbrew/lib"
./mist

--

On the original topic of this issue, I do hope you consider making a flatpak or appimage version. A vast majority (95% or more) of my programs are installed via flatpak from flathub (for example: OBS, Discord/Vesktop, Prism Launcher, even random stuff like my calculator app). I use a couple of appimages when needed (most notably chatterino because their flatpak version was buggy for me). I use homebrew to install libraries like I noted above but this was like the second time I've had to do that. Important things like steam, kde stuff, and apparently sdl 1.2 are layered onto my image by default so the only thing I've ever layered on manually (using rpm-ostree) is my vpn client as it's not recommend to layer things unless absolutely necessary (layering is a immutable distro quark I think so I'm getting off track). The point I'm trying to make is that flatpaks are super duper convenient being one click/one line installs and make the app more accessible to a larger audience.

I have zero linux dev experience so I don't know what it takes to ship something with static libraries bundled together so if it sucks to maintain then I totally get not pursuing it. I was able to eventually get mist working as is so it's not necessary, just a nice to have.

doesn't seem like it, I checked and it only has sdl 1.2 layered by default. I ended up figuring out my issue yesterday though. I should preface this by saying I am by no means an expert at linux. Also fedora atomic does some stuff in unconventional ways in comparison to regular linux distros. It was actually two separate issues: 1. Mist wasn't able to find the shared sdl2 libraries by default. Bazzite ships with homebrew so I used `brew install sdl2 sdl2_gfx sdl2_image sdl2_ttf` which seemed to install fine but when launching mist from terminal it complained with: `error while loading shared libraries: libSDL2_image-2.0.so.0: cannot open shared object file: No such file or directory`. I found [this thread](https://code.whatever.social/exchange/apple/questions/40704/homebrew-installed-libraries-how-do-i-use-them#434369) that explains that some Rust projects require you to set the library path. After going down a quick rabbit hole about the [difference between library_path and ld_library_path](https://code.whatever.social/questions/4250624/ld-library-path-vs-library-path) I setup a quick bash script to set the ld_library_path then run mist and it worked fine. 2. The second issue I was having was due to deleting my default split file. I made a quick test.msf file using mystify and selected it on first startup of mist to mess around with it. I then deleted my test.msf and later when launching mist got the following error: ``` panicked at src/main.rs:40:59: called `Result::unwrap()` on an `Err` value: No such file or directory (os error 2) sh: command substitution: line 2: syntax error: unexpected end of file sh: line 1: Err: command not found ``` I worked around this by having my bash script replace my mist.cfg with one that has the def_file set to None before it starts mist. I prefer the workflow of being asked what split file to load on every launch of mist (instead of it saving the def_file to the last splits I used) so even if this bug wasn't a thing I probs would have done this anyway. So yea long story short I had to set my LD_LIBRARY_PATH so mist could find the shared libraries and learned that it crashes when deleting the .msf that is set as the def_file. Here's my run_mist.sh script in the off chance someone else using bazzite wants to use it: ``` #!/bin/bash cp /home/username/.config/mist/mist_master.cfg /home/username/.config/mist/mist.cfg cd /var/home/username/speedrun/apps export LD_LIBRARY_PATH="/home/linuxbrew/.linuxbrew/lib" ./mist ``` -- On the original topic of this issue, I do hope you consider making a flatpak or appimage version. A vast majority (95% or more) of my programs are installed via flatpak from flathub (for example: OBS, Discord/Vesktop, Prism Launcher, even random stuff like my calculator app). I use a couple of appimages when needed (most notably chatterino because their flatpak version was buggy for me). I use homebrew to install libraries like I noted above but this was like the second time I've had to do that. Important things like steam, kde stuff, and apparently sdl 1.2 are layered onto my image by default so the only thing I've ever layered on manually (using `rpm-ostree`) is my vpn client as it's not recommend to layer things unless absolutely necessary (layering is a immutable distro quark I think so I'm getting off track). The point I'm trying to make is that flatpaks are super duper convenient being one click/one line installs and make the app more accessible to a larger audience. I have zero linux dev experience so I don't know what it takes to ship something with static libraries bundled together so if it sucks to maintain then I totally get not pursuing it. I was able to eventually get mist working as is so it's not necessary, just a nice to have.

ah, I should probably fix that split file thing.

ah, I should probably fix that split file thing.

flatpak turned out to be a pain. appimage has been created and added to the latest release, works on my machine anyway.

flatpak turned out to be a pain. appimage has been created and added to the latest release, works on my machine anyway.
Sign in to join this conversation.
No Branch/Tag specified
master
restore
timer_atlas
v1.19.0
v1.18.0
v1.15.1
v1.13.1
v1.6.1
v1.5.4
v1.3.3
v1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
periwinkle/mist#34
Reference in a new issue
periwinkle/mist
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?