weisJ/darklaf

Support for platforms different than windows.

weisJ opened this issue · 17 comments

weisJ commented

Currently only windows is fully supported. Without having access specifically to a macOS machine the finer details need to be adjusted for each platform.
Specifically custom window decorations currently are only tailored to suit the windows platform.
The plan is to provide custom decorations for most of the major platforms.

Sent from PPHub

What's the state of Linux support? Do you need somebody looking into that as well?

weisJ commented

Yes I still need someone to look over the Linux related bits and pieces.
Especially supporting better titlebars would be something I’d like to aim for in future versions as this is a feature currently only working on Windows.
(Note that in the current version under certain screen scaling factors some elements may appear too big. That should be fixed in an upcoming version)

it would be great to have an overall overview of which features are broken on which platforms. Would allow people to easily contribute.

weisJ commented

Most features if broken will be broken on all platforms. Though Linux and macOS might have some scaling issues as I’m not using those too often. Most adjustments fall under the category of conforming to the platform standard for certain visual elements and behaviors. I will try to create a list of current things that are unfinished or don’t work at the moment during the week and create some issues for those.

Cool, thanks.

weisJ commented

I have put up a list with things that I'm currently aware of here. I'll add more things if they come up.

If you have any questions on how to tackle certain things regarding how the whole project works and what happens where feel free to ask. Sadly most things are rather ugly due to the hacky nature required by swing to circumvent the rather closed environment that is BasicLookAndFeel.

Cool, I'll see whether I'll be able to contribute to this project at work. Since we are currently looking to add a dark-mode to our software. Gotta see which priority this gets assigned :D

vlsi commented

macOS build fails as follows :(

> Configure project :
Building on OS: Mac OS X
Using JDK: /Library/Java/JavaVirtualMachines/adoptopenjdk-8-222.jdk/Contents/Home/jre

> Task :compileJniplatformX64SharedLibraryJniplatformCpp FAILED
/Users/vladimirsitnikov/Documents/work/darklaf/src/jniplatform/cpp/JNIDecorations.h:25:10: fatal error: 'windows.h' file not found
#include <windows.h>
         ^~~~~~~~~~~
1 error generated.

In file included from /Users/vladimirsitnikov/Documents/work/darklaf/src/jniplatform/cpp/com_github_weisj_darklaf_platform_windows_JNIDecorations.h:2:
/Library/Java/JavaVirtualMachines/adoptopenjdk-8-222.jdk/Contents/Home/include/jni.h:45:10: fatal error: 'jni_md.h' file not found
#include "jni_md.h"
         ^~~~~~~~~~
1 error generated.

In file included from /Users/vladimirsitnikov/Documents/work/darklaf/src/jniplatform/cpp/JNIDecorations.cpp:24:
/Users/vladimirsitnikov/Documents/work/darklaf/src/jniplatform/cpp/JNIDecorations.h:25:10: fatal error: 'windows.h' file not found
#include <windows.h>
         ^~~~~~~~~~~
1 error generated.


> Task :compileJniplatformX86SharedLibraryJniplatformCpp FAILED
/Users/vladimirsitnikov/Documents/work/darklaf/src/jniplatform/cpp/JNIDecorations.h:25:10: fatal error: 'windows.h' file not found
#include <windows.h>
         ^~~~~~~~~~~
1 error generated.

In file included from /Users/vladimirsitnikov/Documents/work/darklaf/src/jniplatform/cpp/com_github_weisj_darklaf_platform_windows_JNIDecorations.h:2:
/Library/Java/JavaVirtualMachines/adoptopenjdk-8-222.jdk/Contents/Home/include/jni.h:45:10: fatal error: 'jni_md.h' file not found
#include "jni_md.h"
         ^~~~~~~~~~
1 error generated.

In file included from /Users/vladimirsitnikov/Documents/work/darklaf/src/jniplatform/cpp/JNIDecorations.cpp:24:
/Users/vladimirsitnikov/Documents/work/darklaf/src/jniplatform/cpp/JNIDecorations.h:25:10: fatal error: 'windows.h' file not found
#include <windows.h>
         ^~~~~~~~~~~
1 error generated.
weisJ commented

As for now I have simply disabled the compilation of the native libraries as they are - at this point - only intended for windows anyway. (c8a8168)

weisJ commented

If #32 has been implemented compilation of native binaries needs to be made more flexible.

vlsi commented

I suggest that platform-tailored native binaries should come to their own projects.
WDYT?

weisJ commented

This seems like a good idea, especially because implementations very between each platform.

vlsi commented

Well, the next question is "how should it be released".
For instance, I doubt one can compile macOS-specific code using Windows, and one can't compile Windows-specific code in macOS.

That means platform-specific modules have to be built on different machines.

weisJ commented

I was thinking about the very same thing and apparently one can share resources between tasks on different machines with github actions. So one could only compile the platform specific code on the relative platform which then gets bundled when building the binaries.

vlsi commented

That is true. However, GitHub Actions does not support FreeBSD yet.

weisJ commented

If this is an real issue really depends on how likely someone contributes platform specific code for FreeBSD. If necessary one could include these libraries manually to the resulting jar (or hope that FreeBSD gets added to actions in the future).

It seems as there might be an option to cross compile from Linux to FreeBSD. Not sure if possible through actions though.

weisJ commented

I guess this issue isn't quite up to date anymore. Any further enhancements should have their own issue, so I'm closing this.