Skip to content

Commit

Permalink
feature: Flathub support
Browse files Browse the repository at this point in the history
- Upgrade to Java 15
- Respect Linux Enviroment Variable XDG_CONFIG_HOME
- Added Appstream metada.xml for Flathub
  • Loading branch information
nrittsti committed Jan 19, 2021
1 parent a34c421 commit 260e023
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 14
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 15
- name: Test with Gradle
run: ./gradlew test -Pplatform=linux -Ptests=Unit
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 14
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 15
- name: Build Linux Version with Gradle
id: build-linux
run: ./gradlew jre build -Pplatform=linux -Ptests=Unit
Expand Down Expand Up @@ -69,10 +69,10 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 14
- name: Set up JDK 15
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 15
architecture: x64
- name: Build Windows Version with Gradle
id: build-windows
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This distribution contains the following files:
```
jre/ - Java Runtime Enviroment
lib/ - Third party libraries
*.metainfo.xml - Appstream Flathub metadata
history.txt - History of NTag
license.txt - License information
ntag.cmd - Windows Launcher
Expand Down Expand Up @@ -135,9 +136,17 @@ Nuvola Icon Theme
Autor: David Vignoni
Licence: LGPL

JAudiotagger Library 2.2.4
Autor: http://www.jthink.net/jaudiotagger/
JAudiotagger Library 2.2.5
Autor: https://www.jthink.net/jaudiotagger/
Licence: LGPL

Open JDK 15
Autor: https://jdk.java.net/15/
Licence: GPL v2 with the Classpath Exception

OpenJFX
Autor: https://github.com/openjdk/jfx/
Licence: GPL v2 with the Classpath Exception

--------------------------------------------------------------------------------
End of document
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ plugins {
}

group = 'com.github'
version = '1.2.8'
sourceCompatibility = '14'
targetCompatibility = '14'
version = '1.2.9'
sourceCompatibility = '15'
targetCompatibility = '15'
jar.archiveFileName = 'ntag.jar'
distTar.archiveFileName = "ntag-${version}-${platform}_bin.tar.gz"
distZip.archiveFileName = "ntag-${version}-${platform}_bin.zip"
Expand Down
5 changes: 5 additions & 0 deletions doc/history.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@ NTag Version History
-------------------------
- ntag.exe for Windows

1.2.9 2021-01-18
-------------------------
- Migration to Java 15
- Respect Linux Enviroment Variable XDG_CONFIG_HOME
- Added Appstream metada.xml for Flathub
11 changes: 10 additions & 1 deletion doc/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This distribution contains the following files:

jre/ - Java Runtime Enviroment
lib/ - Third party libraries
*.metainfo.xml - Appstream Flathub metadata
history.txt - History of NTag
license.txt - License information
ntag.cmd - Windows Launcher
Expand Down Expand Up @@ -120,8 +121,16 @@ Autor: David Vignoni
Licence: LGPL

JAudiotagger Library 2.2.5
Autor: http://www.jthink.net/jaudiotagger/
Autor: https://www.jthink.net/jaudiotagger/
Licence: LGPL

Open JDK 15
Autor: https://jdk.java.net/15/
Licence: GPL v2 with the Classpath Exception

OpenJFX
Autor: https://github.com/openjdk/jfx/
Licence: GPL v2 with the Classpath Exception

--------------------------------------------------------------------------------
End of document
59 changes: 59 additions & 0 deletions etc/com.github.nrittsti.NTag.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ This file is part of NTag (audio file tag editor).
~
~ NTag is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ NTag is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with NTag. If not, see <http://www.gnu.org/licenses/>.
~
~ Copyright 2021, Nico Rittstieg
~
-->
<component type="desktop-application">
<id>com.github.nrittsti.NTag</id>
<launchable type="desktop-id">com.github.nrittsti.NTag.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>NTag (audio file tag editor)</name>
<summary>NTag is a cross platform-graphical tag editor focused on everyday life use cases.</summary>
<description>
<p>List of main features:</p>
<ul>
<li>Viewing and editing tags in audio files</li>
<li>Supported tag fields: title, artist, album, track, disc, year, date, comment, composer, album artist, language, lyrics, genre, compilation</li>
<li>Supported audio formats: MP3, MP4 (M4A, M4B), FLAC, OGG and WMA</li>
<li>Supported tag formats: ID3v1.1, ID3v2.3, ID3v2.4, MP4, ASF and Vorbis Comment</li>
<li>Batch editing of multiple files</li>
<li>Extended tag field editor (create, edit, delete)</li>
<li>Supported cover artwork formats : JPG, PNG</li>
<li>Resize/Shrink cover artwork</li>
<li>Rename files based on the tag information</li>
<li>Filter files by missing artwork/lyrics/metadata</li>
</ul>
</description>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/nrittsti/ntag/master/ntag.png</image>
<caption>NTag Main Window</caption>
</screenshot>
</screenshots>
<developer_name>Nico Rittstieg</developer_name>
<releases>
<release version="1.2.9" date="2021-01-19">
<url>https://github.com/nrittsti/ntag/releases/tag/v1.2.9</url>
</release>
</releases>
<content_rating type="oars-1.1"/>
<url type="bugtracker">https://github.com/nrittsti/ntag/issues</url>
<url type="homepage">https://github.com/nrittsti/ntag</url>
<url type="help">https://github.com/nrittsti/ntag/wiki</url>
</component>
2 changes: 1 addition & 1 deletion etc/ntag.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=NTag
Comment=audio file tag editor
Exec=/usr/bin/ntag
Exec=ntag
Icon=/opt/ntag/ntag.png
Terminal=false
Type=Application
Expand Down
5 changes: 3 additions & 2 deletions etc/ntag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
# You should have received a copy of the GNU General Public License
# along with NTag. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright 2020, Nico Rittstieg
# Copyright 2021, Nico Rittstieg
#
#

HIDPI_CONFIG="${HOME}/.config/ntag/hidpi.config"

HIDPI_CONFIG="${XDG_CONFIG_HOME:-${HOME}/.config}/ntag/hidpi.config"
HIDPI_SCALING=100%
if test -f "${HIDPI_CONFIG}"; then
. "${HIDPI_CONFIG}"
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with NTag. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright 2020, Nico Rittstieg
# Copyright 2021, Nico Rittstieg
#
#

platform=linux
# platform = win
tests=Unit
fxVersion=14.0.2.1
fxVersion=15.0.1
jupiterVersion=5.7.0
19 changes: 16 additions & 3 deletions src/main/java/ntag/io/NTagProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with NTag. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2020, Nico Rittstieg
* Copyright 2021, Nico Rittstieg
*
*/
package ntag.io;
Expand Down Expand Up @@ -64,7 +64,12 @@ private NTagProperties() {
if (System.getProperty("os.name").toLowerCase().contains("win")) {
homeDir = Path.of(System.getenv("APPDATA") + "\\ntag");
} else {
homeDir = Path.of(System.getProperty("user.home") + "/.config/ntag");
String xdgConfigHome = System.getenv("XDG_CONFIG_HOME");
if (xdgConfigHome != null && xdgConfigHome.length() > 0) {
homeDir = Path.of(xdgConfigHome + "/ntag");
} else {
homeDir = Path.of(System.getProperty("user.home") + "/.config/ntag");
}
}
initJarAttributes();
initPreferences();
Expand Down Expand Up @@ -112,7 +117,15 @@ public static String getCredits() {
"\n" +
"JAudiotagger Library 2.2.5\n" +
"Autor:\thttp://www.jthink.net/jaudiotagger/\n" +
"Licence:\tLGPL\n";
"Licence:\tLGPL\n" +
"\n" +
"OpenJDK\n" +
"Autor:\thttps://jdk.java.net/15/\n" +
"Licence:\tGPL v2 with the Classpath Exception\n" +
"\n" +
"OpenJFX\n" +
"Autor:\thttps://github.com/openjdk/jfx/\n" +
"Licence:\tGPL v2 with the Classpath Exception\n";
}

// *** Preferences ***
Expand Down

0 comments on commit 260e023

Please sign in to comment.