Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak and makefile #80

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ MANDIR := $(DATADIR)/man

DESTDIR ?=
USERINSTALL ?= xfalse
FLATPAK ?= xfalse


.PHONY: all
ifeq ($(FLATPAK), xtrue)
all: version reaper umu umu-launcher
else
all: version reaper umu umu-docs umu-launcher
endif

.PHONY: install
ifeq ($(USERINSTALL), xtrue)
Expand Down Expand Up @@ -79,11 +84,14 @@ umu-dist-install:
install -Dm 644 umu/umu_dl_util.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 umu/umu_log.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 umu/umu_plugins.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 755 umu/umu_run.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 755 umu/umu_run.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)
install -Dm 644 umu/umu_util.py -t $(DESTDIR)$(DATADIR)/$(INSTALLDIR)

ifeq ($(FLATPAK), xtrue)
umu-install: version-install umu-dist-install umu-bin-install
else
umu-install: version-install umu-dist-install umu-docs-install umu-bin-install

endif

# umu-launcher is separate to allow control over installing the bin target
$(OBJDIR)/.build-umu-launcher: | $(OBJDIR)
Expand Down
19 changes: 12 additions & 7 deletions packaging/flatpak/org.openwinecomponents.umu.launcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ finish-args:
- --share=network
- --talk-name=org.freedesktop.Notifications
- --talk-name=org.kde.StatusNotifierWatcher
- --talk-name=org.freedesktop.Flatpak
# Required for bwrap to work
- --talk-name=org.freedesktop.portal.Background
# --- Steam ---
# Pressure Vessel
# See https://github.com/flathub/com.valvesoftware.Steam/commit/0538256facdb0837c33232bc65a9195a8a5bc750
- --env=XDG_DATA_DIRS=/app/share:/usr/lib/extensions/vulkan/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share:/usr/lib/pressure-vessel/overrides/share

add-extensions:
org.freedesktop.Platform.Compat.i386:
Expand Down Expand Up @@ -143,14 +148,14 @@ modules:
- name: umu-run
buildsystem: simple
build-commands:
- install -D umu-run-cli /app/bin/umu-run
- install -D umu-launcher.tar.gz /app/share/umu/umu-launcher.tar.gz
- |
git submodule update --init --recursive
./configure.sh --prefix=/app
make FLATPAK=xtrue install
sources:
- type: file
path: umu-run-cli
- type: file
url: https://github.com/Open-Wine-Components/umu-launcher/releases/download/0.1-RC3/umu-launcher.tar.gz
sha256: e25c4dd0636d04e7c8c534cf3c5bbdca5ae0d49f146ee8395306174700899952
- type: git
url: https://github.com/loathingkernel/umu-launcher.git
branch: makefile

- name: platform-bootstrap
buildsystem: simple
Expand Down
10 changes: 8 additions & 2 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,16 @@
thread.join()

# Run
build_command(env, UMU_LOCAL, command, opts)
command = build_command(env, UMU_LOCAL, command, opts)
if os.environ.get("container") == "flatpak":

Check failure on line 362 in umu/umu_run.py

View workflow job for this annotation

GitHub Actions / build (3.10)

Ruff (SIM112)

umu/umu_run.py:362:23: SIM112 Use capitalized environment variable `CONTAINER` instead of `container`

Check failure on line 362 in umu/umu_run.py

View workflow job for this annotation

GitHub Actions / build (3.11)

Ruff (SIM112)

umu/umu_run.py:362:23: SIM112 Use capitalized environment variable `CONTAINER` instead of `container`

Check failure on line 362 in umu/umu_run.py

View workflow job for this annotation

GitHub Actions / build (3.12)

Ruff (SIM112)

umu/umu_run.py:362:23: SIM112 Use capitalized environment variable `CONTAINER` instead of `container`
flatpak_command = ["flatpak-spawn", "--host"]
for name, value in env.items():
flatpak_command.append(f"--env={name}={value}")
command = flatpak_command + command
env = os.environ.copy()
log.debug("%s", command)

return run(command, check=False).returncode
return run(command, env=env, check=False).returncode


if __name__ == "__main__":
Expand Down
Loading