In some cases SWT Libs need to be added manually because maven fails ... check out https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.13-201909161045/swt-4.13-gtk-linux-x86_64.zip
ohli's solution from pterodactylus42#2 :
wget -qO- https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.13-201909161045/swt-4.13-gtk-linux-x86_64.zip | unzip
Works only if your unzip supports reading from standard input, otherwise replace with your favorite tool.
cd /build-scripts/tuxguitar-linux-x86_64
mvn install:install-file -Dfile=/swt-4.13-gtk-linux-x86_64/swt.jar -DartifactId=org.eclipse.swt.gtk.linux.x86_64 -Dpackaging=jar -DgroupId=org.eclipse.swt -Dversion=4.13
now you can build tuxguitar without errors: mvn -P native-modules package
- JDK 7 or higher
- Maven 3.3 or higher
- Fluidsynth (optional)
- JACK (optional)
git clone https://github.com/cyclopsian/tuxguitar
cd tuxguitar
sudo apt install build-essential default-jdk maven libfluidsynth-dev libjack-jackd2-dev libasound2-dev libgtk-3-dev
cd build-scripts/tuxguitar-linux-x86_64-deb
mvn -P native-modules package
sudo dpkg -i target/tuxguitar-*.deb
cd build-scripts/tuxguitar-linux-x86_64
mvn -P native-modules package
# To run the program:
cd target/tuxguitar-*
./tuxguitar.sh
Cross compiling from Ubuntu/Debian with mingw-w64
sudo apt install default-jdk maven gcc-mingw-w64-i686
cd build-scripts/tuxguitar-windows-x86
mvn -P native-modules -D tuxguitar.jni.cc=i686-w64-mingw32-gcc package
# Application will now be in be in the build-scripts/tuxguitar-windows-x86/target folder
macOS with Homebrew
brew install oracle-jdk maven
cd build-scripts/tuxguitar-macosx-cocoa-64
mvn package
# Application will now be in be in the build-scripts/tuxguitar-macosx-cocoa-64/target folder
cd build-scripts/tuxguitar-freebsd-x86_64
pkg install openjdk8 alsa-plugins maven swt gcc gmake fluidsynth
mvn -P native-modules package