Skip to content

Commit

Permalink
Merge branch 'helge17:master' into workflow-swt
Browse files Browse the repository at this point in the history
  • Loading branch information
G-eos authored Dec 22, 2024
2 parents 62a05bf + 090dd32 commit 98ee2ba
Show file tree
Hide file tree
Showing 193 changed files with 3,424 additions and 209 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ubuntu-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name : update repos
run: sudo apt-get update
- name : install package
run: sudo apt install wget unzip git build-essential default-jdk maven libwebkit2gtk-4.0-37 libfluidsynth-dev libjack-jackd2-dev libasound2-dev liblilv-dev libsuil-dev qtbase5-dev
run: sudo apt install wget unzip git build-essential default-jdk maven libwebkit2gtk-4.1-0 libfluidsynth-dev libjack-jackd2-dev libasound2-dev liblilv-dev libsuil-dev qtbase5-dev
- name : Download SWT
run: curl -o swt-4.26-gtk-linux-`uname -m`.zip https://archive.eclipse.org/eclipse/downloads/drops4/R-4.26-202211231800/swt-4.26-gtk-linux-`uname -m`.zip
- name : install SWT
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Sascha Riemer
* Contact: <[email protected]>

Auria
* CoreAudio Plugin for MacOS
* Audio Unit plugin for macOS
* Contact: <[email protected]>

Herak
Expand Down
18 changes: 16 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
TuxGuitar 1.6.5 (2024-12-14) changes:

* Add zoom control for Print/Export to pdf
* Restore scrollbars during playback
* Better support for upgrading an existing installation on Windows
* Improved GP import
* Save/restore player mode when switching tabs
* Export only audible tracks to MIDI and audio files
* Fix paste selection issue
* Fix playback of alternative repeats
* Fix playback of grace notes in percussion tracks
* Correctly consider new default shortcuts after an upgrade
* Minor improvements and cleanups

TuxGuitar 1.6.4 (2024-08-23) changes:

* Fixed performance issue on newer Linux versions
Expand All @@ -23,8 +37,8 @@ TuxGuitar 1.6.3 (2024-06-06) changes:
* "Currently played beat" highlight improved
* Made caret more visible
* Adapted copy-paste function to better handle different tuning presets
* Enabled files to be opened with double-click in Finder on MacOS
* Display menu accelerators correctly on MacOS
* Enabled files to be opened with double-click in Finder on macOS
* Display menu accelerators correctly on macOS
* Removed confirmation "Do you want to apply changes now?"
* Made marker font configurable
* Simplified "Change Tuning" dialog
Expand Down
14 changes: 7 additions & 7 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install TuxGuitar

You can find ready to use installation packages for Linux, Windows, MacOS, FreeBSD and Android on
You can find ready to use installation packages for Linux, Windows, macOS, FreeBSD and Android on

