Reputation: 1587
I have a legacy FoxPro 2.6 application and I would like to compile it using a newer FoxPro version so I can run it on Windows 7 x64 systems (through x32 compatibility) and distribute it commercially. Is there any way of doing this in a legal way without buying the 500$ + license?
I'm just talking about compiling it, as the development was done on a licensed FoxPro 2.6...
Thanks!
Upvotes: 0
Views: 4052
Reputation: 551
You cannot compile a FoxPro DOS application with any version of Visual FoxPro (the latest would be VFP 9) without making code changes. Otherwise you will run into several issues:
Visual FoxPro lets users resize the window whereas DOS applications are usually designed for a fixed width and length (80x25 or 80x55 typically). When you make a VFP window smaller and then enlarge it again, anything printed on the screen in the area that was temporarily hidden is erased.
Functions like SCOLS(), SROWS(), WCOLS(), and WROWS() return fractional values. In DOS they only return integer values.
The default font in Visual FoxPro is a proportional font and now a mono-spaced font.
A number of commonly used commands are not working like SET BLINK or SAVE SCREEN.
FoxPro DOS applications use special graphic characters like single and double lines to draw dialogs. These characters are not available in Windows. There is a font called FoxFont which includes some of those, but this font doesn't work with different code pages and is also a pixel based font rather than a TTF.
FoxPro DOS uses a different code page than Windows. This renders code unusable where you compare with a specific binary value with a character in code. If your tables do not have a code page then you will see wrong data on the screen for any character that has a different ANSI code. If your tables do have a code page then you will trash your binary data.
DOS application use TLB and BIN libraries instead of FLLs. Any third party tool needs to be replaced.
A lot of @... commands do not work in Visual FoxPro 9 anymore. Cursors disappear, random text is cleared. This is because internally the controls that FoxPro DOS used are matched to VFP controls in a special compatibility mode.
There was no message loop in DOS. Therefore code might loop in order to wait for input. This works in DOS, but will cause your Visual FoxPro application to run at 100% CPU usage and become unresponsive.
The printer operates differently in Windows. Using the same printer settings as in FoxPro DOS will result in different output or no output at all. Several system variables that control printing in DOS do not work at all in Visual FoxPro.
Switching from FoxPro DOS requires a significant rewrite to run in Visual FoxPro depending on the complexity of your application.
Upvotes: 0
Reputation: 501
Well we still run FoxPro 2.6 Dos on 64Bit windows system this is how we do it
For running under Windows 32 bit
Upvotes: 1
Reputation: 41
Yes as answered by Alan, FoxPro Legacy is 16 Bit application which cannot be directly run under any 64 bit OS. One of the option is to compile it using the Create Standalone Executable option under FoxPro 2.6 (if you have the compiler). Then distribute this executable to clients, who can use vDos to run the executable. If your program also needs to print, then you should use DosBox, which also has support for printing.
While executing the program for first time it may not execute. You have to right click on the top left corner of Dos window, Right Click for properties and Enable Legacy Console and then restart the application.
Upvotes: 1
Reputation: 230
Another way is this. You can still run it on 64-bit platform.
This is confirmed, i recently run a Borland C++ 3.0 using this method.
Upvotes: 1
Reputation: 4288
As you say if it was FoxPro for DOS or FoxPro For Windows, then they are 16-bit and will not run on a 64-bit OS, nor will any other 16-bit executable for that matter.
If you want to migrate it to Visual FoxPro then you need a legitimate copy of that. Maybe you have it via MSDN or something already.
Even if you have Visual FoxPro, it's not necessarily a case of just recompiling it either, depending on the complexity involved. There are other threads that deal with this topic.
You could run it in 'XP Mode' on Windows 7, which is effectively an XP virtual machine, or if it actually is FoxPro for DOS (not FoxPro for Windows) then you can also run it in DosBox successfully, but might encounter problems printing.
Upvotes: 4
Reputation: 3937
No, you'll need a copy of Visual FoxPro. But you'll need it anyway because you'll have to make at least a few code changes to make it look acceptable. At a minimum, you'll need:
_SCREEN.Themes = .F.
at the very top of the code.
Upvotes: 4