Lazarus

Programming => Operating Systems => Windows => Topic started by: palacs on February 17, 2017, 12:37:02 pm

Title: Supporting Windows from 95 to 10
Post by: palacs on February 17, 2017, 12:37:02 pm
Hi,

I would like to develop an application that runs even on Windows 95 but gets on well with Windows 10 too.

What are my options? Is Windows 95 supported by FPC 3.0?

If not, what is the last version of FPC that supports Windows 95?

If LCL doesn't support these old platforms, it means no problem. I'm about to use some embedded widgetset like fpGUI (http://fpgui.sourceforge.net/).
Title: Re: Supporting Windows from 95 to 10
Post by: Thaddy on February 17, 2017, 12:42:11 pm
No. Windows 95 is not supported by fpc 2.6+. Minimum is XP.
But you can still download fpc 2.6.2 which still - somewhat - supports win95.
There is no support available for it, though, and you should not file bug reports against such old versions: they won't ever, never, be fixed.
Title: Re: Supporting Windows from 95 to 10
Post by: palacs on February 17, 2017, 12:47:48 pm
Sad to hear that. Aren't there workarounds for the latest compiler?

I don't really understand why a compiler can't support Windows 95 while supporting OS/2 and DOS.
Title: Re: Supporting Windows from 95 to 10
Post by: Handoko on February 17, 2017, 12:58:01 pm
I don't really understand why a compiler can't support Windows 95 while supporting OS/2 and DOS.

Read here for more info:
http://forum.lazarus.freepascal.org/index.php/topic,30677.0.html
Title: Re: Supporting Windows from 95 to 10
Post by: palacs on February 17, 2017, 01:34:30 pm
Thank you for the link Handoko.

So then which is the latest FPC version (that is intended) to support Windows 95?
Title: Re: Supporting Windows from 95 to 10
Post by: marcov on February 17, 2017, 01:45:40 pm
Thank you for the link Handoko.

So then which is the latest FPC version (that is intended) to support Windows 95?

Officially 2.4.4, but in practice 2.6.2 should be fine, and even 2.6.4 might work except for some minor gotchas. None of them are still officially supported anyway.
Title: Re: Supporting Windows from 95 to 10
Post by: skalogryz on February 17, 2017, 02:48:52 pm
Officially 2.4.4, but in practice 2.6.2 should be fine, and even 2.6.4 might work except for some minor gotchas. None of them are still officially supported anyway.
One could add "winany" OS-target RTL for FPC.
The RTL could resolve available WinAPI routines in run-time (rather than load-time) and make a program all windows versions compatible :)

The compiler still generates binaries that are valid for any windows family OS, so the only compatibility issue is with RTL.
Title: Re: Supporting Windows from 95 to 10
Post by: palacs on February 17, 2017, 02:53:17 pm
I'm just wondering about the probability of running into a compiler bug and the worst thing to happen if I really do?

What types of gotchas are waiting for me if I keep using 2.6.4 or 2.4.4?
Title: Re: Supporting Windows from 95 to 10
Post by: palacs on February 17, 2017, 02:55:11 pm
Officially 2.4.4, but in practice 2.6.2 should be fine, and even 2.6.4 might work except for some minor gotchas. None of them are still officially supported anyway.
One could add "winany" OS-target RTL for FPC.
The RTL could resolve available WinAPI routines in run-time (rather than load-time) and make a program all windows versions compatible :)

The compiler still generates binaries that are valid for any windows family OS, so the only compatibility issue is with RTL.

Not a bad idea but wouldn't it decrease runtime performance? Native FPC programs - that use only the RTL and no external libs - are really fast, even on old computers. I'm just curious.
Title: Re: Supporting Windows from 95 to 10
Post by: sky_khan on February 17, 2017, 03:10:00 pm
Not a bad idea but wouldn't it decrease runtime performance? Native FPC programs - that use only the RTL and no external libs - are really fast, even on old computers. I'm just curious.