[https://github.com/helge17/tuxguitar/releases/](https://github.com/helge17/tuxguitar/releases/)

Expand All @@ -22,8 +22,8 @@ You can also try to build TuxGuitar using the [GitHub Actions](https://docs.gith

- JDK 9 or higher
- Maven 3.3 or higher
- Fluidsynth (optional)
- JACK (optional)
- FluidSynth (optional)
- Jack (optional)
- Eclipse SWT 4

## Build on Debian/Ubuntu Linux
Expand Down Expand Up @@ -125,17 +125,17 @@ The Windows application is now located in the `desktop/build-scripts/tuxguitar-w

To start TuxGuitar you need a Java Runtime Environment. You can get the one from [portableapps.com](https://portableapps.com/apps/utilities/OpenJDK64) and extract it to a subfolder named `jre`. Then you should be able to start TuxGuitar by double-clicking on `tuxguitar.exe` or `tuxguitar.bat`.

## Build on MacOS
## Build on macOS

On MacOS you need to download and install [Homebrew](https://brew.sh) to build TuxGuitar.
On macOS you need to download and install [Homebrew](https://brew.sh) to build TuxGuitar.

### Install Prerequisites

```sh
$ brew install openjdk maven wget
```

### Download and install SWT for MacOS
### Download and install SWT for macOS

```sh
$ wget https://archive.eclipse.org/eclipse/downloads/drops4/R-4.14-201912100610/swt-4.14-cocoa-macosx-`uname -m`.zip
Expand All @@ -154,7 +154,7 @@ Same as for Debian (see above).

```sh
$ cd desktop/build-scripts/tuxguitar-macosx-swt-cocoa
$ mvn -e clean verify
$ mvn -e clean verify -P native-modules
$ cd -
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TuxGuitar includes the following third party products:

## Installation

You can find ready to use installation packages for Linux, Windows, MacOS, FreeBSD and Android here: [releases](https://github.com/helge17/tuxguitar/releases/).
You can find ready to use installation packages for Linux, Windows, macOS, FreeBSD and Android here: [releases](https://github.com/helge17/tuxguitar/releases/).

To build TuxGuitar from source code, refer to the [INSTALL.md](INSTALL.md) file.

Expand Down
4 changes: 2 additions & 2 deletions common/TuxGuitar-compat/share/META-INF/tuxguitar-compat.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Plugin Information ###
plugin.name=TuxGuitar file format compatibility
plugin.description=This plugin, provides support for other tuxguitar file format versions.
plugin.name=TuxGuitar legacy file format compatibility
plugin.description=This plugin provides support for opening and exporting older\nTuxGuitar file format versions.
plugin.author=Julian Casadesus <[email protected]>
plugin.version=1.0
4 changes: 2 additions & 2 deletions common/TuxGuitar-gpx/share/META-INF/tuxguitar-gpx.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Plugin Information ###
plugin.name=GPX File Format plugin
plugin.description=GPX File Format plugin based on code contributed by J.J\u00f8rgen von Bargen, updates by b4dc0d3r
plugin.name=Guitar Pro 6 and 7 file import plugin
plugin.description=Plugin to open Guitar Pro 6 (GPX) and 7 (GP) files
plugin.author=J.J\u00f8rgen von Bargen, Julian Casadesus <[email protected]>, b4dc0d3r
plugin.version=0.2
4 changes: 2 additions & 2 deletions common/TuxGuitar-gtp/share/META-INF/tuxguitar-gtp.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Plugin Information ###
plugin.name=Guitar Pro File Format plugin
plugin.description=Guitar Pro File Format plugin for TuxGuitar
plugin.name=Guitar Pro 1 to 5 file import/export plugin
plugin.description=This plugin lets you open and export Guitar Pro version 1 to 5\nfiles (GTP, GP3/GP4/GP5).
plugin.author=Julian Casadesus <[email protected]>
plugin.version=1.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

public class TGPrintSettings {

// context attributes
public static final String ATTRIBUTE_PRINT_STYLES = "attribute.print.settings.styles";
public static final String ATTRIBUTE_PRINT_ZOOM = "attribute.print.settings.zoom";

public static final int ALL_TRACKS = -1;

private int trackNumber;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,13 @@ public void parse(MidiSequenceHandler sequence) {

this.addDefaultMessages(helper, this.song);

boolean existsSoloTrack = false;
for (int i = 0; i < this.song.countTracks(); i++) {
addTrack(helper, this.song.getTrack(i));
existsSoloTrack |= this.song.getTrack(i).isSolo();
}
for (int i = 0; i < this.song.countTracks(); i++) {
TGTrack track = this.song.getTrack(i);
addTrack(helper, track, !track.isMute() && (!existsSoloTrack || track.isSolo()));
}
sequence.notifyFinish();
}
Expand All @@ -131,7 +136,7 @@ private void addDefaultMessages(MidiSequenceHelper sh, TGSong tgSong) {
}
}

private void addTrack(MidiSequenceHelper sh, TGTrack track) {
private void addTrack(MidiSequenceHelper sh, TGTrack track, boolean shallPlay) {
TGChannel tgChannel = this.songManager.getChannel(this.song, track.getChannelId() );
if( tgChannel != null ){
TGMeasure previous = null;
Expand All @@ -149,9 +154,10 @@ private void addTrack(MidiSequenceHelper sh, TGTrack track) {
addTempo(sh,measure, previous, mh.getMove());
addMetronome(sh,measure.getHeader(), mh.getMove() );
}
//agrego los pulsos
addBeats( sh, tgChannel, track, measure, mIndex, mh.getMove() );

if (shallPlay) {
//agrego los pulsos
addBeats( sh, tgChannel, track, measure, mIndex, mh.getMove() );
}
previous = measure;
}
}
Expand Down Expand Up @@ -191,8 +197,8 @@ private void addNotes( MidiSequenceHelper sh, TGChannel tgChannel, TGTrack track
addFadeIn(sh,track.getNumber(), start, duration, tgChannel.getVolume(), channel);
}
//---Grace---
if(note.getEffect().isGrace() && !percussionChannel ){
bendMode = true;
if(note.getEffect().isGrace()) {
bendMode = !percussionChannel;
int graceKey = track.getOffset() + note.getEffect().getGrace().getFret() + ((TGString)track.getStrings().get(note.getString() - 1)).getValue();
int graceLength = note.getEffect().getGrace().getDurationTime();
int graceVelocity = note.getEffect().getGrace().getDynamic();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class TGVersion implements Comparable<TGVersion> {

public static final TGVersion CURRENT = new TGVersion(1,6,4);
public static final TGVersion CURRENT = new TGVersion(1,6,5);

private int major;
private int minor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Plugin Information ###
plugin.name=Lilypond exporter
plugin.description=Lilypond exporter plugin
plugin.name=LilyPond file export plugin
plugin.description=Plugin to export tablatures in the LilyPond (LY) file format
plugin.author=Julian Casadesus <[email protected]>, updates by b4dc0d3r
plugin.version=1.1
4 changes: 2 additions & 2 deletions common/TuxGuitar-midi/share/META-INF/tuxguitar-midi.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Plugin Information ###
plugin.name=Midi file format import-export plugin
plugin.description=Midi file format import-export plugin
plugin.name=MIDI file import/export plugin
plugin.description=This plugin provides support for importing and exporting MIDI files.
plugin.author=Julian Casadesus <[email protected]>
plugin.version=1.0
4 changes: 2 additions & 2 deletions common/TuxGuitar-pdf/share/META-INF/tuxguitar-pdf.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Plugin Information ###
plugin.name=PDF file format exporter
plugin.description=TuxGuitar-pdf is an \"iText\" based *.pdf exporter plugin.\niText Homepage: https://itextpdf.com/
plugin.name=PDF file export plugin
plugin.description=This plugin lets you export your tabs as PDF file.
plugin.author=Julian Casadesus <[email protected]>
plugin.version=1.0
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ public TGPrintSettings getDefaultStyles(TGSong song){

public void write(TGSongWriterHandle handle) throws TGFileFormatException {
try{
TGPrintSettings settings = handle.getContext().getAttribute(TGPrintSettings.class.getName());
TGPrintSettings settings = handle.getContext().getAttribute(TGPrintSettings.ATTRIBUTE_PRINT_STYLES);
if( settings == null ) {
settings = getDefaultStyles(handle.getSong());
}
Integer zoomValue = handle.getContext().getAttribute(TGPrintSettings.ATTRIBUTE_PRINT_ZOOM);
if (zoomValue == null) {
zoomValue = 100;
}

TGLayoutStyles styles = handle.getContext().getAttribute(TGLayoutStyles.class.getName());
if( styles == null ) {
Expand All @@ -71,7 +75,7 @@ public void write(TGSongWriterHandle handle) throws TGFileFormatException {

TGPrintLayout layout = new TGPrintLayout(controller, settings);

layout.loadStyles(1f);
layout.loadStyles(((float)zoomValue)/100f);
layout.updateSong();
layout.makeDocument(new PDFDocument(this.context, pageSize, pageMargins, handle.getOutputStream()));

Expand Down
4 changes: 2 additions & 2 deletions common/TuxGuitar-ptb/share/META-INF/tuxguitar-ptb.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Plugin Information ###
plugin.name=PTB File Format plugin
plugin.description=PTB File Format plugin
plugin.name=PowerTab file import plugin
plugin.description=Plugin to open PowerTab (PTB) files
plugin.author=Julian Casadesus <[email protected]>
plugin.version=1.0
1 change: 1 addition & 0 deletions common/resources/lang/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ print.preview=Print Preview
print.preview.page-of=of
file.print=Print
print.range=Range
print.zoom=Zoom
file.history=History
file.exit=Exit

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_bg.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Преглед за печат
# print.preview.page-of=
file.print=Печат
print.range=Обхват
# print.zoom=
file.history=История
file.exit=Изход

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_ca.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Previsualitzeu la impressió
print.preview.page-of=De
file.print=Imprimeix
print.range=Rang
# print.zoom=
file.history=Històric
file.exit=Sortir

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_cs.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Náhled tisku
# print.preview.page-of=
file.print=Tisk
print.range=Rozsah
# print.zoom=
file.history=Historie
file.exit=Konec

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Druckvorschau
print.preview.page-of=von
file.print=Drucken
print.range=Bereich
print.zoom=Skalierung
file.history=Zuletzt geöffnete Dateien
file.exit=Beenden

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_el.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Προεπισκόπηση Εκτύπωση
print.preview.page-of=του
file.print=Εκτύπωση
print.range=Εύρος
# print.zoom=
file.history=Ιστορικό
file.exit=Έξοδος

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Vista Preliminar
print.preview.page-of=De
file.print=Imprimir
print.range=Rango
# print.zoom=
file.history=Historial
file.exit=Salir

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_eu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Vista Preliminar
# print.preview.page-of=
file.print=imprimatu
print.range=Rango
# print.zoom=
file.history=Historiala
file.exit=Irten

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_fi.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Tulostuksen esikatselu
# print.preview.page-of=
file.print=Tulosta
print.range=Tulostusalue
# print.zoom=
file.history=Viimeksi avatut tiedostot
file.exit=Lopeta

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Aperçu avant impression
print.preview.page-of=sur
file.print=Imprimer
print.range=Plage de mesures
# print.zoom=
file.history=Historique
file.exit=Quitter

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_hu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Nyomtatási kép
# print.preview.page-of=
file.print=Nyomtatás
print.range=Tartomány
# print.zoom=
file.history=Elõzmények
file.exit=Kilépés

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_it.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Anteprima stampa
print.preview.page-of=Di
file.print=Stampa
print.range=Misura
print.zoom=Ridimensiona
file.history=Cronologia
file.exit=Esci

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=印刷プレビュ
print.preview.page-of=/
file.print=印刷
print.range=範囲
# print.zoom=
file.history=履歴
file.exit=終了

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_ko.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=인쇄 미리보기
# print.preview.page-of=
file.print=인쇄
print.range=범위
# print.zoom=
# file.history=
file.exit=종료

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_lt.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Spaudinio peržiūra
print.preview.page-of=
file.print=Spausdinti
print.range=Rėžiai
# print.zoom=
file.history=Istorija
file.exit=Baigti

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_nl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Afdruk Voorbeeld
# print.preview.page-of=
file.print=Afdrukken
print.range=Bereik
# print.zoom=
file.history=Geschiedenis
file.exit=Afsluiten

Expand Down
1 change: 1 addition & 0 deletions common/resources/lang/messages_pl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ print.preview=Podgląd wydruku
print.preview.page-of=z
file.print=Drukuj
print.range=Zakres
# print.zoom=
file.history=Historia
file.exit=Zakończ

Expand Down
Loading

0 comments on commit 98ee2ba

Please sign in to comment.