Skip to content

Commit 67d4f11

Browse files
committed
chore: add proper release documentation + add flatpak metainfo file
also add tests for the generated .desktop and .metainfo.xml files, that lint them
1 parent d01fd59 commit 67d4f11

File tree

5 files changed

+140
-11
lines changed

5 files changed

+140
-11
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,21 @@ Or you can download and use prebuilt binaries from the CI-builds. You can find s
2323

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

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

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

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

32-
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.
32+
[WIndows](https://github.com/OpenBrickProtocolFoundation/oopetris/actions/workflows/installer.yml)
3333

34+
There is no correct MacOS build atm, you have to built it yourself or use the (maybe not published yet) releases on GitHub.
35+
36+
## Releases
37+
38+
There is an official website for OOPetris, where you also can find different links to auto updatable releases.
39+
40+
For concrete instructions see [here](docs/releases.md)
3441

3542
## Logo
3643

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>@APP_ID@</id>
4+
<name>OOPetris</name>
5+
<summary>A Tetris clone in OOP</summary>
6+
<metadata_license>MIT</metadata_license>
7+
<project_license>MIT</project_license>
8+
<supports>
9+
<control>pointing</control>
10+
<control>keyboard</control>
11+
<control>touch</control>
12+
<control>gamepad</control>
13+
</supports>
14+
<description>
15+
<p>
16+
A Tetris clone in OOP
17+
</p>
18+
</description>
19+
<launchable type="desktop-id">@[email protected]</launchable>
20+
<content_rating type="oars-1.0" />
21+
<releases>
22+
<release date="2022-03-01" version="0.0.1"/>
23+
<release version="0.5.6" date="2024-05-17">
24+
<url type="details">https://github.com/OpenBrickProtocolFoundation/oopetris/releases/tag/0.5.6</url>
25+
</release>
26+
</releases>
27+
<url type="homepage">https://oopetris.totto.lt/</url>
28+
<url type="bugtracker">https://github.com/OpenBrickProtocolFoundation/oopetris/issues</url>
29+
<url type="contribute">https://github.com/OpenBrickProtocolFoundation/oopetris/pulls</url>
30+
<url type="vcs-browser">https://github.com/OpenBrickProtocolFoundation/oopetris</url>
31+
</component>

docs/develop.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ For concrete instructions, see the list below:
88

99
## Linux
1010

11-
[linux](linux.md)
11+
[Linux](linux.md)
1212

1313
## Serenity OS
1414

1515
[serenity](serenity.md)
1616

17-
1817
## Windows
1918

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

2827
[switch](switch.md)
2928

30-
3129
## Nintendo 3DS
3230

3331
[switch](3ds.md)
3432

35-
3633
## Android
3734

3835
[android](android.md)

docs/releases.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!-- LTeX: enabled=true, language=en -->
2+
3+
# OOPetris Releases
4+
5+
6+
We support multiple platforms and different types of executables / packages.
7+
So here is a list of supported "package managers" / installation platforms.
8+
9+
## Android / FDroid
10+
11+
> [!NOTE]
12+
> This is still WIP
13+
14+
## Linux / Flatpak
15+
16+
We provide stable and beta releases via 2 remotes:
17+
18+
To use the stable version, use this repo:
19+
20+
```bash
21+
flatpak remote-add --if-not-exists oopetris-stable https://oopetris.totto.lt/repo/assets/oopetris.stable.flatpakrepo
22+
23+
```
24+
25+
And to use beta version:
26+
27+
```bash
28+
flatpak remote-add --if-not-exists oopetris-beta https://oopetris.totto.lt/repo/assets/oopetris.beta.flatpakrepo
29+
30+
```
31+
32+
Than install it by using this command:
33+
34+
```bash
35+
flatpak install -v com.github.mgerhold.OOPetris
36+
```
37+
38+
To update use the normal flatpak update command, keep in mind, that the bet may be unstable and break things, use with caution!
39+
40+
## Other
41+
42+
> [!NOTE]
43+
> This is still WIP
44+
45+
All other platforms have more difficult to support auto update capabilities, so you can find more on our [website](https://oopetris.totto.lt/releases).

tools/install/meson.build

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ if build_application
66
meson.project_source_root() / 'assets',
77
install_dir: 'share/oopetris',
88
install_tag: 'assets',
9-
exclude_files: ['oopetris.desktop.in', 'OOPetris.svg', 'recordings.magic'],
9+
exclude_files: [
10+
'oopetris.desktop.in',
11+
'com.github.mgerhold.OOPetris.metainfo.xml.in',
12+
'OOPetris.svg',
13+
'recordings.magic',
14+
],
1015
exclude_directories: ['icon'],
1116
)
1217

@@ -15,6 +20,8 @@ if build_application
1520
app_name = 'com.github.mgerhold.OOPetris'
1621
endif
1722

23+
require_checks = get_option('tests')
24+
1825
conf = configuration_data()
1926
conf.set('APP_NAME', app_name)
2027

@@ -54,15 +61,57 @@ if build_application
5461
endif
5562
endif
5663

57-
configure_file(
58-
input: meson.project_source_root() / 'assets/oopetris.desktop.in',
64+
desktop_file = configure_file(
65+
input: meson.project_source_root() / 'assets' / 'oopetris.desktop.in',
5966
output: app_name + '.desktop',
6067
configuration: conf,
6168
install: true,
6269
install_dir: datadir / 'applications',
6370
install_tag: 'other',
6471
)
6572

73+
desktop_file_validate_exe = find_program('desktop-file-validate', required: require_checks)
74+
75+
if desktop_file_validate_exe.found()
76+
test(
77+
'validate desktop file',
78+
desktop_file_validate_exe,
79+
args: [desktop_file],
80+
)
81+
endif
82+
83+
if is_flatpak_build
84+
85+
flaptak_conf = configuration_data()
86+
flaptak_conf.set('APP_ID', app_name)
87+
flaptak_conf.set('APP_VERSION', meson.project_version())
88+
89+
metainfo_file = configure_file(
90+
input: meson.project_source_root() / 'assets' / 'com.github.mgerhold.OOPetris.metainfo.xml.in',
91+
output: app_name + '.metainfo.xml',
92+
configuration: flaptak_conf,
93+
install: true,
94+
install_dir: datadir / 'metainfo',
95+
install_tag: 'other',
96+
)
97+
98+
ascli_exe = find_program('appstreamcli', required: require_checks)
99+
100+
if ascli_exe.found()
101+
test(
102+
'validate metainfo file',
103+
ascli_exe,
104+
args: [
105+
'validate',
106+
'--no-net',
107+
'--explain',
108+
'--pedantic', metainfo_file,
109+
],
110+
)
111+
endif
112+
113+
endif
114+
66115
logos = [
67116
'24x24.png',
68117
'48x48.png',

0 commit comments

Comments
 (0)