I guess it may add some milliseconds to startup of program but it would be same afterwards. But it is huge work to write such a unit. Not sure if it worths
Title: Re: Supporting Windows from 95 to 10
Post by: skalogryz on February 17, 2017, 03:24:53 pm
I guess it may add some milliseconds to startup of program but it would be same afterwards. But it is huge work to write such a unit. Not sure if it worths
It did worth back in 2007... or even 2005. I worked on such "rtl" for a closed-source project based on Delphi 7.
But back in the days, there more desktops with Win9x installed (Win98 on WinME).
They're becoming more rare these days.
Title: Re: Supporting Windows from 95 to 10
Post by: Thaddy on February 17, 2017, 04:15:49 pm
Sad to hear that. Aren't there workarounds for the latest compiler?
I don't really understand why a compiler can't support Windows 95 while supporting OS/2 and DOS.
Well, there's no maintainer for it. If someone steps in, it will be supported again. Simple as that.
Note that this shouldn't score very high on the fpc developers difficulty scale at this moment in time as far as the RTL is concerned.
But the labor is tedious if you want to do it properly. (New Windows API's should be excluded for the target, etc)
The compiler itself is a different matter.  There there are possibly a good many breaking changes.
Title: Re: Supporting Windows from 95 to 10
Post by: Bart on February 17, 2017, 04:43:36 pm
Well, there's no maintainer for it. If someone steps in, it will be supported again. Simple as that.

I was the one and only maintainer for Win9x for Lazarus.
In the end it just wasn't worth it anymore and now we almost completely stripped all Win9x code (AnsiString API calls) from Lazarus and rely fully on WideString API.
This inevitably will fail in Win9x.

Also, basic string comparison will fail (making LCL useless) with Win9x unless you use an fpc that includes the win9xwsmanager unit.

Bart
Title: Re: Supporting Windows from 95 to 10
Post by: marcov on February 17, 2017, 04:44:37 pm
Well, there's no maintainer for it.

And it should be a separate target that holds its own belt up. One of the reasons why win9x was dumped was that nobody submitted any fixes till the release was branched and frozen and they wanted to get last minute fixes in, even if said fix had been in the "fixes" and/or "trunk" branches for 6 months (and even longer in trunk)

With the number of -W calls rising this kind of trouble was expect to rise even more (since there was no test data from "then" trunk).
Title: Re: Supporting Windows from 95 to 10
Post by: Akira1364 on February 19, 2017, 05:56:13 am
I find it hard to believe that anyone is using Windows 9x anymore, for anything. What could the possible use case be?
Title: Re: Supporting Windows from 95 to 10
Post by: Thaddy on February 19, 2017, 09:06:21 am
I find it hard to believe that anyone is using Windows 9x anymore, for anything. What could the possible use case be?
Pinball? Or Hover?  ::)

In general people still use it because of legacy software that hasn't been ported. Or because it is their only legal license..

Oh, I see that Hover has been ported https://en.wikipedia.org/wiki/Hover!  8-)
Title: Re: Supporting Windows from 95 to 10
Post by: minesadorada on February 19, 2017, 09:37:41 am
I find it hard to believe that anyone is using Windows 9x anymore, for anything. What could the possible use case be?
I run a golf society, and use a very old laptop with 512K RAM (which was donated) to calculate the scores 'onsite' at the end of competitions.  I would love to install something like Puppy Linux on it, but the scoring software is windows-only/MS Access, so it runs Windows 95 s.l.o.w.l.y. but adequately.

It also runs a couple of apps I wrote in Laz to allocate prize money and calculate new EGA handicaps.
Title: Re: Supporting Windows from 95 to 10
Post by: jacmoe on February 19, 2017, 09:45:20 am
That's not a problem because you can keep using a version of FPC/Lazarus that does support win9x.

