Skip to content

Commit

Permalink
Cleanup & update for GNOME 45 (#121)
Browse files Browse the repository at this point in the history
* Workflows: Update to newer images

* Manifest: Bump to GNOME 45

* Meson: Bump version to 4.0.6

* MainWindow: Fix wrapping title (#120)

* Metainfo: Describe other fixes

* Cleanup for GNOME 45

MainWindow: construct About window from MetaInfo
Meson: bump to 0.58, remove unused postinstall script

* MainWindow (lint): Remove newline from end of file

* MetaInfo: Put issues tag outside of release description

* MetaInfo: Correct screenshot URLs to point to release
  • Loading branch information
cassidyjames authored Oct 10, 2023
1 parent dc97684 commit 0892bc6
Show file tree
Hide file tree
Showing 15 changed files with 97 additions and 148 deletions.
38 changes: 10 additions & 28 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,24 @@
name: Flatpak
on:
push:
branches:
- main
pull_request:

on: [push, pull_request]

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
flatpak:
runs-on: ubuntu-latest

container:
image: bilelmoussaoui/flatpak-github-actions:gnome-43
image: bilelmoussaoui/flatpak-github-actions:gnome-45
options: --privileged

strategy:
matrix:
arch: [x86_64, aarch64]
# Don't fail the whole workflow if one architecture fails
fail-fast: false
steps:
- uses: actions/checkout@v2

- name: Install deps
run: |
dnf -y install docker
if: ${{ matrix.arch == 'aarch64' }}

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v1
with:
platforms: arm64
if: ${{ matrix.arch == 'aarch64' }}

- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6.2
with:
bundle: dippi-${{ matrix.arch }}.flatpak
bundle: dippi.flatpak
manifest-path: com.github.cassidyjames.dippi.json
cache-key: "flatpak-builder-${{ github.sha }}"
arch: ${{ matrix.arch }}
66 changes: 30 additions & 36 deletions .github/workflows/gettext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,38 @@ on:
- 'po/POTFILES.in'
- 'po/extra/LINGUAS'
- 'po/extra/POTFILES.in'
- '.github/workflows/gettext.yml'

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
container:
image: fedora:39
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y \
appstream \
gettext\
sudo dnf update -y
sudo dnf install -y \
appstream-devel \
gettext-devel \
git \
libadwaita-1-dev \
libgtk-4-dev \
libxml2-utils \
gtk4-devel \
libadwaita-devel \
libxml2-devel \
meson \
policykit-1 \
sudo \
valac
vala
- name: Build libadwaita
run: |
git clone https://gitlab.gnome.org/GNOME/libadwaita.git /tmp/libadwaita
cd /tmp/libadwaita
git checkout 1.2.0
meson . _build -Dexamples=false
ninja -C _build
sudo ninja -C _build install
cd -
rm -rf /tmp/libadwaita
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: |
Expand All @@ -56,20 +53,17 @@ jobs:
- name: Regenerate translation files
run: |
ninja -C _build $(git ls-files | grep \.pot$ | sed 's/.*\///' | sed 's/.pot/-update-po/')
ninja -C _build com.github.cassidyjames.dippi-pot
ninja -C _build com.github.cassidyjames.dippi-update-po
- name: Commit & push
- name: Commit
continue-on-error: true
run: |
echo "Configuring git credentials…"
git remote set-url origin https://x-access-token:"$GITHUB_TOKEN"@github.com/"$GITHUB_REPOSITORY".git
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
echo "Committing…"
git checkout main
git add .
git commit --message "Update translation files"
echo "Pushing…"
git push --set-upstream origin main || true
# FILES_CHANGED=$(git diff --name-only | wc -l)
# if [[ $FILES_CHANGED != 0 ]]; then
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git commit -am "Update translation files"
git push
# fi
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Lint
run: io.elementary.vala-lint -d .
25 changes: 0 additions & 25 deletions build-aux/meson/post_install.py

This file was deleted.

2 changes: 1 addition & 1 deletion com.github.cassidyjames.dippi.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app-id": "com.github.cassidyjames.dippi",
"runtime" : "org.gnome.Platform",
"runtime-version": "44",
"runtime-version": "45",
"sdk": "org.gnome.Sdk",
"command": "com.github.cassidyjames.dippi",
"finish-args": [
Expand Down
7 changes: 4 additions & 3 deletions data/gresource.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/github/cassidyjames/dippi">
<file>style.css</file>
<file>style-dark.css</file>
<gresource prefix="/com/github/cassidyjames/dippi/">
<file alias="metainfo.xml" preprocess="xml-stripblanks">metainfo.appdata.xml.in</file>
<file alias="style.css">styles/style.css</file>
<file alias="style-dark.css">styles/dark.css</file>
</gresource>
<gresource prefix="/com/github/cassidyjames/dippi/icons/scalable/actions/">
<file alias="com.github.cassidyjames.dippi.svg" preprocess="xml-stripblanks">icons/com.github.cassidyjames.dippi.svg</file>
Expand Down
13 changes: 2 additions & 11 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install_data(
i18n.merge_file(
input: 'launcher.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: meson.source_root() / 'po' / 'extra',
po_dir: meson.project_source_root() / 'po' / 'extra',
type: 'desktop',
install: true,
install_dir: get_option('datadir') / 'applications'
Expand All @@ -20,7 +20,7 @@ i18n.merge_file(
i18n.merge_file(
input: 'metainfo.appdata.xml.in',
output: meson.project_name() + '.metainfo.xml',
po_dir: meson.source_root() / 'po' / 'extra',
po_dir: meson.project_source_root() / 'po' / 'extra',
type: 'xml',
install: true,
install_dir: get_option('datadir') / 'metainfo'
Expand All @@ -34,12 +34,3 @@ if desktop_file_validate.found()
args: meson.current_build_dir () / meson.project_name() + '.desktop'
)
endif

# appstreamcli = find_program(['appstreamcli', 'appstream-util'], required:false)
# if appstreamcli.found()
# test (
# 'Validate appdata file',
# appstreamcli,
# args: ['validate', meson.current_build_dir () / meson.project_name() + '.appdata.xml']
# )
# endif
27 changes: 18 additions & 9 deletions data/metainfo.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@
<binary>com.github.cassidyjames.dippi</binary>
</provides>
<releases>
<release version="4.0.6" date="2023-10-10">
<description>
<p>GNOME 45 and crash fix</p>
</description>
<issues>
<issue url="https://github.com/cassidyjames/dippi/issues/111">Crash when typing zero into pixel-size field</issue>
<issue url="https://github.com/cassidyjames/dippi/issues/120">Titles wrap with GNOME 45</issue>
</issues>
</release>
<release version="4.0.5" date="2023-10-10">
<description>
<p>Translations and GNOME 44</p>
Expand Down Expand Up @@ -310,35 +319,35 @@
</releases>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/cassidyjames/dippi/master/data/screenshots/default.png</image>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/4.0.6/data/screenshots/default.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/master/data/screenshots/default-dark.png</image>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/4.0.6/data/screenshots/default-dark.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/master/data/screenshots/hidpi.png</image>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/4.0.6/data/screenshots/hidpi.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/master/data/screenshots/hidpi-dark.png</image>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/4.0.6/data/screenshots/hidpi-dark.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/master/data/screenshots/problematic.png</image>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/4.0.6/data/screenshots/problematic.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/master/data/screenshots/problematic-dark.png</image>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/4.0.6/data/screenshots/problematic-dark.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/master/data/screenshots/lodpi.png</image>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/4.0.6/data/screenshots/lodpi.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/master/data/screenshots/lodpi-dark.png</image>
<image>https://raw.githubusercontent.com/cassidyjames/dippi/4.0.6/data/screenshots/lodpi-dark.png</image>
</screenshot>
</screenshots>
<content_rating type="oars-1.1"></content_rating>
<developer_name>Cassidy James Blaede</developer_name>
<url type="homepage">https://cassidyjames.com/dippi</url>
<url type="bugtracker">https://github.com/cassidyjames/dippi/issues</url>
<url type="translate">https://github.com/cassidyjames/dippi/tree/master/po#readme</url>
<url type="translate">https://github.com/cassidyjames/dippi/tree/main/po#readme</url>
<url type="donation">https://cassidyjames.com/pay</url>
<url type="help">https://cassidyjames.com/support</url>
<branding>
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
project(
'com.github.cassidyjames.dippi',
'vala', 'c',
version: '4.0.5'
version: '4.0.6',
meson_version: '>=0.58',
)

gnome = import('gnome')
Expand Down Expand Up @@ -34,14 +35,11 @@ executable(
asresources,
config_file,
dependencies: [
dependency('glib-2.0'),
dependency('gtk4'),
dependency('libadwaita-1'),
dependency('libadwaita-1', version: '>=1.4'),
meson.get_compiler('c').find_library('m', required : false)
],
install: true
)
subdir('data')
subdir('po')

meson.add_install_script('build-aux' / 'meson'/ 'post_install.py')
2 changes: 1 addition & 1 deletion po/extra/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
i18n.gettext('extra',
args: [
'--directory=' + meson.source_root(),
'--directory=' + meson.project_source_root(),
'--from-code=UTF-8'
],
preset: 'glib',
Expand Down
2 changes: 1 addition & 1 deletion po/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
i18n.gettext(meson.project_name(),
args: [
'--directory=' + meson.source_root(),
'--directory=' + meson.project_source_root(),
'--from-code=UTF-8'
]
)
Expand Down
6 changes: 0 additions & 6 deletions src/App.vala
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
*/

public class Dippi.App : Adw.Application {
public const string NAME = "Dippi";
public const string DEVELOPER = "Cassidy James Blaede";
public const string EMAIL = "c@ssidyjam.es";
public const string URL = "https://cassidyjames.com";

public App () {
Object (
application_id: APP_ID,
Expand All @@ -29,7 +24,6 @@ public class Dippi.App : Adw.Application {
"<Ctrl>W",
});


quit_action.activate.connect (() => {
if (app_window != null) {
app_window.destroy ();
Expand Down
Loading

0 comments on commit 0892bc6

Please sign in to comment.