MrGlockenspiel / activate-linux

The "Activate Windows" watermark ported to Linux
GNU General Public License v3.0
4.52k stars 94 forks source link

Does not build on FreeBSD #186

Open 99kaits opened 1 year ago

99kaits commented 1 year ago
Warning: Using /home/lain/src/activate-linux/obj as object directory instead of canonical /usr/obj/home/lain/src/activate-linux
cc  -I/usr/local/include -L/usr/local/lib -lconfig   -fPIE -g -gz=zlib -MD  -MF.depend.activate_linux.o -MTactivate_linux.o -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/16/include -fstack-protector-strong    -Qunused-arguments    -c /home/lain/src/activate-linux/src/activate_linux.c -o activate_linux.o
/home/lain/src/activate-linux/src/activate_linux.c:23:4: error: "One of Wayland, X11 or GDI backend must be enabled."
  #error "One of Wayland, X11 or GDI backend must be enabled."
   ^
1 error generated.
*** Error code 1

Stop.
make: stopped in /home/lain/src/activate-linux

The BSD makefile is currently nonfunctional and the GNU one doesn't work on FreeBSD either for some unknown reason to me as I do not understand anything about GNU makefiles I tried to fix the BSD makefile but all that got me was linker errors so I gave up, I'm just not knowledgeable enough with makefiles to fix this

MrGlockenspiel commented 1 year ago

I don't know enough about BSD make to fix it myself lol, but I can try to help you fix it

For the backend error, you need to enable one or multiple of the backend variables for X11 or wayland with -DX11 or -DWAYLAND Also, for each of those backends they have their own dependencies which you can see here. It uses pkg-config to generate the CFLAGS for the library names.

If you do manage to fix, please feel free to PR it

MrGlockenspiel commented 1 year ago

ok, i've been trying for a couple hours now to fix this and have barely gotten anywhere. seriously considering switching build systems entirely as this project has clearly outgrown Make, the GNU makefile is barely comprehensible and i cant port it 1:1 to the BSD makefile because of the .cgen sorcery going on

MrGlockenspiel commented 1 year ago

alright, ive added basic support for Xmake which should work on BSD variants