flatpaker


Nameflatpaker JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryUtilities to convert various kinds of native binaries into flatpaks.
upload_time2024-11-26 23:39:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords flatpak renpy rpgmaker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # flatpaker

Script to mostly automate creating flatpaks from published Ren'Py and Linux
builds of RPGMaker MV and MZ. open to additional support

## What is it?

It's a script that automatically handles much of the task of generating a
flatpak for pre-built projects, including adding patches or mods. You
write a small, simple toml file, fetch the sources, and get a ready to publish
flatpak.

It currently automatically does the following automatically:

- Generates an appstream xml file
- Generates a .desktop file
- Extracts an icon from the game source, and installs it
- patches the game to honor `$XDG_DATA_HOME` for storing game data inside the sandbox (instead of needing `$HOME` access)
- sets up the sandbox to allow audio and display, but nothing else
- recompiles the program when mods are applied
- strips .rpy files to save space (keeping the rpyc files)
- strips windows and macos specific files
- allows local install or publishing to a repo

## Why?

I like playing Ren'Py games sometimes. I also don't always trust random
pre-compiled binaries from the internet. Flatpak provides a nice, convenient
way to sandbox applications. It also makes supporting Steam Deck and Fedora
immutable a breeze. But generating flatpaks by hand is a lot of work, especially
when most of the process will be exactly the same for every renpy project.

## How do I use it?

1. Download the compressed project
2. Download any mods or addons (optional)
3. Write a toml description
4. run `flatpaker --install install-deps`
5. run `flatpaker --install build *.toml` or `flatpaker --export --gpg-sign build *.toml` (for local install or for export to a shared repo)

### Toml Format

```toml
[common]
  name = 'Game or VN'  # use properly formatted name like "The Cool Adventures of Bob", or "Bob's Quest 7: Lawnmower Confusion"
  reverse_url = 'com.example.JDoe'  # name will be appended
  # "Game" is added automatically
  # used freedesktop menu categories. see: https://specifications.freedesktop.org/menu-spec/latest/apas02.html
  categories = ['Simulation']
  engine = ['renpy']  # Or 'rpgmaker'

[appdata]
  summary = "A short summary, one sentence or so."
  description = """
    A longer description.

    probably on multiple \
    lines
    """

  # This is an optional value for the license of the renpy project itself.
  # If unset it defaults to LicenseRef-Proprietary.
  # if you have specific terms which are not an Open Source license, you can use the form:
  # LicenseRef-Proprietary=https://www.example.com/my-license
  # See: https://spdx.org/specifications for more information
  license = "SPDX identifier"

[appdata.content_rating]
  # optional
  # Uses OARS specifications. See: https://hughsie.github.io/oars/
  # keys should be ids, and the values are must be a rating (as a string):
  # none, mild, moderate, or intense
  language-profanity = "mild"

[appdata.releases]
  # optional
  # in the form "date = version"
  "2023-01-01" = "1.0.0"

# Optional, alternatively may be passed on teh command line
[[sources.archives]]
  # path must be set if this is provided
  path = "relative to toml or absolute path"

  # Optional, defaults to 1. How many directory levels to remove from this component
  strip_comonents = 2

# Optional, cannot be set from command line
[[sources.patches]]
  # path must be set if this is provided
  path = "relative to toml or absolute path"

  # Optional, defaults to 1. How many directory levels to remove from this component
  strip_comonents = 2

# Optional, cannot be set from command line
[[sources.files]]
  # path must be set if this is provided
  path = "relative to toml or absolute path"

  # Optional, if set the file will be installed to this name
  # Does not have to be set for .rpy files that go in the game root directory
  dest = "where to install"
```

### Configuration

Some options can be given on the command line or via a configuration file.
That file must be written to `$XDG_CONFIG_HOME/flatpaker/config.toml` (if unset
`$XDG_CONFIG_HOME` defaults to `~/.config`).

