COPY/PASTE doesn't work in CYGWIN
sh: line 1: xclip: command not found
it looks like you need to use getclip and putclip from the "cygwin-utils" suite of utilities from cygwin, and modify CLIPBOARD-PASTE-STREAM etc. We need to establish a better way of determining host OS type?
I think we can modify the unix_getparm subr to provide more useful info for that.
compared to adding "open URL in browser" and "copy to clipboard" "paste from clipboard" into Maiko? under #ifdef for OSTYPE? it would make the result perhaps more portable? wsl vs. windows vs. macos vs netbsd vs linux etc.
unix_getparm() takes a string, by convention an uppercase symbol, and returns something - it could take, for example, "BROWSE", "CLIPBOARD-COPY", "CLIPBOARD-PASTE" etc. Except that for "BROWSE" you have no idea which browser the user wants based on the operating system you're compiling for - many of the browsers are available on many different OSs - Safari, Chrome, Firefox, Opera, Edge, ... and we have no idea what preference the user may have set in the operating system, or if there is a generic invocation for the "open a URL" operation (e.g., in macOS open ...) -- so that's a run-time choice not a compile-time choice.
We currently have
- "macOS"
- "Cygwin"
- "DragonFly BSD"
- "FreeBSD"
- "Linux"
- "NetBSD"
- "OpenBSD"
- "AmigaOS 3"
- "Solaris"
- "Windows"
- "Emscripten"
but, for example, Termux on Android looks like Linux as far as the compile goes, today, but doesn't behave like desktop Linux for things like copy/paste (as far as I know). We don't have Haiku in there yet, but that's easy. We don't distinguish between the Linux distros, or know whether the user is running w/ SDL, X11, Wayland, ... and what effect that has on the copy/paste/open operations.
Someone with the inclination could put together the list/matrix of possibilities.
I see what you mean.
how about we set up some get-param driven site-init that set things up for the environments we use.
Yes. First step is deciding what info we need from get-param -- I think we currently have "DISPLAY" which will return "X", "SDL", [or perhaps once in the past, "BUFFERED", or "DIRECT"]. It's easy to include the OS that we detected during compilation, though as I mentioned that won't get all the cases -- but when we find things that don't work we can see what additional dimensions we need to differentiate among them.
I suggest returning the value of MAIKO_OS_NAME (from maiko/inc/maiko/platform.h) for get_parm("OSNAME"), and the value of MAIKO_ARCH_NAME (same source) for get_parm("ARCH") -- but I'm happy to take other suggestions.