{"id":21647800,"url":"https://github.com/dcbaker/flatpaker","last_synced_at":"2025-07-10T10:35:59.089Z","repository":{"id":160374880,"uuid":"614653662","full_name":"dcbaker/flatpaker","owner":"dcbaker","description":"Script to mostly automate creating flatpaks from published Ren'Py and RPGMaker MV and MZ projects","archived":false,"fork":false,"pushed_at":"2025-03-03T23:28:34.000Z","size":118,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T13:27:42.947Z","etag":null,"topics":["flatpak","renpy","rpgmaker","rpgmakermv","rpgmakermz"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcbaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-16T03:07:13.000Z","updated_at":"2025-03-03T23:28:35.000Z","dependencies_parsed_at":"2025-01-25T05:10:38.035Z","dependency_job_id":"cfb0c782-fab1-45a4-a465-e5b7e0efa619","html_url":"https://github.com/dcbaker/flatpaker","commit_stats":null,"previous_names":["dcbaker/flatpaker","dcbaker/renpy2flatpak"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcbaker%2Fflatpaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcbaker%2Fflatpaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcbaker%2Fflatpaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcbaker%2Fflatpaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcbaker","download_url":"https://codeload.github.com/dcbaker/flatpaker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252013625,"owners_count":21680388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flatpak","renpy","rpgmaker","rpgmakermv","rpgmakermz"],"created_at":"2024-11-25T06:51:41.439Z","updated_at":"2025-07-10T10:35:59.079Z","avatar_url":"https://github.com/dcbaker.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flatpaker\n\nScript to mostly automate creating flatpaks from published Ren'Py and Linux\nbuilds of RPGMaker MV and MZ. Open to additional support\n\n## What is it?\n\nIt's a script that automatically handles much of the task of generating a\nflatpak for pre-built projects, including adding patches or mods. You\nwrite a small, simple toml file, fetch the sources, and get a ready to publish\nflatpak.\n\nIt currently does the following automatically:\n\n- Generates an appstream xml file\n- Generates a .desktop file\n- Extracts an icon from the game source, and installs it\n- patches the game to honor `$XDG_DATA_HOME` for storing game data inside the sandbox (instead of needing `$HOME` access)\n- allows local install or publishing to a repo\n- allows generating static deltas after building\n- sets up the sandbox to allow audio and display, but nothing else\n\nFor Ren'Py:\n- provides a runtime with up to date renpy and deps, built against the freedesktop Platform libraries.\n  using the shared runtime saves space, as well as ensures that all games can be run with Wayland support.\n- strips .rpy files to save space (keeping the rpyc files)\n\nFor RPG Maker:\n- provides a runtime with a newer nwjs installed, saving disk space\n- using this nwjs also gives guaranteed wayland support\n- It also allows running MV and MZ games that don't ship Linux builds, using the Windows build\n\n## Why?\n\nI like playing Ren'Py and RPG Maker games sometimes. I also don't always trust\nrandom pre-compiled binaries from the internet. Flatpak provides a nice,\nconvenient way to sandbox applications. It also makes supporting Steam Deck and\nFedora immutable a breeze. But generating flatpaks by hand is a lot of work,\nespecially when most of the process will be exactly the same for every project.\nThe use of up-to-date runtimes saves more disk space and allows for the sandbox\nto provide even better security by using Wayland instead of X11 (or XWayland).\n\n## How do I use it?\n\n1. Download the compressed project\n2. Download any mods or addons (optional)\n3. Generate a toml description `flatpaker generate com.developer.game \"Game Name\" engine archive.zip`\n4. Edit the generated description to fill in missing information\n5. run `flatpaker build-runtimes --install` (which adds the runtimes and sdks)\n6. run `flatpaker build --install *.toml` or `flatpaker build --export --gpg-sign *.toml` (for local install or for export to a shared repo)\n\n### Toml Format\n\n```toml\n[common]\n  name = 'Game or VN'  # use properly formatted name like \"The Cool Adventures of Bob\", or \"Bob's Quest 7: Lawnmower Confusion\"\n  reverse_url = 'com.example.JDoe'  # name will be appended\n  # \"Game\" is added automatically\n  # used freedesktop menu categories. see: https://specifications.freedesktop.org/menu-spec/latest/apas02.html\n  categories = ['Simulation']\n  engine = 'renpy8'  # Or 'rpgmaker', 'renpy7', 'renpy7-py3'\n\n[appdata]\n  summary = \"A short summary, one sentence or so.\"\n  description = \"\"\"\n    A longer description.\n\n    probably on multiple \\\n    lines\n    \"\"\"\n\n  # This is an optional value for the license of the renpy project itself.\n  # If unset it defaults to LicenseRef-Proprietary.\n  # if you have specific terms which are not an Open Source license, you can use the form:\n  # LicenseRef-Proprietary=https://www.example.com/my-license\n  # See: https://spdx.org/specifications for more information\n  license = \"SPDX identifier\"\n\n[appdata.content_rating]\n  # optional\n  # Uses OARS specifications. See: https://hughsie.github.io/oars/\n  # keys should be ids, and the values are must be a rating (as a string):\n  # none, mild, moderate, or intense\n  language-profanity = \"mild\"\n\n[appdata.releases]\n  # optional\n  # in the form \"date = version\"\n  \"2023-01-01\" = \"1.0.0\"\n\n# Requires at least one entry\n[[sources.archives]]\n  # path must be set if this is provided\n  path = \"relative to toml or absolute path\"\n\n  # Optional, defaults to 1. How many directory levels to remove from this component\n  strip_comonents = 2\n\n  # Optional, will be automatically calculated if not provided, but providing it can speed up building\n  sha256 = \"abcd...\"\n\n  # Optional, will run these shell commands after extracting this archive\n  commands = [\n    'sed -i s/foo/bar/ extracted_source',\n  ]\n\n# Optional\n[[sources.patches]]\n  # path must be set if this is provided\n  path = \"relative to toml or absolute path\"\n\n  # Optional, defaults to 1. How many directory levels to remove from this component\n  strip_comonents = 2\n\n# Optional\n[[sources.files]]\n  # path must be set if this is provided\n  path = \"relative to toml or absolute path\"\n\n  # Optional, if set the file will be installed to this name\n  # Does not have to be set for .rpy files that go in the game root directory\n  dest = \"where to install\"\n\n  # Optional, will be automatically calculated if not provided, but providing it can speed up building\n  sha256 = \"abcd...\"\n\n  # Optional, will run these shell commands after this file is added\n  commands = [\n    'sed -i s@/bin/bash@/usr/bin/env bash@ script.sh',\n  ]\n```\n\nSources will be evaluated by:\n  1. archives, with their command entry\n  2. files, with their command entry\n  3. patches\n\n#### Quirks\n\nAdditionally, some games have quirks that make them difficult to package. Some\nof these quirks can be worked around.\n\nAny quirk starting with `x_` or `x-` is an experimental quirk, and may be\nremoved at any time. If you find yourself relying on them, please open an issue.\n\nFor example:\n```toml\n[quirks]\n  force_window_gui_icon = true\n```\n\n\n##### Generic\n\n  - `x_configure_prologue: string`: A block of shell commands to run after\n    unpacking all of the sources and applying patches, but before any build\n    steps take place. This is slated for removal as the `commands` argument to archives and files should be able to fix all of this.\n\n\n##### Renpy\n\n  - `force_window_gui_icon: bool`. Use `game/gui/window_icon.png` instead\n    of extracting icons from the exe or icns files. This is generally\n    unnecessary, but some games have customized window_icons but not exe icons.\n\n  - `x_renpy_archived_window_gui_icon: string`. Extract a `gui/window_icon.png` file\n    from the named archive instead of extracting from the exe or icns files.\n    This is generally unnecessary, but see above.\n\n\n### Configuration\n\nSome options can be given on the command line or via a configuration file.\nThat file must be written to `$XDG_CONFIG_HOME/flatpaker/config.toml` (if unset\n`$XDG_CONFIG_HOME` defaults to `~/.config`).\n\n```toml\n[common]\n  # A gpg private key to sign with, overwritten by the --gpg option\n  gpg-key = \"0x123456789\"\n\n  # The absolute path to a repo to write to. overwritten by the --repo option\n  repo = \"/path/to/a/repo/to/export\"\n```\n\n\n## What is required?\n\n- python \u003e= 3.9\n- python-tomlkit\n- flatpak-builder\n- flatpak\n\n### Schema\n\nA Json based schema is provided, which can be used with VSCode's EvenBetterToml\nextension. It may be useful elsewhere.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcbaker%2Fflatpaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcbaker%2Fflatpaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcbaker%2Fflatpaker/lists"}