I wrote a Music Player and Library in Java for GNU/Linux and Windows.
My build process is currently in ANT, but I intend to migrate away from that to something more modern after the next release. I've heard good things about gradle, but if there's something more suitable you'd like to recommend, I'm open to that.
The project was originally in pure Java, but in order to get access to certain features, I've had to start special-casing different native features and linking them into my program using JNI.
Here's an outline of the current parts:
- Hypnos Base - written in Java, compiles to a jar.
- JXGrabKey - An existing open source hotkey library, modified by my project to support javafx. Compiles to a jar that is included in the project via manifest.
- GNU/Linux Native Launcher - written in C++, compiled with
- Windows Native Launcher - written in C++, compiled with
- GNU/Linux GTK Tray Icon - written in C, compiled with
In addition, after the various items are built, I bundle together the pieces and then I run a NSIS script to generate a windows installer, and an AppImage program to generate an AppImage for Linux.
For the natively-compiled code, I was compiling it by hand as needed, and then providing it to ANT in binary form to do my packaging.
As I'm adding more and more native code, I'm starting to want to be able to recompile the entire project on demand with my build script rather than having to manually do each module before starting ANT. It feels irresponsible to have an open source project where the build process is arcane.
My primary development system is Ubuntu 18.04. Prior to today, all of the build code was doable on that system. Now I've added the native launcher for windows, which is currently compiled with
cl.exe and targets 64-bit Windows. It's relatively simple code (~60 lines) with a single function,
WinMain, some basic library linking work and then handing things over to