diff --git a/Packaging/snap/gui/devilutionx.desktop b/Packaging/snap/gui/devilutionx.desktop new file mode 100644 index 000000000..9e8a895bb --- /dev/null +++ b/Packaging/snap/gui/devilutionx.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Name=DevilutionX +GenericName=DevilutionX +Comment=Play Diablo I on Linux +Comment[da]=Spil Diablo I på Linux +Comment[de]=Spiele Diablo I unter Linux +Comment[hr]=Igrajte Diablo I na Linuxu +Exec=devilutionx +Icon=${SNAP}/meta/gui/devilutionx.png +Terminal=false +Type=Application +X-DCOP-ServiceType=Multi +X-KDE-StartupNotify=true +Categories=Game;RolePlaying; diff --git a/Packaging/snap/gui/devilutionx.png b/Packaging/snap/gui/devilutionx.png new file mode 100644 index 000000000..f0ee59eec Binary files /dev/null and b/Packaging/snap/gui/devilutionx.png differ diff --git a/Packaging/snap/local/patches/001-missing-diabdat-notice.patch b/Packaging/snap/local/patches/001-missing-diabdat-notice.patch new file mode 100644 index 000000000..08ac945ee --- /dev/null +++ b/Packaging/snap/local/patches/001-missing-diabdat-notice.patch @@ -0,0 +1,14 @@ +--- Source/appfat.cpp ++++ Source/appfat.cpp +@@ -139,7 +139,10 @@ void InsertCDDlg(const char *fileName) + 1024, + "Unable to open %s.\n" + "\n" +- "Make sure that it is in the game folder and that the file name is in all lowercase.", ++ "Make sure that it is in the game folder and that the file name is in all lowercase.\n" ++ "\n" ++ "Please copy the file diabdat.mpq from your Diablo game disc or from the GOG \n" ++ "installer to the directory ~/snap/devilutionx/common/", + fileName); + + UiErrorOkDialog("Data File Error", text); diff --git a/Packaging/snap/snapcraft.yaml b/Packaging/snap/snapcraft.yaml new file mode 100644 index 000000000..5248f83ec --- /dev/null +++ b/Packaging/snap/snapcraft.yaml @@ -0,0 +1,84 @@ +name: devilutionx +base: core18 +adopt-info: devilutionx +summary: DevilutionX - Diablo build for modern operating systems +description: | + DevilutionX is a reimplementation of Blizzard's Diablo 1, + developed by careful and deep analysis of the original game files. + + This allows you to play Diablo 1 on a wide variety of operating systems, + including GNU/Linux. + + Even though DevilutionX is an open source project, the Diablo 1 game files + are not free and protected by Blizzard's copyright. + + Therefore, you need to provide your own legitimate copy of the game. +confinement: strict +grade: stable + +apps: + devilutionx: + command: desktop-launch $SNAP/usr/bin/devilutionx --data-dir $SNAP_USER_COMMON + plugs: + - x11 + - wayland + - unity7 + - opengl + - audio-playback + - joystick + - network + - network-bind + + environment: + XDG_DATA_HOME: $SNAP_USER_COMMON/ + DBUS_FATAL_WARNINGS: 0 + +layout: + /usr/share/fonts/truetype: + bind: $SNAP/usr/share/fonts/truetype + +parts: + devilutionx: + plugin: cmake + after: [patches,desktop-glib-only] + source: https://github.com/diasurgical/devilutionx.git + source-type: git + configflags: + - '-DCMAKE_INSTALL_PREFIX=/usr' + - '-DBINARY_RELEASE=ON' + override-build: | + patch -l --binary -d$SNAPCRAFT_PART_SRC -p0 -i $SNAPCRAFT_STAGE/patches/001-missing-diabdat-notice.patch + snapcraftctl set-version "$(git -C $SNAPCRAFT_PART_SRC describe --tags)" + snapcraftctl build + + build-packages: + - cmake + - g++ + - libsdl2-dev + - libsdl2-mixer-dev + - libsdl2-ttf-dev + - libsodium-dev + + stage-packages: + - libstdc++6 + - libgl1-mesa-dri + - libgl1-mesa-glx + - libglu1-mesa + - libwayland-egl1-mesa + - libsdl2-2.0-0 + - libsdl2-mixer-2.0-0 + - libsdl2-ttf-2.0-0 + + patches: + source: snap/local/ + plugin: dump + + desktop-glib-only: + source: https://github.com/ubuntu/snapcraft-desktop-helpers.git + source-subdir: glib-only + plugin: make + build-packages: + - libglib2.0-dev + stage-packages: + - libglib2.0-bin +