diff --git a/.github/workflows/linux-packages.yml b/.github/workflows/linux-packages.yml new file mode 100644 index 000000000..2e615c459 --- /dev/null +++ b/.github/workflows/linux-packages.yml @@ -0,0 +1,126 @@ +name: Linux packages + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + appimage: + # Built on the oldest supported Ubuntu so the AppImage runs on newer systems too. + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v6 + + - uses: jurplel/install-qt-action@v4 + with: + version: '6.8.3' + modules: 'qtmultimedia' + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgl1-mesa-dev libxcb-cursor0 libxkbcommon-x11-0 xvfb + + - name: Build + run: | + qmake PREFIX=/usr mapmap.pro + make -j$(nproc) + make install INSTALL_ROOT=AppDir + + - name: Make AppImage + env: + APPIMAGE_EXTRACT_AND_RUN: 1 + EXTRA_QT_MODULES: multimedia + run: | + export LINUXDEPLOY_OUTPUT_VERSION=$(sed -n 's/^MAPMAP_VERSION = //p' mapmap.pro) + wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage + chmod +x linuxdeploy*.AppImage + ./linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage + + - name: Check the AppImage + run: | + find AppDir -name 'libffmpegmediaplugin.so' | grep -q . || { echo "video plugin missing"; exit 1; } + # The app should still be running when timeout stops it (exit 124). + xvfb-run -a timeout 10 ./MapMap-*-x86_64.AppImage --appimage-extract-and-run || test $? -eq 124 + + - uses: actions/upload-artifact@v7 + with: + name: MapMap-AppImage + path: MapMap-*-x86_64.AppImage + + deb: + # Each distribution names its Qt packages differently, so each gets its own .deb. + strategy: + matrix: + distro: ['ubuntu:24.04', 'ubuntu:26.04', 'debian:13'] + runs-on: ubuntu-24.04 + container: ${{ matrix.distro }} + env: + DEBIAN_FRONTEND: noninteractive + steps: + - uses: actions/checkout@v6 + + - name: Install build dependencies + run: | + apt-get update + apt-get install -y build-essential debhelper qmake6 qt6-base-dev libqt6opengl6-dev qt6-multimedia-dev qt6-tools-dev xvfb xauth + + - id: name + run: echo "suffix=$(echo '${{ matrix.distro }}' | tr ':' '-')" >> "$GITHUB_OUTPUT" + + - name: Build + run: | + dpkg-buildpackage -b -us -uc + for f in ../mapmap_*_amd64.deb; do mv "$f" "$(basename "$f" _amd64.deb)_${{ steps.name.outputs.suffix }}_amd64.deb"; done + + - name: Check the package + run: | + apt-get install -y ./mapmap_*.deb + xvfb-run -a timeout 10 mapmap || test $? -eq 124 + + - uses: actions/upload-artifact@v7 + with: + name: MapMap-deb-${{ steps.name.outputs.suffix }} + path: mapmap_*.deb + + flatpak: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v6 + + - name: Install Flatpak tools + run: | + sudo apt-get update + sudo apt-get install -y flatpak flatpak-builder + flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo + + - name: Build + run: | + flatpak-builder --user --install-deps-from=flathub --repo=repo build packaging/flatpak/info.mapmap.MapMap.yml + flatpak build-bundle repo MapMap.flatpak info.mapmap.MapMap --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo + + - uses: actions/upload-artifact@v7 + with: + name: MapMap-flatpak + path: MapMap.flatpak + + release: + # Attaches the three packages to the GitHub release when a version tag is pushed. + if: startsWith(github.ref, 'refs/tags/') + needs: [appimage, deb, flatpak] + runs-on: ubuntu-24.04 + permissions: + contents: write + steps: + - uses: actions/download-artifact@v7 + with: + merge-multiple: true + + - uses: softprops/action-gh-release@v2 + with: + files: | + MapMap-*-x86_64.AppImage + mapmap_*.deb + MapMap.flatpak diff --git a/INSTALL.md b/INSTALL.md index 43ef78486..e75ae8a4a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -50,6 +50,20 @@ Install basic development tools for Qt 6 projects: sudo pacman -S qt6-tools qt6-multimedia qt6-base ``` +### Linux packages + +The "Linux packages" workflow builds an AppImage, a Flatpak bundle and a .deb each for Ubuntu 24.04, Ubuntu 26.04 and Debian 13 on every push, and attaches them to the GitHub release when a version tag is pushed. To build them locally: + +``` +# .deb, for the distribution you build it on +dpkg-buildpackage -b -us -uc + +# Flatpak +flatpak-builder --user --install-deps-from=flathub --install build packaging/flatpak/info.mapmap.MapMap.yml +``` + +The AppImage steps are in `.github/workflows/linux-packages.yml`. + Build on macOS -------------- diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..effc3bd29 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +mapmap (1.0.0~alpha.1) unstable; urgency=medium + + * Package for Debian and Ubuntu. + + -- MapMap team Fri, 18 Sep 2026 11:34:54 -0400 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..f56cf10b2 --- /dev/null +++ b/debian/control @@ -0,0 +1,21 @@ +Source: mapmap +Section: video +Priority: optional +Maintainer: MapMap team +Build-Depends: debhelper-compat (= 13), + qmake6, + qt6-base-dev, + libqt6opengl6-dev, + qt6-multimedia-dev, + qt6-tools-dev +Standards-Version: 4.7.0 +Homepage: https://mapmapteam.github.io/ +Vcs-Browser: https://github.com/mapmapteam/mapmap + +Package: mapmap +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: video projection mapping editor + MapMap is a free video mapping software for artists and small teams. + Draw quads, triangles, meshes and ellipses over the surfaces you project + on, then fill them with video, images, colours or a camera feed. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..4f37f798f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,9 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: MapMap +Source: https://github.com/mapmapteam/mapmap + +Files: * +Copyright: 2013-2026 Sofian Audry, Alexandre Quessy, Dame Diongue and MapMap contributors +License: GPL-3.0+ + On Debian systems, the full text of the GNU General Public License + version 3 can be found in /usr/share/common-licenses/GPL-3. diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..95203cb72 --- /dev/null +++ b/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + qmake6 PREFIX=/usr mapmap.pro + +override_dh_auto_install: + $(MAKE) install INSTALL_ROOT=$(CURDIR)/debian/mapmap diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..89ae9db8f --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/mapmap.pro b/mapmap.pro index b5f2b039c..9d4001f47 100644 --- a/mapmap.pro +++ b/mapmap.pro @@ -58,6 +58,17 @@ system($$QMAKE_LRELEASE mapmap.pro) # Run lrelease # Linux-specific: unix:!macx { QMAKE_CXXFLAGS += -Wno-expansion-to-defined + + # "make install" layout shared by the AppImage, Flatpak and .deb builds. + isEmpty(PREFIX): PREFIX = /usr + target.path = $$PREFIX/bin + desktop.files = resources/texts/info.mapmap.MapMap.desktop + desktop.path = $$PREFIX/share/applications + metainfo.files = resources/texts/info.mapmap.MapMap.metainfo.xml + metainfo.path = $$PREFIX/share/metainfo + icon.path = $$PREFIX/share/icons/hicolor/scalable/apps + icon.extra = install -Dm644 $$PWD/resources/images/logo/mapmap.svg $(INSTALL_ROOT)$$PREFIX/share/icons/hicolor/scalable/apps/info.mapmap.MapMap.svg + INSTALLS += target desktop metainfo icon } CONFIG -= qtquickcompiler diff --git a/packaging/flatpak/info.mapmap.MapMap.yml b/packaging/flatpak/info.mapmap.MapMap.yml new file mode 100644 index 000000000..706862e2f --- /dev/null +++ b/packaging/flatpak/info.mapmap.MapMap.yml @@ -0,0 +1,26 @@ +app-id: info.mapmap.MapMap +runtime: org.kde.Platform +runtime-version: '6.11' +sdk: org.kde.Sdk +command: mapmap +finish-args: + - --share=ipc + - --share=network + - --socket=fallback-x11 + - --socket=wayland + - --device=all + - --filesystem=home +modules: + - name: mapmap + buildsystem: simple + build-commands: + - qmake PREFIX=/app mapmap.pro + - make -j$FLATPAK_BUILDER_N_JOBS + - make install + sources: + - type: dir + path: ../.. + skip: + - .flatpak-builder + - build + - repo diff --git a/resources/texts/mapmap.desktop b/resources/texts/info.mapmap.MapMap.desktop similarity index 86% rename from resources/texts/mapmap.desktop rename to resources/texts/info.mapmap.MapMap.desktop index 83354dc5d..5b2eb9b79 100644 --- a/resources/texts/mapmap.desktop +++ b/resources/texts/info.mapmap.MapMap.desktop @@ -11,4 +11,4 @@ Terminal=false StartupNotify=true Type=Application Categories=Qt;AudioVideo;Video; -Icon=/usr/share/icons/hicolor/scalable/apps/mapmap.svg +Icon=info.mapmap.MapMap diff --git a/resources/texts/info.mapmap.MapMap.metainfo.xml b/resources/texts/info.mapmap.MapMap.metainfo.xml new file mode 100644 index 000000000..4ad616811 --- /dev/null +++ b/resources/texts/info.mapmap.MapMap.metainfo.xml @@ -0,0 +1,29 @@ + + + info.mapmap.MapMap + CC0-1.0 + GPL-3.0-or-later + MapMap + Video projection mapping editor + +

MapMap is a free video mapping software for artists and small teams. Draw quads, triangles, meshes and ellipses over the surfaces you project on, then fill them with video, images, colours or a camera feed.

+
+ info.mapmap.MapMap.desktop + + mapmap + + https://mapmapteam.github.io/ + https://github.com/mapmapteam/mapmap/issues + https://github.com/mapmapteam/mapmap + + The MapMap team + + + AudioVideo + Video + + + + + +