Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

21
dists/snap/LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Snapcrafters
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

78
dists/snap/README.md Normal file
View File

@@ -0,0 +1,78 @@
<h1 align="center">
<img src="https://raw.githubusercontent.com/scummvm/scummvm/master/icons/scummvm.ico" alt="ScummVM">
<br />
ScummVM
</h1>
<p align="center"><b>This is the snap for ScummVM</b>, <i>"ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files."</i>. It works on Ubuntu, Fedora, Debian, and other major Linux
distributions.</p>
<!-- Uncomment and modify this when you are provided a build status badge
<p align="center">
<a href="https://build.snapcraft.io/user/snapcrafters/fork-and-rename-me"><img src="https://build.snapcraft.io/badge/snapcrafters/fork-and-rename-me.svg" alt="Snap Status"></a>
</p>
-->
## Install
sudo snap install scummvm
([Don't have snapd installed?](https://snapcraft.io/docs/core/install))
<!-- Uncomment and modify this when you have a screenshot
![my-snap-name](screenshot.png?raw=true "my-snap-name")
-->
<p align="center">Published for <img src="http://anything.codes/slack-emoji-for-techies/emoji/tux.png" align="top" width="24" /> with :gift_heart: by Snapcrafters</p>
## Remaining tasks
Snapcrafters ([join us](https://forum.snapcraft.io/t/join-snapcrafters/1325))
are working to land snap install documentation and
the [snapcraft.yaml](https://github.com/snapcrafters/fork-and-rename-me/blob/master/snap/snapcraft.yaml)
upstream so ScummVM can authoritatively publish future releases.
- [x] Fork the [Snapcrafters template](https://github.com/snapcrafters/fork-and-rename-me) repository to your own GitHub account.
- If you have already forked the Snapcrafter template to your account and want to create another snap, you'll need to use GitHub's [Import repository](https://github.com/new/import) feature because you can only fork a repository once.
- [x] Rename the forked Snapcrafters template repository
- [x] Update logos and references to `[Project]` and `[my-snap-name]`
- [ ] Create a snap that runs in `devmode`
- [x] Register the snap in the store, **using the preferred upstream name**
- [ ] Add a screenshot to this `README.md`
- [ ] Publish the `devmode` snap in the Snap store edge channel
- [x] Add install instructions to this `README.md`
- [ ] Update snap store metadata, icons and screenshots
- [x] Convert the snap to `strict` confinement, or `classic` confinement if it qualifies
- [ ] Publish the confined snap in the Snap store beta channel
- [x] Update the install instructions in this `README.md`
- [ ] Post a call for testing on the [Snapcraft Forum](https://forum.snapcraft.io) - [link]()
- [ ] Ask a [Snapcrafters admin](https://github.com/orgs/snapcrafters/people?query=%20role%3Aowner) to fork your repo into github.com/snapcrafters, transfer the snap name from you to snapcrafters, and configure the repo for automatic publishing into edge on commit
- [ ] Add the provided Snapcraft build badge to this `README.md`
- [x] Publish the snap in the Snap store stable channel
- [x] Update the install instructions in this `README.md`
- [ ] Post an announcement in the [Snapcraft Forum](https://forum.snapcraft.io) - [link]()
- [ ] Submit a pull request or patch upstream that adds snap install documentation - [link]()
- [ ] Submit a pull request or patch upstream that adds the `snapcraft.yaml` and any required assets/launchers - [link]()
- [ ] Add upstream contact information to the `README.md`
- If upstream accept the PR:
- [ ] Request upstream create a Snap store account
- [ ] Contact the Snap Advocacy team to request the snap be transferred to upstream
- [ ] Ask the Snap Advocacy team to celebrate the snap - [link]()
If you have any questions, [post in the Snapcraft forum](https://forum.snapcraft.io).
<!--
## The Snapcrafters
| [![Your Name](http://gravatar.com/avatar/bc0bced65e963eb5c3a16cab8b004431/?s=128)](https://github.com/yourname/) |
| :---: |
| [Your Name](https://github.com/yourname/) |
-->
<!-- Uncomment and modify this when you have upstream contacts
## Upstream
| [![Upstream Name](http://gravatar.com/avatar/bc0bced65e963eb5c3a16cab8b004431?s=128)](https://github.com/upstreamname) |
| :---: |
| [Upstream Name](https://github.com/upstreamname) |
-->

View File

@@ -0,0 +1,25 @@
#!/bin/sh
real_xdg_runtime_dir=$(dirname "${XDG_RUNTIME_DIR}")
real_wayland=${real_xdg_runtime_dir}/${WAYLAND_DISPLAY:-wayland-0}
if [ ! -O "${real_wayland}" ]; then
# On core systems mir-kiosk may also need to create the host XDG_RUNTIME_DIR
if [ ! -O "${real_xdg_runtime_dir}" ]; then
echo waiting for host XDG_RUNTIME_DIR...
until [ -O "${real_xdg_runtime_dir}" ]
do
inotifywait --event create $(dirname "${real_xdg_runtime_dir}") || sleep 4
done
fi
echo waiting for Wayland socket...
until [ -O "${real_wayland}" ]
do
inotifywait --event create $(dirname "${real_wayland}") || sleep 4
done
echo ...waiting done
fi
exec "$@"

View File

@@ -0,0 +1,41 @@
#!/bin/sh
set -x
if [ -z "${XDG_CONFIG_HOME}" ]
then
if [ -z "${HOME}" ]
then XDG_CONFIG_HOME=$SNAP_USER_DATA/.config
else XDG_CONFIG_HOME=${HOME}/.config
fi
fi
if snapctl is-connected audio-playback; then
# Hook up speech-dispatcher
mkdir -p $XDG_RUNTIME_DIR/speech-dispatcher
$SNAP/usr/bin/speech-dispatcher -d -C "$SNAP/etc/speech-dispatcher" -S "$XDG_RUNTIME_DIR/speech-dispatcher/speechd.sock" -m "$SNAP/usr/lib/speech-dispatcher-modules" -t 30
else
echo "WARNING: audio-playback interface not connected, speech and audio will not work."
fi
# Initial setup
if [ ! -f "${XDG_CONFIG_HOME}/scummvm/scummvm.ini" ]; then
mkdir -p ${XDG_CONFIG_HOME}/scummvm/
echo "[scummvm]\n" >> ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
echo "aspect_ratio=true\n" >> ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
echo "gfx_mode=opengl\n" >> ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
echo "[cloud]\nrootpath=/home/${USER}/snap/scummvm/current/.local/share/scummvm" >> ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
fi
# We need to do this for the user that launches scummvm, so
# it can't be done on installation
if [ ! -f "${XDG_CONFIG_HOME}/scummvm/.added-games-bundle" ]; then
touch ${XDG_CONFIG_HOME}/scummvm/.added-games-bundle
if ! grep -E "comi|drascula|dreamweb|lure|myst|queen|sky|sword" ${XDG_CONFIG_HOME}/scummvm/scummvm.ini
then
# Register the bundled games.
$SNAP/usr/local/bin/scummvm -p /usr/share/scummvm/ --recursive --add
fi
fi
exec $SNAP/usr/local/bin/scummvm "$@"

View File

@@ -0,0 +1,13 @@
#!/bin/bash
# By default, we set SDL_VIDEODRIVER to 'wayland'.
if [ -O "$XDG_RUNTIME_DIR/${WAYLAND_DISPLAY:-wayland-0}" ] && [ -e $SNAP_COMMON/wayland.connected ]; then export SDL_VIDEODRIVER=wayland; fi
# Since GNOME doesn't have support for server-side decorations,
# we check if we are running from within a GNOME session, we
# enforce using the x11 backend for XWayland fallback support.
if [[ "$XDG_CURRENT_DESKTOP" =~ "GNOME" ]]; then
export SDL_VIDEODRIVER=x11
fi
exec "$@"

View File

@@ -0,0 +1,15 @@
[Desktop Entry]
Name=ScummVM
Comment=Interpreter for numerous adventure games and RPGs
Comment[pl]=Interpreter graficznych gier przygodowych
Comment[sv]=Tolk för flera äventyrsspel
Comment[he]=פרשן למספר משחקי הרפתקאות
Comment[de]=Interpreter für zahlreiche Abenteuerspiele und RPGs
Comment[es]=Intérprete para varias aventuras gráficas
Comment[ca]=Intèrpret per diverses aventures gràfiques
Exec=scummvm
Icon=${SNAP}/meta/gui/scummvm.png
Terminal=false
Type=Application
Categories=Game;AdventureGame;
StartupNotify=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

15
dists/snap/snap/hooks/configure vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
if [ "$(snapctl get daemon)" = "" ]; then
# By default, we run as a daemon on core, otherwise configure the daemon to stop
if grep -q -e snap_core= -e snapd_recovery_mode= /proc/cmdline
then snapctl set daemon=true
else snapctl set daemon=false
fi
fi
if [ "$(snapctl get daemon)" = "true" ]; then
snapctl start --enable $SNAP_NAME.daemon 2>&1 || true
else
snapctl stop --disable $SNAP_NAME.daemon 2>&1 || true
fi

View File

@@ -0,0 +1,3 @@
#!/bin/sh
touch $SNAP_COMMON/wayland.connected

View File

@@ -0,0 +1,3 @@
#!/bin/sh
rm -f $SNAP_COMMON/wayland.connected

View File

@@ -0,0 +1,6 @@
#!/bin/sh
set -x
# we install with the daemon disabled, the configure hook
# will start it if appropriate
snapctl stop --disable $SNAP_NAME.daemon

View File

@@ -0,0 +1,6 @@
#!/bin/sh
set -x
# we install with the daemon disabled, the configure hook
# will start it if appropriate
snapctl stop --disable $SNAP_NAME.daemon

View File

@@ -0,0 +1,273 @@
name: scummvm
base: core20
license: GPL-2.0
adopt-info: scummvm
summary: ScummVM
description: |
ScummVM is a program which allows you to run certain classic graphical
point-and-click adventure games, provided you already have their data
files. The clever part about this: ScummVM just replaces the executables
shipped with the game, allowing you to play them on systems for which
they were never designed!
Currently, ScummVM supports a huge library of adventures with over
250 games in total.
It supports many classics published by legendary studios like LucasArts,
Sierra On-Line, Revolution Software, Cyan, Inc. and Westwood Studios.
Next to ground-breaking titles like the Monkey Island series,
Broken Sword, Myst, Blade Runner and countless other games,
you will find some really obscure adventures and truly hidden gems to explore.
confinement: strict
grade: stable
compression: lzo
architectures:
- build-on: amd64
- build-on: arm64
- build-on: armhf
apps:
scummvm:
command-chain:
- snap/command-chain/alsa-launch
- bin/wayland-if-possible.sh
command: bin/scummvm-launch.sh
extensions: [gnome-3-38]
plugs:
- wayland
- x11
- opengl
- unity7
- audio-playback
- alsa
- network
- network-bind
- removable-media
- home
- gsettings
- mount-observe
- system-observe
- network-observe
- hardware-observe
- joystick
environment:
LD_LIBRARY_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
ESPEAK_DATA_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/espeak-ng-data"
DBUS_FATAL_WARNINGS: 0
daemon:
command-chain:
- bin/daemon-start.sh
- snap/command-chain/desktop-launch
- bin/wayland-if-possible.sh
command: bin/scummvm-launch.sh -f
daemon: simple
restart-condition: always
plugs:
- wayland
- opengl
- audio-playback
- alsa
- network
- network-bind
- removable-media
- joystick
- mount-observe
- system-observe
- network-observe
- hardware-observe
environment:
SDL_VIDEODRIVER: wayland
LD_LIBRARY_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/libunity/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/pulseaudio/:$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/speech-dispatcher/"
ESPEAK_DATA_PATH: "$SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/espeak-ng-data"
PULSE_SYSTEM: 1
PULSE_RUNTIME_PATH: /var/run/pulse
layout:
/usr/share/glvnd/egl_vendor.d:
bind: $SNAP/usr/share/glvnd/egl_vendor.d
/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri:
bind: $SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri
/usr/share/X11/xkb:
bind: $SNAP/usr/share/X11/xkb
/usr/share/scummvm:
bind: $SNAP/usr/share/scummvm
/usr/share/applications:
bind: $SNAP/usr/share/applications
/usr/share/alsa:
bind: $SNAP/usr/share/alsa
/usr/share/libdrm:
bind: $SNAP/usr/share/libdrm
/usr/share/drirc.d:
bind: $SNAP/usr/share/drirc.d
parts:
scummvm:
after: [alsa-mixin]
source: https://github.com/scummvm/scummvm.git
override-build: |
last_committed_tag="$(git tag --list | sed '/android\|docs/d' | tac | head -n1)"
trimmed_tag="$(echo $last_committed_tag | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')"
last_released_tag="$(snap info scummvm | awk '$1 == "latest/beta:" { print $2 }')"
# If the latest tag from the upstream project has not been released to
# beta, build that tag instead of master.
if [ "${trimmed_tag}" != "${last_released_tag}" ]; then
git fetch
git checkout -f "${last_committed_tag}"
snapcraftctl set-version $(git -C ../src tag --list | sed '/android\|docs/d' | tac | head -n1 | sed 's/desc\///' | sed 's/git//' | sed 's/^v//')
else
git checkout master
snapcraftctl set-version $(git describe | sed 's/desc\///')
fi
snapcraftctl build
strip --strip-all $SNAPCRAFT_PART_INSTALL/usr/local/bin/scummvm
plugin: autotools
autotools-configure-parameters:
- --enable-release
- --enable-tts
- --enable-opl2lpt
- --disable-debug
build-packages:
- liba52-0.7.4-dev
- libaudio-dev
- libcurl4-openssl-dev
- libfaad-dev
- libffi-dev
- libflac-dev
- libfluidsynth-dev
- libfreetype6-dev
- libfribidi-dev
- libgif-dev
- libglew-dev
- libgtk-3-dev
- libieee1284-3-dev
- libjpeg-dev
- libmad0-dev
- libmpeg2-4-dev
- libogg-dev
- libpng-dev
- libsdl2-dev
- libsdl2-net-dev
- libsndio-dev
- libspeechd-dev
- libtheora-dev
- libunity-dev
- libvorbis-dev
- zlib1g-dev
stage-packages:
- espeak-ng
- espeak-ng-data
- freeglut3
- liba52-0.7.4
- libaudio2
- libcurl4
- libdbusmenu-glib4
- libdee-1.0-4
- libfaad2
- libffi7
- libflac8
- libfluidsynth2
- libfribidi0
- libgif7
- libgl1-mesa-dri
- libgl1-mesa-glx
- libglew2.1
- libglu1-mesa
- libicu66
- libieee1284-3
- libjpeg62
- libjpeg8
- libmad0
- libmpeg2-4
- libogg0
- libpng16-16
- libpulse0
- libsdl2-2.0-0
- libsdl2-net-2.0-0
- libslang2
- libsndio7.0
- libspeechd2
- libtheora0
- libunity9
- libunity-protocol-private0
- libvorbis0a
- libvorbisfile3
- libwayland-egl1-mesa
- locales-all
- speech-dispatcher
- speech-dispatcher-audio-plugins
- speech-dispatcher-espeak-ng
- ttf-ubuntu-font-family
- zlib1g
alsa-mixin:
plugin: nil
source: https://github.com/diddlesnaps/snapcraft-alsa.git
override-pull: |
cat > asound.conf <<EOF
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}
seq.default {
type hw
}
seq.hw {
type hw
}
EOF
cat > alsa-launch <<EOF
#!/bin/bash
export ALSA_CONFIG_PATH="\$SNAP/etc/asound.conf"
if [ -d "\$SNAP/usr/lib/alsa-lib" ]; then
export LD_LIBRARY_PATH="\$LD_LIBRARY_PATH:\$SNAP/usr/lib/alsa-lib"
elif [ -d "\$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib" ]; then
export LD_LIBRARY_PATH="\$LD_LIBRARY_PATH:\$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib"
fi
export LD_LIBRARY_PATH="\$LD_LIBRARY_PATH:\$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio"
# Make PulseAudio socket available inside the snap-specific \$XDG_RUNTIME_DIR
if [ -n "\$XDG_RUNTIME_DIR" ]; then
pulsenative="pulse/native"
pulseaudio_sockpath="\$XDG_RUNTIME_DIR/../\$pulsenative"
if [ -S "\$pulseaudio_sockpath" ]; then
export PULSE_SERVER="unix:\${pulseaudio_sockpath}"
fi
fi
exec "\$@"
EOF
chmod +x alsa-launch
override-build: |
snapcraftctl build
install -m644 -D -t $SNAPCRAFT_PART_INSTALL/etc asound.conf
install -m755 -D -t $SNAPCRAFT_PART_INSTALL/snap/command-chain alsa-launch
build-packages:
- libasound2-dev
stage-packages:
- libasound2
- libasound2-plugins
- inotify-tools
scripts:
plugin: dump
source: scripts
games:
plugin: dump
source: https://downloads.scummvm.org/frs/extras/storefront/games-bundle.zip
source-checksum: sha256/5c16f3db7fda3660d1bddb52e76aa27ada8eb8268872f5e045490f3eabb603e1
organize:
games-bundle: usr/share/scummvm/