I just downloaded and ran a program that was compiled 7 years ago - cross compile for Linux 64 bit.
That is really impressive!
So you should be able to support that old machine until it dies, using an older Lazarus/FPC.
Title: Re: Supporting Windows from 95 to 10
Post by: Thaddy on February 19, 2017, 10:34:31 am
That's also the recommended solution. Old machines with an old OS need old compilers and old libraries. 2.6.2 and unofficially 2.6.4.
Title: Re: Supporting Windows from 95 to 10
Post by: Akira1364 on February 19, 2017, 06:48:01 pm
I find it hard to believe that anyone is using Windows 9x anymore, for anything. What could the possible use case be?
I run a golf society, and use a very old laptop with 512K RAM (which was donated) to calculate the scores 'onsite' at the end of competitions.  I would love to install something like Puppy Linux on it, but the scoring software is windows-only/MS Access, so it runs Windows 95 s.l.o.w.l.y. but adequately.

It also runs a couple of apps I wrote in Laz to allocate prize money and calculate new EGA handicaps.

Is the software impossible to port/unavailable for higher Windows versions, then?
Title: Re: Supporting Windows from 95 to 10
Post by: Handoko on February 19, 2017, 06:58:41 pm
Maybe the problem is the hardware. Laptop with 512K RAM is a very very very very old machine. Lucky for it, Win95 minimum requirement is 4MB.
Title: Re: Supporting Windows from 95 to 10
Post by: Cyrax on February 19, 2017, 07:05:37 pm
I think that is 512 MB instead of KB...

I highly doubt that there were laptops with KB memory sticks installed.
Title: Re: Supporting Windows from 95 to 10
Post by: Akira1364 on February 19, 2017, 07:14:08 pm
I think that is 512 MB instead of KB...

I highly doubt that there were laptops with KB memory sticks installed.

There definitely wasn't, considering that even Windows 3.1 needed at least 2MB!
Title: Re: Supporting Windows from 95 to 10
Post by: molly on February 19, 2017, 09:57:39 pm
Is the software impossible to port/unavailable for higher Windows versions, then?
No idea how i would put my isa card into a pcie slot let alone that the legacy hardware manufacturer (read: non existing anymore) has drivers for ... let's say windows 10.
Title: Re: Supporting Windows from 95 to 10
Post by: Akira1364 on February 20, 2017, 12:50:21 am
Is the software impossible to port/unavailable for higher Windows versions, then?
No idea how i would put my isa card into a pcie slot let alone that the legacy hardware manufacturer (read: non existing anymore) has drivers for ... let's say windows 10.

That's a fair point. I just didn't think that there was that much "mission critical" legacy software developed specifically for the (not very stable) vanilla Windows 9X series. Most of the custom stuff I dealt with back in the day was running on NT, and later on 2000/e.t.c...

Also, on a broader note: I wasn't suggesting minesadorada try to run a newer Windows version on that laptop itself... but if the software he's using could run on a higher Windows version, why not just have a raffle or fundraiser or something at the golf society to raise money for a new laptop?
Title: Re: Supporting Windows from 95 to 10
Post by: molly on February 20, 2017, 07:13:16 am
That's a fair point. I just didn't think that there was that much "mission critical" legacy software developed specifically for the (not very stable) vanilla Windows 9X series. Most of the custom stuff I dealt with back in the day was running on NT, and later on 2000/e.t.c...
Well you have a fair point in that it shouldn't. But, i think you also know how things work in practice. Some things simply turn into dust until the day someone realizes it has actually become mission critical so that budgets can be found to do something about it.

There are quite some companies that never went the NT road, mostly for budget reasons and/or unfamiliarity with nt.

Quote
Also, on a broader note: I wasn't suggesting minesadorada try to run a newer Windows version on that laptop itself... but if the software he's using could run on a higher Windows version, why not just have a raffle or fundraiser or something at the golf society to raise money for a new laptop?
Yes sorry that is my bad. I actually wanted to respond on your initial statement: "I find it hard to believe that anyone is using Windows 9x anymore, for anything. What could the possible use case be?" but got mixed up with quoting.

