Dear GNU Pascal development team, I wonder if you could please answer a couple of quick questions for me. I have been using Borland TPW1.5 and have many thousands of line of Pascal code , some for the WinCrt unit but mainly have used WObjects,WinTypes, WinProcs,Strings & BWCC units in combination with OOP programming and resources defined in the resource workshop.
I will be switching to Linux before the end of the year and departing the Windows platform forever. GNU Pascal looks like it will be the perfect replacement for TPW1.5 and still mean I can retain the same(or similar) code.
If I compile my programs in GNU Pascal will they work directly (i.e does GNU Pascal convert all the calls to XWindows calls) or will they have to be run via the Linux filter Wine ? The other possibility is how easy would it be to convert my current programs to Linux/Xwindows programs making use of your Linux libraries ?
Thankyou for your help, I have only found out about GNU Pascal today and am very pleased that someone is producing such a language & compiler.
Best Regards Kevin Rees
Hello, Kevin!
If I compile my programs in GNU Pascal will they work directly (i.e does GNU Pascal convert all the calls to XWindows calls) or will they have to be run via the Linux filter Wine ?
As far as WinCRT and Strings are concerned, they will work directly. For the other TPW 1.5 units we do not have replacements yet. (Help welcome.)
If you call the WinAPI directly, your program can be run under Linux using the Wine library.
The other possibility is how easy would it be to convert my current programs to Linux/Xwindows programs making use of your Linux libraries ?
You can use any library written for GNU C just by translating some header files into Pascal. The GPC FAQ list (http://home.pages.de/~GNU-Pascal/gpc-faq.html) explains how to do that. Furthermore, our standard units can serve as examples.
Thankyou for your help, I have only found out about GNU Pascal today and am very pleased that someone is producing such a language & compiler.
:-) I hope that you won't be disappointed ...
Greetings,
Peter
Peter Gerwinski wrote;
Hello, Kevin!
If I compile my programs in GNU Pascal will they work directly (i.e does GNU Pascal convert all the calls to XWindows calls) or will they have to be run via the Linux filter Wine ?
As far as WinCRT and Strings are concerned, they will work directly. For the other TPW 1.5 units we do not have replacements yet. (Help welcome.)
Strings will work directly. WinCRT will probably not. WinCRT is not a direct port of the Dos "crt" unit (although there are several compatible routines such as Readkey, GotoXY, etc), but is rather a wrapper around several WinAPI calls to produce a standard Windows window - but one that can process Readln/Writeln/Readkey calls, etc. So you might need to use the Wine library for the WinCRT stuff.
If you call the WinAPI directly, your program can be run under Linux using the Wine library.
You would need to do this for WinCRT - unless of course you are prepared to replace all references to 'WinCRT' with references to 'CRT' - but this would not result in an X application - is this correct, Peter?
The other possibility is how easy would it be to convert my current programs to Linux/Xwindows programs making use of your Linux libraries ?
You can use any library written for GNU C just by translating some header files into Pascal. The GPC FAQ list (http://home.pages.de/~GNU-Pascal/gpc-faq.html) explains how to do that. Furthermore, our standard units can serve as examples.
There is another problem inherent in Kevin's question. TPW 1.5 uses OWL (the Object Windows Library). We do not yet have a GPC port of OWL. I do not think that it will be a trivial task to port OWL to GPC since OWL is so tightly bound to the 16-bit Windows environment. I am sure that it can be done - but it will probably have to make extensive use of Wine. The first step of course to having a GPC port of OWL is to have a working port of the OBJECTS unit. This is being looked into - its release is not imminent.
Best regards, The Chief -------- Dr. Abimbola A. Olowofoyeku (The African Chief) Email: laa12@keele.ac.uk Homepage: http://ourworld.compuserve.com/homepages/African_Chief/ Author of: Chief's Installer Pro v5.00 for Win32 ftp://ftp.simtel.net/pub/simtelnet/win95/install/chief500.zip
The African Chief wrote:
[...] WinCRT is not a direct port of the Dos "crt" unit (although there are several compatible routines such as Readkey, GotoXY, etc), but is rather a wrapper around several WinAPI calls to produce a standard Windows window - but one that can process Readln/Writeln/Readkey calls, etc. [...]
Unless I am missing something, the same holds for the X11 version of our CRT unit (replacing "WinAPI" with "X11 API", encapsulated in some `*curses' library). So `uses CRT' with GPC should give the desired result.
You would need to do this for WinCRT - unless of course you are prepared to replace all references to 'WinCRT' with references to 'CRT'
This would of course be necessary (unless one copies `crt.pas' to `wincrt.pas' and changes the name of the unit).
- but this would not result in an X application - is this
correct, Peter?
If you follow the instructions in `crt.pas' you can produce an X11 application as well as a console application (that will of course run under X11 without any restrictions) - just at your option.
(However I noticed some problems with the window not being selectable under X11. Somebody knows what happens there?)
Greetings,
Peter