top | item 46588243

Go-legacy-winxp: Compile Golang 1.24 code for Windows XP

137 points| Oxodao | 1 month ago |github.com

78 comments

order

OsrsNeedsf2P|1 month ago

There's a surprisingly large Windows XP community; everything from security patches to browsers[0] to third party Discord clients[1].

[0] https://www.mypal-browser.org/ [1] https://github.com/DiscordMessenger/dm

dataflow|1 month ago

What I don't understand is... why? I understand keeping alive software for the sake of hardware compatibility, but browsing the web and running Discord? Is it all really just to save a few hundred dollars over... 24 years?

userbinator|1 month ago

There's a Windows 9x community too, although maybe not as large.

deniska|1 month ago

If you ever wanted to use a modern C and C++ compiler on windows xp, 32 bit version of w64devkit[1] does target it and provides a recent gcc version.

[1] https://github.com/skeeto/w64devkit

archargelod|1 month ago

Coincidentally, just a few days ago, I tried to run Nim[0] on Windows XP as an experiment.

And to my surprise, the latest 32-bit release of Nim simply works out the box. But Nim compiles to C, so I also needed C compiler. Many versions of mingw I could find online - they all failed to launch.

After some time I managed to find very old Mingw (gcc 4.7.1) that have finally worked [1].

[0] - https://nim-lang.org/

[1] - https://ibb.co/TBdvZPVt

anthk|1 month ago

TCL/Tk 8.6 for XP, and as a bonus you get a gopher and gemini browser from gopher://hoi.st called BFG:

gopher://texto-plano.xyz:70/1/~anthk/bfgxp

Unzip the file and launch "lanzar.bat" in order to test it. I think I added tcllib and tklib just in case, so you can do a lot with that interpreter.

userbinator|1 month ago

From what I remember doing it several years ago, it was not too hard to patch MSVC 2019 to run on (not just generate binaries for) XP.

zoobab|1 month ago

I used CoLinux with pubuntu, and from there install GCC.

acuozzo|1 month ago

Anything for Win9x?

nasretdinov|1 month ago

I wonder if some of those things can be solved via a shim DLL that provides the necessary missing WinAPI functions instead of modifying the source code. Although the number of changes required seems vanishingly small anyway, so either approach coukd work just fine.

metaPushkin|1 month ago

Since hardware prices have skyrocketed, it is very important to run software on low-end hardware and use a suitable operating system, such as Windows 7, whose support, amusingly, has been dropped by nearly every project recently. Backporting software to Windows 7 is something we must do, for our freedom and our wallets.

hexagonwin|1 month ago

vxkex works really well, give it a try

FatCat1979|1 month ago

Literally just use linux. if you're fed dogshit, don't go back to dog vomit, use an actual operating system like an actual adult.

Going back to win7 is just a neurological pathogen level of stockholm syndrome. give your head a shake.

parhamn|1 month ago

> Added back 5ms sleep on Windows 7/8 in (*Process).Wait (reverted f0894a0)

This was interesting!

itopaloglu83|1 month ago

Strangely, AutoHotKey v1.1 scripts when compiled in ANSI mode runs perfectly on Windows XP.

AHK came in very handy we needed a quick tool to track mill operators, roughly 20-30 lines of code and we had a working GUI app.

larodi|1 month ago

What applications are base on this? I mean it sounds super charming and nostalgic to drop a line or two which runs on WinXP, but is this actually useful?

itopaloglu83|1 month ago

Mostly legacy industrial machines that need some additional software for telemetry, scheduling, automation etc.

These machines are likely to live at least another 10-15 years and even the brand new ones being sold today uses Windows 7.

Modern languages and frameworks proceed and leave these old systems behind, but everything from our infrastructure to manufacturing capacity that exists runs on legacy systems, not modern computers. The cost of replacing the computers is usually more than the machine itself.

Lord_Zero|1 month ago

Is it hard to write software that compiles and can run on windows XP now? What about like rust and python?

abbeyj|1 month ago

It depends on what you want. If you want to install an old copy of Visual Studio from 20 years ago then you should be able to write a program and compile it and have that work on XP. But that comes with limitations. You're not going to be able to use even C++11 and will be stuck with C++03, or maybe even C++98. If that's acceptable to you then it can work. But if you want to compile something that somebody else wrote or want to use some library that somebody else wrote, it probably won't work in that environment.

Or you could install and old copy of Cygwin or MinGW.

Do you want to run a modern Visual Studio and target XP? Maybe you can make that work if you install an old platform SDK and set WINVER and _WIN32_VERSION and work around all the warnings and compatibility problems that you'll run into. It is fighting an uphill battle and it will continue to get worse with each new version of VS that you want use.

For rust there is Rust9x https://seri.tools/blog/announcing-rust9x/. But I think this is the effort of handful of people. It is behind the upstream rust and it could go away at any time. If you want to write a toy program in Rust then it is fine, but if you want something that's going to be supported long-term you're rolling the dice.

Python 3.4.4 is the last version of Python that will run on Windows XP. That's 10 years old and many things on PyPI now require newer versions of Python so you'd be stuck with old, unsupported versions of those modules, possibly containing security issues.

godudewinxp|1 month ago

sadly doesn't work on winxp x86 - just tried. not a valid win32 application.