mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
POSIX: Add AppImage support
And add a target to generate the image
This commit is contained in:
parent
94aff8553d
commit
287b228af0
@ -289,14 +289,21 @@ Common::String OSystem_POSIX::getScreenshotsPath() {
|
||||
|
||||
void OSystem_POSIX::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
|
||||
#ifdef DATA_PATH
|
||||
const char *snap = getenv("SNAP");
|
||||
if (snap) {
|
||||
Common::String dataPath = Common::String(snap) + DATA_PATH;
|
||||
const char *path = nullptr;
|
||||
if (!path) {
|
||||
path = getenv("SNAP");
|
||||
}
|
||||
if (!path) {
|
||||
path = getenv("APPDIR");
|
||||
}
|
||||
if (path) {
|
||||
Common::Path dataPath(path);
|
||||
dataPath.joinInPlace(DATA_PATH);
|
||||
Common::FSNode dataNode(dataPath);
|
||||
if (dataNode.exists() && dataNode.isDirectory()) {
|
||||
// This is the same priority which is used for the data path (below),
|
||||
// but we insert this one first, so it will be searched first.
|
||||
s.add(dataPath, new Common::FSDirectory(dataNode, 4), priority);
|
||||
s.add(dataNode.getPath(), new Common::FSDirectory(dataNode, 4), priority);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
14
ports.mk
14
ports.mk
@ -597,6 +597,17 @@ publish-appcast:
|
||||
cp dists/macosx/scummvm_appcast.xml ../scummvm-web/public_html/appcasts/macosx/release.xml
|
||||
|
||||
|
||||
APPDIR = AppDir
|
||||
|
||||
# AppImage tool doesn't check for metainfo.xml, only appdata.xml
|
||||
appimage:
|
||||
@if [ -z "${LINUXDEPLOY}" ]; then echo "LINUXDEPLOY variable must be set to the path of linuxdeploy binary" >&2; exit 1; fi
|
||||
@if [ "$(prefix)" != '/usr' ]; then echo "Please re-run configure with --prefix=/usr" >&2; exit 1; fi
|
||||
rm -rf "$(APPDIR)"
|
||||
$(MAKE) install DESTDIR="$(APPDIR)"
|
||||
ln -s org.scummvm.scummvm.metainfo.xml "$(APPDIR)/$(datarootdir)/metainfo/org.scummvm.scummvm.appdata.xml"
|
||||
VERSION="$(VERSION)$(VER_REV)" "${LINUXDEPLOY}" --appdir="$(APPDIR)" -o appimage
|
||||
|
||||
#
|
||||
# Special target to generate project files for various IDEs
|
||||
# Mainly Win32-specific
|
||||
@ -624,11 +635,10 @@ endif
|
||||
@echo Now run
|
||||
@echo -e "\tgit commit -m 'DISTS: Generated Code::Blocks and MSVC project files'"
|
||||
|
||||
|
||||
release-checks:
|
||||
devtools/release-checks.sh
|
||||
|
||||
# Mark special targets as phony
|
||||
.PHONY: install-data install install-strip uninstall dist-generic
|
||||
.PHONY: bundle-pack bundle iphonebundle ios7bundle tvosbundle iphone osxsnap publish-appcast
|
||||
.PHONY: ideprojects release-checks
|
||||
.PHONY: appimage ideprojects release-checks
|
||||
|
Loading…
x
Reference in New Issue
Block a user