Snapping GZDoom

Hello,
I’m trying to make my first snap, using GZDoom. My current snapcraft.yaml can be inspected on https://github.com/Hvassaa/gzdoom-snap/blob/master/snap/snapcraft.yaml
The snap correctly builds, and most stuff seems to be in place. When I try to run the program by executing “gzdoom -iwad path_to_my_wad” it gives me a pop error with the message “Cannot find gzdoom.pk3”. I tried unsquashing and looking in the produced snap, and I found that the missing files are located in “squashfs-root/share/games/doom/”. How can I make the snap aware of these? Sorry if I’m unprecise or have misunderstood something!

I also looked at the following post Call for testing: WolfenDoom - Blade of Agony , which seems to also package gzdoom. I could not find the snapcraft.yaml to reference it though, anyone know if it’s public?

Some of the resources I have followed:
zdoomDOTorg/wiki/Compile_GZDoom_on_Linux
githubDOTcom/0x0000ff/gzdoom-snap/blob/master/snap/snapcraft.yaml (good reference, does not seem to build any more though)
(New users cant post more than 2 links apparently, so sorry for that)

Thanks,

how about

? :slight_smile:

2 Likes

Hi @hvassaa. I think gzdoom is a good one to get started with. My snapcraft.yaml for boa, as linked to by @ogra, is fairly old now and could do with being updated to use core18. I’m going to look into that soon. It also uses an old version of gzdoom because that is one which is known to work well with the mod. Have a look at the repo and I’ll try to explain any of my oddities if you have problems.

Enjoy :slight_smile:
NMP

Ah yes, thank you!
The app is running now, with the help of a desktop helper, as inspired from that repo.
Do you know how to move stuff from the “squash-filesystem” and into the ~/snap/SNAPNAME folder?
Thanks!

Ah, perfect thanks! :slight_smile:
Yes, I actually do have a couple of questions, if you do not mind! :wink:

  • What is the purpose of the launch part?

  • Audio does not seem to be working on my build right now, did you have any problems with that?

  • And I also just asked in the other response, but do you know how to move stuff from the squash-fs/snap-file and into a path in the home dir. Specificly the files in $SNAP/share/games/doom/ seems to be needed in ~/snap/gzdoom/.config/gzdoom. Or maybe it can be specefied some other way that they are there in the snap? :slight_smile: I hope the question makes sense! :slight_smile:
    (EDIT: To expand on the third point the gzdoom.ini looks as follows, and I guess they should be linked to the contents of the snap in some way:

    This file was generated by GZDoom g4.2.0 on 2019-12-09 20:05:16

    These are the directories to automatically search for IWADs.

    Each directory should be on a separate line, preceded by Path=

    [IWADSearch.Directories]
    Path=.
    Path=$DOOMWADDIR
    Path=$HOME/.config/gzdoom
    Path=/usr/local/share/doom
    Path=/usr/local/share/games/doom
    Path=/usr/share/doom
    Path=/usr/share/games/doom

    These are the directories to search for wads added with the -file

    command line parameter, if they cannot be found with the path

    as-is. Layout is the same as for IWADSearch.Directories

    [FileSearch.Directories]
    Path=$HOME/.config/gzdoom
    Path=/usr/local/share/
    Path=/usr/local/share/doom
    Path=/usr/local/share/games/doom
    Path=/usr/share/doom
    Path=/usr/share/games/doom
    Path=$DOOMWADDIR

    These are the directories to search for soundfonts that let listed in the menu.

    Layout is the same as for IWADSearch.Directories

    [SoundfontSearch.Directories]
    Path=$HOME/.config/gzdoom/soundfonts
    Path=$HOME/.config/gzdoom/fm_banks
    Path=/usr/local/share/doom/soundfonts
    Path=/usr/local/share/doom/fm_banks
    Path=/usr/local/share/games/doom/soundfonts
    Path=/usr/local/share/games/doom/fm_banks
    Path=/usr/share/doom/soundfonts
    Path=/usr/share/doom/fm_banks
    Path=/usr/share/games/doom/soundfonts
    Path=/usr/share/games/doom/fm_banks
    )

Also, not to bother you too much, but does anything else in my linked snapcraft.yaml look weird or out of place? (EDIT: besides grade and confinement of course! :wink:)
hanks so much!

Glad you’re making progress!

My launch part just dumps the content of the launcher directory (my launch script and the icon) into the snap. The launch script does all the setup I need - that’s where you could script something to copy the contents of your snap into the user’s directory if you need to do so.

The audio interfaces have changed since I wrote this snap. Being an old snap, this still gets blessed with access to the old interfaces. Maybe that’s where you’re struggling? I haven’t built a new snap since the audio interfaces changed.

Your yaml fine looks as if it is coming along nicely!