Skip to content

Commit

Permalink
chore: add proper release documentation + add flatpak metainfo file
Browse files Browse the repository at this point in the history
also add tests for the generated .desktop and .metainfo.xml files, that lint them
  • Loading branch information
Totto16 committed Oct 30, 2024
1 parent d01fd59 commit 67d4f11
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 11 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,21 @@ Or you can download and use prebuilt binaries from the CI-builds. You can find s

To download artifacts, click on the newest action and download the artifacts.

[Android](https://github.com/mgerhold/oopetris/actions/workflows/android.yml)
[Android](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/android.yml)

[Linux (Flatpak)](https://github.com/mgerhold/oopetris/actions/workflows/flatpak.yml)
[Linux (Flatpak)](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/flatpak.yml)

[Nintendo Switch /3DS](https://github.com/mgerhold/oopetris/actions/workflows/nintendo.yml)
[Nintendo Switch / 3DS](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/nintendo.yml)

There is no correct Windows and MacOS build atm, you have to built it yourself or use the (maybe not published yet) release builds on github.
[WIndows](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/installer.yml)

There is no correct MacOS build atm, you have to built it yourself or use the (maybe not published yet) releases on GitHub.

## Releases

There is an official website for OOPetris, where you also can find different links to auto updatable releases.

For concrete instructions see [here](docs/releases.md)

## Logo

Expand Down
31 changes: 31 additions & 0 deletions assets/com.github.mgerhold.OOPetris.metainfo.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>@APP_ID@</id>
<name>OOPetris</name>
<summary>A Tetris clone in OOP</summary>
<metadata_license>MIT</metadata_license>
<project_license>MIT</project_license>
<supports>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
<control>gamepad</control>
</supports>
<description>
<p>
A Tetris clone in OOP
</p>
</description>
<launchable type="desktop-id">@[email protected]</launchable>
<content_rating type="oars-1.0" />
<releases>
<release date="2022-03-01" version="0.0.1"/>
<release version="0.5.6" date="2024-05-17">
<url type="details">https://github.com/OpenBrickProtocolFoundation/oopetris/releases/tag/0.5.6</url>
</release>
</releases>
<url type="homepage">https://oopetris.totto.lt/</url>
<url type="bugtracker">https://github.com/OpenBrickProtocolFoundation/oopetris/issues</url>
<url type="contribute">https://github.com/OpenBrickProtocolFoundation/oopetris/pulls</url>
<url type="vcs-browser">https://github.com/OpenBrickProtocolFoundation/oopetris</url>
</component>
5 changes: 1 addition & 4 deletions docs/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ For concrete instructions, see the list below:

## Linux

[linux](linux.md)
[Linux](linux.md)

## Serenity OS

[serenity](serenity.md)


## Windows

[windows](windows.md)
Expand All @@ -27,12 +26,10 @@ For concrete instructions, see the list below:

[switch](switch.md)


## Nintendo 3DS

[switch](3ds.md)


## Android

[android](android.md)
45 changes: 45 additions & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!-- LTeX: enabled=true, language=en -->

# OOPetris Releases


We support multiple platforms and different types of executables / packages.
So here is a list of supported "package managers" / installation platforms.

## Android / FDroid

> [!NOTE]
> This is still WIP
## Linux / Flatpak

We provide stable and beta releases via 2 remotes:

To use the stable version, use this repo:

```bash
flatpak remote-add --if-not-exists oopetris-stable https://oopetris.totto.lt/repo/assets/oopetris.stable.flatpakrepo

```

And to use beta version:

```bash
flatpak remote-add --if-not-exists oopetris-beta https://oopetris.totto.lt/repo/assets/oopetris.beta.flatpakrepo

```

Than install it by using this command:

```bash
flatpak install -v com.github.mgerhold.OOPetris
```

To update use the normal flatpak update command, keep in mind, that the bet may be unstable and break things, use with caution!

## Other

> [!NOTE]
> This is still WIP
All other platforms have more difficult to support auto update capabilities, so you can find more on our [website](https://oopetris.totto.lt/releases).
55 changes: 52 additions & 3 deletions tools/install/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ if build_application
meson.project_source_root() / 'assets',
install_dir: 'share/oopetris',
install_tag: 'assets',
exclude_files: ['oopetris.desktop.in', 'OOPetris.svg', 'recordings.magic'],
exclude_files: [
'oopetris.desktop.in',
'com.github.mgerhold.OOPetris.metainfo.xml.in',
'OOPetris.svg',
'recordings.magic',
],
exclude_directories: ['icon'],
)

Expand All @@ -15,6 +20,8 @@ if build_application
app_name = 'com.github.mgerhold.OOPetris'
endif

require_checks = get_option('tests')

conf = configuration_data()
conf.set('APP_NAME', app_name)

Expand Down Expand Up @@ -54,15 +61,57 @@ if build_application
endif
endif

configure_file(
input: meson.project_source_root() / 'assets/oopetris.desktop.in',
desktop_file = configure_file(
input: meson.project_source_root() / 'assets' / 'oopetris.desktop.in',
output: app_name + '.desktop',
configuration: conf,
install: true,
install_dir: datadir / 'applications',
install_tag: 'other',
)

desktop_file_validate_exe = find_program('desktop-file-validate', required: require_checks)

if desktop_file_validate_exe.found()
test(
'validate desktop file',
desktop_file_validate_exe,
args: [desktop_file],
)
endif

if is_flatpak_build

flaptak_conf = configuration_data()
flaptak_conf.set('APP_ID', app_name)
flaptak_conf.set('APP_VERSION', meson.project_version())

metainfo_file = configure_file(
input: meson.project_source_root() / 'assets' / 'com.github.mgerhold.OOPetris.metainfo.xml.in',
output: app_name + '.metainfo.xml',
configuration: flaptak_conf,
install: true,
install_dir: datadir / 'metainfo',
install_tag: 'other',
)

ascli_exe = find_program('appstreamcli', required: require_checks)

if ascli_exe.found()
test(
'validate metainfo file',
ascli_exe,
args: [
'validate',
'--no-net',
'--explain',
'--pedantic', metainfo_file,
],
)
endif

endif

logos = [
'24x24.png',
'48x48.png',
Expand Down

0 comments on commit 67d4f11

Please sign in to comment.