```toml
[common]
  # A gpg private key to sign with, overwritten by the --gpg option
  gpg-key = "0x123456789"

  # The absolute path to a repo to write to. overwritten by the --repo option
  repo = "/path/to/a/repo/to/export"
```


## What is required?

- python 3.11 or a modern version of python3 with tomli
- flatpak-builder

### Schema

A Json based schema is provided, which can be used with VSCode's EvenBetterToml
extension. It may be useful elsewhere.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "flatpaker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "flatpak, renpy, rpgmaker",
    "author": null,
    "author_email": "Dylan Baker <dylan@pnwbakers.com>",
    "download_url": "https://files.pythonhosted.org/packages/7f/77/bd81121a53850367c3e72bea12b305da7cc5d8ff0d6688dcdb12453f230b/flatpaker-0.0.3.tar.gz",
    "platform": null,
    "description": "# 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 automatically 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- sets up the sandbox to allow audio and display, but nothing else\n- recompiles the program when mods are applied\n- strips .rpy files to save space (keeping the rpyc files)\n- strips windows and macos specific files\n- allows local install or publishing to a repo\n\n## Why?\n\nI like playing Ren'Py games sometimes. I also don't always trust random\npre-compiled binaries from the internet. Flatpak provides a nice, convenient\nway to sandbox applications. It also makes supporting Steam Deck and Fedora\nimmutable a breeze. But generating flatpaks by hand is a lot of work, especially\nwhen most of the process will be exactly the same for every renpy project.\n\n## How do I use it?\n\n1. Download the compressed project\n2. Download any mods or addons (optional)\n3. Write a toml description\n4. run `flatpaker --install install-deps`\n5. run `flatpaker --install build *.toml` or `flatpaker --export --gpg-sign build *.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 = ['renpy']  # Or 'rpgmaker'\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# Optional, alternatively may be passed on teh command line\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, cannot be set from command line\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, cannot be set from command line\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\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 3.11 or a modern version of python3 with tomli\n- flatpak-builder\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",
    "bugtrack_url": null,
    "license": null,
    "summary": "Utilities to convert various kinds of native binaries into flatpaks.",
    "version": "0.0.3",
    "project_urls": {
        "Issues": "https://github.com/dcbaker/flatpaker/issues",
        "Repository": "https://github.com/dcbaker/flatpaker"
    },
    "split_keywords": [
        "flatpak",
        " renpy",
        " rpgmaker"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ce2779f9c002a991a322e87248e771db02457c61ea73e488400be5c1a486fe6e",
                "md5": "aced1b97fa296454392176b9379986c0",
                "sha256": "ad73e08901deaaf6dc776f293e7afe05b4d92254ebac006f75812173353508ef"
            },
            "downloads": -1,
            "filename": "flatpaker-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "aced1b97fa296454392176b9379986c0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 14725,
            "upload_time": "2024-11-26T23:39:01",
            "upload_time_iso_8601": "2024-11-26T23:39:01.415092Z",
            "url": "https://files.pythonhosted.org/packages/ce/27/79f9c002a991a322e87248e771db02457c61ea73e488400be5c1a486fe6e/flatpaker-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7f77bd81121a53850367c3e72bea12b305da7cc5d8ff0d6688dcdb12453f230b",
                "md5": "896ce65e784f34bccbbafd7a182bf769",
                "sha256": "55712e06b0ea538fe61c6ffbe9aec762ead532697767077a8506398b20b58067"
            },
            "downloads": -1,
            "filename": "flatpaker-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "896ce65e784f34bccbbafd7a182bf769",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 14669,
            "upload_time": "2024-11-26T23:39:03",
            "upload_time_iso_8601": "2024-11-26T23:39:03.205268Z",
            "url": "https://files.pythonhosted.org/packages/7f/77/bd81121a53850367c3e72bea12b305da7cc5d8ff0d6688dcdb12453f230b/flatpaker-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-26 23:39:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dcbaker",
    "github_project": "flatpaker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "flatpaker"
}
        
Elapsed time: 2.51300s