As long as things are software only it should usually be fairly easy to port unless there is some real stupid things going on inside the code.
Title: Re: Supporting Windows from 95 to 10
Post by: Thaddy on February 20, 2017, 07:20:40 am
unless there is some real stupid things going on inside the code.
Loads of it. Even by WIN95 itself. It's called 16 bit thunking... :D That kind of code is often impossibly - financially prohibitively - hard to port by lack of a 16 bit sub-system.
Title: Re: Supporting Windows from 95 to 10
Post by: molly on February 20, 2017, 07:22:18 am
unless there is some real stupid things going on inside the code.
Loads of it. Even by WIN95 itself. It's called 16 bit thunking... :D
Exactly   ;D

Besides that if you really have legacy software (only) that needs to run you could also opt for an emulator or virtual machine on newer and faster hardware. dosbox for example is perfectly capable of running win95.

I have no idea how that relates to the issue mentioned but just mention it just in case  :)
Title: Re: Supporting Windows from 95 to 10
Post by: Thaddy on February 20, 2017, 07:35:02 am
In the case of the golf society I would up the price of the Chardonnay. :o
Title: Re: Supporting Windows from 95 to 10
Post by: Remy Lebeau on February 22, 2017, 04:01:39 am
In the end it just wasn't worth it anymore and now we almost completely stripped all Win9x code (AnsiString API calls) from Lazarus and rely fully on WideString API.
This inevitably will fail in Win9x.

Some of that is mitigated by installing the Microsoft Layer for Unicode on Windows 95, 98, and Me (MSLU) library (https://blogs.msdn.microsoft.com/mirapark/2007/02/08/microsoft-layer-for-unicode-on-windows-95-98-and-me/).
Title: Re: Supporting Windows from 95 to 10
Post by: Bart on February 22, 2017, 01:51:06 pm
In the end it just wasn't worth it anymore and now we almost completely stripped all Win9x code (AnsiString API calls) from Lazarus and rely fully on WideString API.
This inevitably will fail in Win9x.

Some of that is mitigated by installing the Microsoft Layer for Unicode on Windows 95, 98, and Me (MSLU) library (https://blogs.msdn.microsoft.com/mirapark/2007/02/08/microsoft-layer-for-unicode-on-windows-95-98-and-me/).

You miss the point.
It was just too much of a hassle to maintain the win9x code and it made developing new features difficult, because none of the developers would even notice that they had broken the win9x part.
E.g. some of the code that interfaces with the debugger only works on NT based OS. So you already need a define to build a partially crippled IDE for win9x.
Notice that I was (and still am) the only developer that has a win9x machine. I used to have a native WinME machine, but that one does not exist anymore, so I have a Win98SE virtual machine now, which will crash randomly. Even installing the compiler on that is a PITA since the fpc installer is NT based. Once we move to Lazarus 1.8 I will kill that VM, because at that time all support for win9x is dropped (see "Phasing out support for Windows 98 and Windows ME" (http://forum.lazarus.freepascal.org/index.php/topic,30677.0.html)).

If there would be a community that would actively contribute to a win9x widgetset, then it could be done, but the demand for this seems to be negligible.
We should however IMO not start mixing win9x code into the current win32 widgetset again.

Bart
Title: Re: Supporting Windows from 95 to 10
Post by: marcov on February 22, 2017, 01:56:49 pm
Some of that is mitigated by installing the Microsoft Layer for Unicode on Windows 95, 98, and Me (MSLU) library (https://blogs.msdn.microsoft.com/mirapark/2007/02/08/microsoft-layer-for-unicode-on-windows-95-98-and-me/).

Often suggested, few practical reports. A lot is possible, nothing was done, the problem is a manpower one, not a technical one, as Bart already said.

A lot of people like to cross off that item (since saying no to a customer or user is always hard), but nobody wants to work (and work continously) to make that happen and keep that (win9x) option open.

Note this managerial defect has been that way for the better part of 10-12 years, iow since Windows XP came out.

Enough is enough.
Title: Re: Supporting Windows from 95 to 10
Post by: Thaddy on February 22, 2017, 02:29:27 pm
Note this managerial defect has been that way for the better part of 10-12 years, iow since Windows XP came out.
Enough is enough.

I had to re-read it to understand that Bart wasn't the managerial defect...  :D
But I think almost everybody agrees with you and Bart.
And there are pointers in place on which versions to use when museum pieces are required to be maintained.
Title: Re: Supporting Windows from 95 to 10
Post by: Bart on February 22, 2017, 02:57:21 pm
I had to re-read it to understand that Bart wasn't the managerial defect...  :D

ROFL

Bart
Title: Re: Supporting Windows from 95 to 10
Post by: marcov on February 22, 2017, 03:10:31 pm
I had to re-read it to understand that Bart wasn't the managerial defect...  :D

No, and neither were Tomas and Pierre who also have done a lot for win9x (and dos) over the years.

But again, all those efforts were usually around release time. Nobody tested trunk with win9x. It was not continuous.
Title: Re: Supporting Windows from 95 to 10
Post by: palacs on April 06, 2017, 04:28:06 pm
What about the NativeNT (http://wiki.lazarus.freepascal.org/Target_NativeNT) target via cross compilation?

As far as I get it from the wiki page, it could even run on NT 3.51, which means it would be fine on Windows 95 as well.

Anyone tried it?
Title: Re: Supporting Windows from 95 to 10
Post by: Thaddy on April 06, 2017, 04:35:34 pm
As far as I get it from the wiki page, it could even run on NT 3.51, which means it would be fine on Windows 95 as well.
No. It's is not fine. Even 3.51 has a complete 32/64 bit kernel and sub systems. Win95 hasn't. It is based on win32s, which is a bold on to 3.11.
Title: Re: Supporting Windows from 95 to 10
Post by: BobS on May 11, 2017, 09:35:24 am
It's tough to let those old ones go, what memories they bring, but you can see why it's not really worth the effort: https://en.wikipedia.org/wiki/Usage_share_of_operating_systems#/media/File:Operatingsystem_market_share.svg

Even good old XP is at 1.25% at the end of 2015 though it beats out Vista (which I liked).  Now not being able to read German I'm not sure how those stats were collected maybe based on what people were using when they hit a certain web site and so it probably underreports some of those old OSes a bit like the Win95 setups running machinery (and I've seen reports on CNC machines that still use/are stuck on Win95) that never use the internet, but then those people aren't too likely to want to use Lazarus anyway :).
Title: Re: Supporting Windows from 95 to 10
Post by: PatBayford on July 19, 2017, 05:34:23 am
I find it hard to believe that anyone is using Windows 9x anymore, for anything. What could the possible use case be?
Believe it or not, one of the major problems here is the success Microsoft had selling "embedded" versions of Windows, which can be found in equipment from cheap consumer items, up to million dollar plus medical scanners. These nearly all use ROM based operating systems, so upgrading the OS is all but impossible. Another big hand for the Redmond giant.
Title: Re: Supporting Windows from 95 to 10
Post by: PascalDragon on September 05, 2017, 11:11:34 pm
What about the NativeNT (http://wiki.lazarus.freepascal.org/Target_NativeNT) target via cross compilation?

As far as I get it from the wiki page, it could even run on NT 3.51, which means it would be fine on Windows 95 as well.

Anyone tried it?

The NativeNT target isn't for running Win32 applications, but applications directly above the NT kernel (e.g. the Windows subsystem itself is such an application, or the POSIX subsystem or the chkdsk variant that runs at startup) or drivers loaded by the kernel. So while it's true that applications developed for the target could potentially run on NT 3.51 (I've never tested it though) it's not helping you any further as they're a completely different kind of beast.

And those that want a small Windows system: why not give ReactOS (https://reactos.org/) a try? Considering it's based on the Windows Server 2003 API it's still supported by FPC. :)
Title: Re: Supporting Windows from 95 to 10
Post by: marcov on September 06, 2017, 07:07:22 am

And those that want a small Windows system: why not give ReactOS (https://reactos.org/) a try? Considering it's based on the Windows Server 2003 API it's still supported by FPC. :)

Hardware, drivers probably.
TinyPortal © 2005-2018