This isn't perfect as the compiled .so files use a mixture of /usr/lib
and /nix/store paths. It'd be nice if we could figure out how to make
them use /usr/lib paths only, such that it can be used to build the
natives for other distributions.
However, even though it isn't suitable for building releases, it does
allow us to test changes to the natives on NixOS.
The previous profile-based logic didn't work on Java 8 due to the
architecture-specific lib directories. It was also complicated by the
fact that nar.javaHome isn't set at profile activation time unless the
user manually specifies it with -D on the Maven command line.
This commit replaces it with an Ant task that runs during the
initialization phase. It finds the first (and probably only) jawt
library with glob matching, allowing us to search architecture-specific
lib directories.
If found, it strips the file name to get just the directory name and
sets openrs2.jawtProperty. If not found, it makes the build fail.
I haven't tested on 7 (and I'm not sure if the jawt shared lib files are
even in the correct place), so I think it's better to require the
version I've been testing on.
This is also consistent with the requirement for the main openrs2
project.
We need to enable all of the OS-specific profiles so the version numbers
of all the modules are bumped.
In turn this means we need to avoid calling the verify target during
release:prepare, as we can't build all the modules on any platform.
Similarly, we can't actually call the deploy target during
release:perform. We instead call `mvn -Prelease deploy` on each
supported operating system/architecture manually.
This is to make cross-compiling for i386 on amd64 easier, by adding
-m32/64 or -arch flags where appropriate.
This commit also adds a gcc linker on Linux and macOS, replacing the
default g++ linker. It's roughly equivalent, but means the shared
library has fewer dependencies (e.g. it doesn't link against libstdc++).
This commit clears framebuffers when they are created, copies the contents of
the previous framebuffer to the new framebuffer when resizing and moves all the
resizing code into the blit method. All of these help to reduce screen
corruption, although a small amount still remains if you resize quickly.