Skip to content

build: Add Linux packages using Snapcraft, Flatpak or AppImage #405

Description

@mefistotelis

This will allow easy installation on Linux distros.

Some initial flatpak script:

id: org.swfans.SyndWarsFX
runtime: org.freedesktop.Platform
runtime-version: '25.08'
sdk: org.freedesktop.Sdk
command: /app/syndwarsfx/syndwarsfx
 
modules:
  - name: syndwarsfx-bin
    # this needs to switch to building from source, as we need to configure hardcoded paths for flatpak release
    buildsystem: simple
    build-commands:
      - find conf -type f -exec install -D -m 644 "{}" "/app/syndwarsfx/{}" \;
      - find language -type f -exec install -D -m 644 "{}" "/app/syndwarsfx/{}" \;
      - install -D -m 644 AUTHORS /app/syndwarsfx/AUTHORS
      - install -D -m 644 COPYING /app/syndwarsfx/COPYING
      - install -D -m 644 GPL3 /app/syndwarsfx/GPL3
      - install -D -m 644 syndwarsfx.icns /app/syndwarsfx/syndwarsfx.icns
      - install -D -m 644 syndwarsfx_icon.png /app/syndwarsfx/syndwarsfx_icon.png
      - install -D -m 755 syndwarsfx /app/syndwarsfx/syndwarsfx
      - install -D -m 755 install /app/syndwarsfx/install
    sources:
      - type: dir
        path: syndwarsfx
 
  - name: syndwarsfx-levels
    buildsystem: simple
    build-commands:
        # rename first, so that all files and folders are in lower case
      - for f in LEVELS MAPS; do mv ${f} ${f,,} ; done
      - for f in `find levels -type f`; do mv ${f} ${f,,} ; done
      - for f in `find maps -type f`; do mv ${f} ${f,,} ; done
        # now add to the release
      - find levels -type f -exec install -D -m 644 "{}" "/app/syndwarsfx/{}" \;
      - find maps -type f -exec install -D -m 644 "{}" "/app/syndwarsfx/{}" \;
      - install -D -m 644 levels_config.h /app/syndwarsfx/levels_config.h
    sources:
      - type: archive
        url: https://github.com/swfans/syndwarsfx-levels/releases/download/1.0.1.38/syndwarsfx-levels-1_0_1_38.zip
        sha256: 1b40e28b7ba34ec92f0487153ac871ded9a5dab4b6b1fc5afa5b782911220020

  - name: syndwarsfx-gfx
    buildsystem: simple
    build-commands:
      - find data -type f -exec install -D -m 644 "{}" "/app/syndwarsfx/{}" \;
      - find language -type f -exec install -D -m 644 "{}" "/app/syndwarsfx/{}" \;
      - find qdata -type f -exec install -D -m 644 "{}" "/app/syndwarsfx/{}" \;
      - install -D -m 644 gfx_config.h /app/syndwarsfx/gfx_config.h
      - install -D -m 644 gfx_readme.md /app/syndwarsfx/gfx_readme.md
    sources:
      - type: archive
        url: https://github.com/swfans/syndwarsfx-gfx/releases/download/1.0.4.312/syndwarsfx-gfx-1_0_4_312.zip
        sha256: b46878016ff0c875fedf7741e0379544b59f9aec978ca34f761e349cfb8d5774
 
  - name: syndwarsfx-sfx
    buildsystem: simple
    build-commands:
      - find sound -type f -exec install -D -m 644 "{}" "/app/syndwarsfx/{}" \;
      - install -D -m 644 sfx_config.h /app/syndwarsfx/sfx_config.h
      - install -D -m 644 sfx_readme.md /app/syndwarsfx/sfx_readme.md
    sources:
      - type: archive
        url: https://github.com/swfans/syndwarsfx-sfx/releases/download/1.0.1.30/syndwarsfx-sfx-1_0_1_30.zip
        sha256: 18315447088df307068a773e0bd0aa60415de2f4e52e6f3cfb95290acab62096
 

Notes:

  • The source needs to be compiled separately for the packaged release
  • Files form CD / ISO will have to be copied later, after the package installation (unless there's a way? I don't see it.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions