Back when I wrote some small apps, it was very easy to target Mac with the GNUstep makefile package. That could build on Mac without any extra work on the build side. I would sprinkle a lot with #ifdef __APPLE__ when the APIs differ, on a case by case basis. A lot of things (most?) work on both without modification, it just depends how new the API is.
Building for both GNUstep and macOS is difficult. The problem is, macOS wants you to use Xcode and GNUstep wants you to use their weird build system. In order to build software that is compatible with both GNUstep and macOS you will either need need to have two parallel build systems (one GNUmakefile and one Xcode project) or use a custom build system.
Personally I think GNUstep's build system is stupid, and I don't like using Xcode, so I lean more towards a custom build system. Sounds insane I know but it really isn't that bad. Compiling and running a Cocoa application on macOS pretty much boils down to this:
clang main.m -framework Cocoa
./a.out
I don't remember how to do it for GNUstep. It's been a few years. Their GNUmakefile thing is REALLY weird, they have all these Makefile macros you need to import and they try to abstract all of this stuff away. Using Makefile macros. It's horrible. I asked ChatGPT and it generated this: include $(GNUSTEP_MAKEFILES)/common.make
APP_NAME = YourAppName
YourAppName_OBJC_FILES = main.m YourAppClass.m
YourAppName_RESOURCE_FILES = Info-gnustep.plist
include $(GNUSTEP_MAKEFILES)/application.make
I would make a basic GNUmakefile, then run it with `V=1` (or `VERBOSE=1`? i forgot the name of the environment variable) to get the actual terminal commands its running, extract those, put those in your one-liner custom build script and be done with ithttps://github.com/gnustep/libs-xcode
MPWFoundation, Objective-S and related all build on both macOS and GNUstep without buildtool. Once you have the GNUmakefiles they are not that hard to keep in sync.
https://gitlab.com/mpwmo/ObjectiveSmalltalk/-/blob/master/GN...
https://gitlab.com/mpwmo/MPWFoundation/-/blob/master/GNUmake...
https://gitlab.com/mpwmo/MPWFoundation/-/tree/master/GNUstep...
But I was looking for both things. Is there a tool to warn against partial or not implemented functionality that needs to be avoided?
Works perfectly fine, and I don't see how some external tool attempting to give a guess at this would be easier, never mind as accurate.
I'm the developer of PikoPixel, a cross-platform Mac/Linux/BSD pixel-art editor.
PikoPixel was initially written for Mac, and GNUstep saved me a huge amount of work from having to completely rewrite it for Linux/BSD.
However, it was still a significant effort:
* GNUstep's an implementation of the Cocoa framework only, it doesn't include any other macOS frameworks.* The same source-code & UI resources can produce different behaviors & visuals between the different platforms. This is due to different Cocoa implementations, some missing functionality on GNUstep, different system fonts, different window managers & desktop environments (Linux/BSD have many of them, each with their own quirks), etc.
A cross-platform Mac/GNUstep app is definitely doable - PikoPixel is now available in many Linux distro repositories (Ubuntu Studio even preinstalls it as a default graphics app) - but expect to spend significant effort correcting platform differences (depending on the app).
I'd suggest getting started by spinning up a VM, installing a GNUstep dev environment on it, then downloading some GNUstep app sources & building them.
PikoPixel's homepage links some build scripts for Debian & Fedora that will install both a GNUstep dev environment and PikoPixel:
https://twilightedge.com/mac/pikopixel/ You can also browse PikoPixel's sources online at the Debian GNUstep team's mirror repository:
https://salsa.debian.org/gnustep-team/pikopixel.app(Note: PikoPixel's fixes & workarounds for the platform differences on GNUstep are found in the various source files that begin with PPGNUstepGlue*).
This alone would be a nice standalone open source project that one could extend to offer more coverage.