Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.5.5 release code #164

Merged
merged 35 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c357a70
Merge pull request #149 from louis77/main
technosf Oct 18, 2024
6bc4b64
Documentation
technosf Oct 13, 2024
ab51a93
Doc and refacoring
technosf Oct 14, 2024
556d6b4
Cleaning up build
technosf Oct 18, 2024
b7362c9
Refactoring windows
technosf Oct 19, 2024
2d8ce00
Auto play refactored
technosf Oct 19, 2024
8d72482
Schema install update
technosf Oct 26, 2024
eab6157
Merge pull request #152 from technosf/development
technosf Oct 26, 2024
f99147d
Made Search performant
technosf Oct 31, 2024
984b3cd
Merge pull request #2 from louis77/development
technosf Oct 31, 2024
10edd81
Merge pull request #154 from technosf/development
technosf Nov 1, 2024
3e1a852
Commenting out the lines that are removed by the flathub patch
technosf Nov 1, 2024
b964605
Merge branch 'louis77:development' into development
technosf Nov 1, 2024
4c0894d
Merge pull request #155 from technosf/development
technosf Nov 1, 2024
8f169ea
Search updates
technosf Nov 3, 2024
a8f760e
Merge branch 'louis77:development' into development
technosf Nov 3, 2024
9f14285
Merge pull request #156 from technosf/development
technosf Nov 3, 2024
fc9e50d
Merge pull request #3 from louis77/development
technosf Nov 3, 2024
66e1577
Merge pull request #157 from technosf/development
technosf Nov 3, 2024
0b181df
Merge pull request #158 from louis77/main
technosf Nov 3, 2024
6742add
Update Window.vala
technosf Nov 4, 2024
951227b
Merge pull request #159 from technosf/development
technosf Nov 4, 2024
3e17ccc
Merge pull request #4 from louis77/development
technosf Nov 4, 2024
b14bce6
Merge pull request #160 from technosf/development
technosf Nov 4, 2024
dcac32a
Ignore reloading failed favicons
technosf Nov 6, 2024
5912cc0
Updated manifest removing org.gnome.SettingsDaemon.MediaKeys per #4 i…
technosf Nov 6, 2024
5ae7c0b
Merge branch 'louis77:development' into development
technosf Nov 6, 2024
dc9207f
Merge pull request #161 from technosf/development
technosf Nov 6, 2024
0b6c2bf
Tweaking timeouts and connections to fix occaisional hangs due to con…
technosf Nov 7, 2024
fc03340
Merge branch 'louis77:development' into development
technosf Nov 7, 2024
7e307b5
Merge pull request #162 from technosf/development
technosf Nov 7, 2024
f40a921
Finalizing for v1.5.5 release
technosf Nov 8, 2024
e0072a7
Removed debug messages for release
technosf Nov 11, 2024
c772b2e
Merge branch 'louis77:development' into development
technosf Nov 11, 2024
956e497
Merge pull request #163 from technosf/development
technosf Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build-aux
.vscode
.buildconfig
.flatpak-builder
.flatpak
code.sh
favicon.ico
tuner.code-workspace
76 changes: 51 additions & 25 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ Discover and Listen to your favourite internet radio stations, and add improve t
- [Tuner Development](#tuner-development)
- [Dependencies](#dependencies)
- [Building the Tuner App From Source](#building-the-tuner-app-from-source)
- [Building the Tuner Flatpak](#building-the-tuner-flatpak)
- [Readying code for a Pull Request](#readying-code-for-a-pull-request)
- [NamingConventions](#namingconventions)
- [Building the Tuner Flatpak](#building-the-tuner-flatpak)
- [Debugging](#debugging)
- [VSCode](#vscode)
- [Bug Introduction](#bug-introduction)
- [Bug Introduction Deduction](#bug-introduction-deduction)
- [Release Process](#release-process)
- [Beta Releases](#beta-releases)
- [Production Releases](#production-releases)


## Overview

**_Tuner_** is hosted on Github, packaged as a Flatpak and distributed by Flathub. **_Tuner_** is writen in [Vala](https://vala.dev/), a C#/Java/JavaFX-like language with a self-hosting compiler that generates C code and uses the GObject type system and wrapping a number of GTK libraries. It uses [Meson](https://mesonbuild.com/) as its build system.
**_Tuner_** is hosted on [Github](https://github.com/louis77/tuner), packaged as a Flatpak and distributed by Flathub. **_Tuner_** is writen in [Vala](https://vala.dev/), a C#/Java/JavaFX-like language with a self-hosting compiler that generates C code and uses the GObject type system and wrapping a number of GTK libraries. It uses [Meson](https://mesonbuild.com/) as its build system.

**_Tuner_** has not undergone a lot of attention in a while, and would benefit from a review with an eye to refactoring and cleaning up the code, while in the short term addressing known bugs and fixing basic functional issues, documentation and also making it easier to build and test.

## Tuner Development
Hosted on Github, the _main_ branch reflects the current stable release. The _development_ branch is the development branch. Pull Requests should be made against the _development_ branch.
Hosted on Github, the _main_ branch reflects the current stable release. The _development_ branch is the development branch and where releases are staged. Pull Requests should be made against the _development_ branch.

### Dependencies

Expand All @@ -46,7 +49,7 @@ sudo apt install libgtk-3-dev libgee-0.8-dev libgranite-dev libgstreamer1.0-dev
```

### Building the Tuner App From Source
There are two build configurations: _debug_ and _release_. The _debug_ build (manifest _com.github.louis77.tuner.debug.yml_) is recommended for development, while the _release_ build (manifest _com.github.louis77.tuner.yml_) is for distribution. Build instructions will focus on the _debug_ build.
There are two build configurations: _debug_ and _release_. The _debug_ build (manifest _com.github.louis77.tuner.debug.yml_) is recommended for development, while the _release_ build (manifest _com.github.louis77.tuner.yml_) is for distribution. Build instructions will focus on the _debug_ build. Copy the required manifest to _com.github.louis77.tuner.xml_ before building.


Clone the repo and drop into the Tuner directory:
Expand All @@ -69,6 +72,26 @@ meson configure -Dprefix=/usr
sudo ninja install
```


### Building the Tuner Flatpak
Tuner uses the __elementary.io__ platform, version __8__. To build the tuner flatpak, install the elementry SDK and Platform:
```bash
apt-get install flatpak-builder
flatpak remote-add --user --if-not-exists elementary https://flatpak.elementary.io/repo.flatpakrepo
flatpak install elementary io.elementary.Sdk//8 io.elementary.Platform//8
```

Build the flatpak in the _user_ scope:
```bash
flatpak-builder --force-clean --user --sandbox --install build-dir com.github.louis77.tuner.debug.yml
```

Run the Tuner flatpack:
```bash
flatpak --user run com.github.louis77.tuner
```
Check the app version to ensure that it matches the version in the manifest.

### Readying code for a Pull Request
Before a pull request can be accepted, the code must pass linting. This is done by running the following command:
```bash
Expand All @@ -91,7 +114,9 @@ Ensure that the CI checks pass before pushing your changes.


### NamingConventions

Going forward, all new code should conform to the following naming conventions:

- Namespaces are named in camel case: NameSpaceName
- Classes are named in camel case: ClassName
- Method names are all lowercase and use underscores to separate words: method_name
Expand All @@ -102,25 +127,6 @@ Going forward, all new code should conform to the following naming conventions:
<!---- Signals are named all lowercase and use underscores to separate words postfixed with \_sig: propertyName_sig -->


## Building the Tuner Flatpak
Tuner uses the __elementary.io__ platform, version __8__. To build the tuner flatpak, install the elementry SDK and Platform:
```bash
apt-get install flatpak-builder
flatpak remote-add --user --if-not-exists elementary https://flatpak.elementary.io/repo.flatpakrepo
flatpak install elementary io.elementary.Sdk//8 io.elementary.Platform//8
```

Build the flatpak in the _user_ scope:
```bash
flatpak-builder --force-clean --user --sandbox --install build-dir com.github.louis77.tuner.debug.yml
```

Run the Tuner flatpack:
```bash
flatpak --user run com.github.louis77.tuner
```
Check the app version to ensure that it matches the version in the manifest.

## Debugging

### VSCode
Expand Down Expand Up @@ -155,11 +161,31 @@ Debugging from VSCode using GDB, set up the launch.json file as follows:
```
_Note:_ Variables appear as pointers, and generated code is not found. Please submit a better config if you have one.

### Bug Introduction
### Bug Introduction Deduction
Knowing when a bug was introduced requires building previous versions and looking for the aberrent behavior. The following commands can be used to check out previous versions of the code:
```bash
git fetch
git tag
git checkout <tag>
```
After checking out the required version, build and run the app as described above.


## Release Process
Releasing _Tuner_ comprises cutting a release of the code in [tuner github](https://github.com/louis77/tuner) and then updating the [flathub repo](https://github.com/flathub/com.github.louis77.tuner) which will automatically have the flatpak generated and rolled to Flathub for distribution.

### Beta Releases
Beta releases should be tagged from the Tuner _development_ branch in with a version number format of _v1.\*.\*-beta.\*_

Once a beta release has been tagged, the Flathub _beta_ branch can be updated via a pull request with the _beta_ tag going into the manifest _.json_, and any patches and documentation updated as needed. The pull request will trigger a flathub build, but will not merge the pull request - pull requests should be merged only if they result in a successful build.

Once the beta is successfully built by flathub it will be available for installation and testing within the user community.

Once a beta roll is deamed a success its pull request can be merged, and a production release can be rolled.

### Production Releases
Production releases are generated from _development_ pull requests into _main_. The updated _main_ branch should be tagged with a version number format of _v1.\*.\*_

Once a release has been tagged, the [flathub repo](https://github.com/flathub/com.github.louis77.tuner) _main_ branch can be updated with the _release_ tag going into the manifest _.json_, and any patches and documentation updated as needed. Updates from the _main_ branch should be copied in from a direct _pull request_ of the _main_ branch. The _main_ branch **should not** come from a merge _beta_ branch to avoid triggering subsequent builds in _beta_ .

Once the main production release is built by flathub it will be available for installation and automatically distributed to user community.
4 changes: 2 additions & 2 deletions com.github.louis77.tuner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ command: com.github.louis77.tuner
finish-args:
- "--share=ipc"
- "--socket=fallback-x11"
- "--socket=system-bus"
- "--socket=wayland"
- "--talk-name=org.gtk.vfs"
- "--talk-name=org.gtk.vfs.*"
- "--share=network"
- "--metadata=X-DConf=migrate-path=/com/github/louis77/tuner/"
- "--socket=pulseaudio"
- "--talk-name=org.gnome.SettingsDaemon.MediaKeys"
- "--talk-name=org.freedesktop.Notifications"
- "--own-name=org.mpris.MediaPlayer2.Tuner"
cleanup:
- "/include"
Expand Down
52 changes: 52 additions & 0 deletions com.github.louis77.tuner.yml.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
app-id: com.github.louis77.tuner
runtime: io.elementary.Platform
runtime-version: '8'
sdk: io.elementary.Sdk
command: com.github.louis77.tuner
finish-args:
- "--share=ipc"
- "--socket=fallback-x11"
- "--socket=system-bus"
- "--socket=wayland"
- "--talk-name=org.gtk.vfs.*"
- "--share=network"
- "--metadata=X-DConf=migrate-path=/com/github/louis77/tuner/"
- "--socket=pulseaudio"
- "--talk-name=org.freedesktop.Notifications"
- "--own-name=org.mpris.MediaPlayer2.Tuner"
cleanup:
- "/include"
- "/lib/pkgconfig"
- "/share/pkgconfig"
- "/share/aclocal"
- "/man"
- "/share/man"
- "/share/gtk-doc"
- "/share/vala"
- "*.la"
- "*.a"
modules:
- name: taglib
buildsystem: cmake-ninja
config-opts:
- "-DBUILD_SHARED_LIBS=ON"
- "-DCMAKE_BUILD_TYPE=Release"
sources:
- type: archive
# taglib updated in v1.5.3
url: https://github.com/taglib/taglib/releases/download/v1.13.1/taglib-1.13.1.tar.gz
sha256: c8da2b10f1bfec2cd7dbfcd33f4a2338db0765d851a50583d410bacf055cfd0b
- name: tuner
buildsystem: meson
build-options:
cflags: "-g"
cxxflags: "-g"
buildtype: "debug"
config-opts:
- "--buildtype=debug"
post-install:
- install -Dm644 /app/share/icons/hicolor/64x64/apps/${FLATPAK_ID}.svg -t /app/share/icons/hicolor/128x128/apps/
sources:
- type: dir
path: .
48 changes: 48 additions & 0 deletions com.github.louis77.tuner.yml.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
app-id: com.github.louis77.tuner
runtime: io.elementary.Platform
runtime-version: '8'
sdk: io.elementary.Sdk
command: com.github.louis77.tuner
finish-args:
- "--share=ipc"
- "--socket=fallback-x11"
- "--socket=system-bus"
- "--socket=wayland"
- "--talk-name=org.gtk.vfs.*"
- "--share=network"
- "--metadata=X-DConf=migrate-path=/com/github/louis77/tuner/"
- "--socket=pulseaudio"
- "--talk-name=org.freedesktop.Notifications"
- "--own-name=org.mpris.MediaPlayer2.Tuner"
cleanup:
- "/include"
- "/lib/pkgconfig"
- "/share/pkgconfig"
- "/share/aclocal"
- "/man"
- "/share/man"
- "/share/gtk-doc"
- "/share/vala"
- "*.la"
- "*.a"
modules:
- name: taglib
buildsystem: cmake-ninja
config-opts:
- "-DBUILD_SHARED_LIBS=ON"
- "-DCMAKE_BUILD_TYPE=Release"
sources:
- type: archive
# taglib updated in v1.5.3
url: https://github.com/taglib/taglib/releases/download/v1.13.1/taglib-1.13.1.tar.gz
sha256: c8da2b10f1bfec2cd7dbfcd33f4a2338db0765d851a50583d410bacf055cfd0b
- name: tuner
buildsystem: meson
config-opts:
- "--buildtype=release"
post-install:
- install -Dm644 /app/share/icons/hicolor/64x64/apps/${FLATPAK_ID}.svg -t /app/share/icons/hicolor/128x128/apps/
sources:
- type: dir
path: .
13 changes: 13 additions & 0 deletions data/com.github.louis77.tuner.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@
</provides>

<releases>
<release version="1.5.5" date="2024-11-08">
<description>
<p>Maintanance release:</p>
<ul>
<li>Updated HTTP Session params to improve response</li>
<li>Increased Search re-fire interval to reduce number of concurrent searches</li>
<li>Made Search asynchronous so UI remains responsive during searches</li>
<li>Ignore request to load failing favicons URLs</li>
<li>Removed shadow from.svg images per Flathub quality directives</li>
<li>Removed org.gnome.SettingsDaemon.MediaKeys from manifest per flathub</li>
</ul>
</description>
</release>
<release version="1.5.4" date="2024-10-10">
<description>
<p>Maintanance release:</p>
Expand Down
54 changes: 47 additions & 7 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -1,41 +1,81 @@
#
# Data meson build file
#
# Icons, desktop file, appdata and schema
#

#
# Install icons
#
message('Installing Icons...')

icon_sizes = ['16', '24', '32', '48', '64', '128']

foreach i : icon_sizes
install_data (
join_paths ('icons', i, meson.project_name () + '.svg'),
install_dir: join_paths (get_option ('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps')
install_dir: join_paths (get_option ('datadir'), 'icons','hicolor', i + 'x' + i, 'apps'),
install_tag: 'icons'
)
install_data (
join_paths ('icons', i, meson.project_name () + '.svg'),
install_dir: join_paths (get_option ('datadir'), 'icons', 'hicolor', i + 'x' + i + '@2', 'apps')
install_dir: join_paths (get_option ('datadir'), 'icons','hicolor', i + 'x' + i + '@2', 'apps'),
install_tag: 'icons'
)
endforeach


message('Installed icons\n')


#
# Install desktop file
#
message('Installing desktop file...')
# Translate and install our .desktop file so the Applications Menu will see it
i18n.merge_file (
input: meson.project_name () + '.desktop.in',
output: meson.project_name () + '.desktop',
po_dir: join_paths (meson.project_source_root(), 'po', 'extra'),
type: 'desktop',
install: true,
install_dir: join_paths (get_option ('datadir'), 'applications')
install_dir: join_paths (get_option ('datadir'), 'applications'),
install_tag: 'applications'
)

message('Installed desktop file\n')


#
# Install appdata
#
message('Installing appdata...')

# Translate and install our .appdata.xml file so AppCenter will see it
i18n.merge_file (
input: meson.project_name () + '.appdata.xml.in',
output: meson.project_name () + '.appdata.xml',
po_dir: join_paths (meson.project_source_root(), 'po', 'extra'),
install: true,
install_dir: join_paths (get_option ('datadir'), 'metainfo')
install_dir: join_paths (get_option ('datadir'), 'metainfo'),
install_tag: 'metainfo'
)

message('Installed appdata\n')


#
# Install schema
# This doesn't work on older versions of meson:
# schemas_dir = get_option('prefix') / get_option('datadir') / 'glib-2.0' / 'schemas'
#
message('Installing schema...')

schemas_dir = join_paths (get_option('prefix'), get_option('datadir'), 'glib-2.0', 'schemas')
settings_schemas = [ meson.project_name () + '.gschema.xml' ]

settings_schemas = [ meson.project_name() + '.gschema.xml' ]

install_data(settings_schemas, install_dir: schemas_dir)

meson.add_install_script('glib-compile-schemas', schemas_dir, install_tag: 'schemas')


message('Installed schema\n')
10 changes: 8 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
project (
'com.github.louis77.tuner',
'vala', 'c',
version: '1.5.4'
version: '1.5.5',
meson_version: '>= 0.60.0',
)

message('Starting build for project: ' + meson.project_name())
message('Build type: ' + get_option('buildtype'))


# if meson.get_compiler ('vala').get_id() == 'valac'
# extra_args = ['-g', '--save_temps']
# endif
Expand Down Expand Up @@ -65,6 +70,7 @@ executable (
)

subdir ('data')

subdir ('po')

meson.add_install_script ('meson/post_install.py')
message('Build for project: ' + meson.project_name() + ' finished.\n')
Loading