I’ve succeeded (mostly) at cross-compiling Nonpareil for Windows using MinGW. I was pleasantly surprised at how little change to the code was required. There are a few minor issues to resolve.
The non-rectangular window (equivalent to X shape extension) seems to work, though the support I put in for dragging the window with the mouse does not. The window is the shape of the opaque part of the image, but the image itself is offset down somewhat, so the top of the window is the background color, and the bottom of the image is cut off. For now I’ll change the default mode of the Windows version to use a normal window with ornaments.
I’ll need a Windows installer. Ideally I’d like to be able to say something like “make windows” on my Linux system, and have a suitable Windows .EXE file pop out. I was somewhat worried that I might have to write my own installer, but it turns out that the Nullsoft installer NSIS can do what I want, and I was able to build it to run on Linux. I had to use MinGW natively on Windows to build the portions of code that NSIS emits to run on the target system (the contents of the Source/exehead directory), but that only needs to be done once. It might even be possible to build that portion on Linux, but it relies on Windows-specific header files that are not normally available on Linux.
I’ve decided that the Windows verion will NOT be GPL’d. It will be proprietary, and I will sell it. The Linux version will remain GPL’d, and it’s possible that someone else could port it to Windows, but given how little interest there’s been in porting my calculator simulators to Windows in the past, I don’t expect that to happen. I’ll put together a no-charge crippleware/nagware demo that only supports a few models and periodically asks the user to purchase a license.
Of course, since the Linux version will still be Free Software, I will encourage customers to switch to Linux and NOT pay me, which would actually make me happier. However, I doubt many people will switch to Linux just to run Nonpareil.