Linux Port help

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Linux Port help

Zaaphod
I'm a newbie trying to port an old turbo pascal program to FreePascal in
linux.   My reasons for doing this is old Pentium 233 motherboards are
getting harder to keep running and I need be running on more modern
hardware..  It's a massive program and I just don't have time to re-write
the whole thing, that's why freepascal seems like a good solution.  I have
it working fairly well on windows, but I'm trying to get away from windows,
and get it working on linux instead.   I've managed to get free pascal
installed on an Ubuntu x64 virtualbox VM and I can run the IDE, but I'm
having difficulty getting it to work.  I have several issues I just don't
know how to solve

1.  graph unit issues.    In my windows port I'm able to use graph unit, in
linux there is no graph unit in the x86_64-linux folder.  It does exist in
i386-linux, but I can't seem to compile my program for 386.  In the windows
version I have an option to use 80386, in linux I do not.   I have tried to
use the other graphic units found in graph under x86_64 linux.  I was able
to successfully compile with ptcgraph, but everything is blue, I figure it
is using more colors than my old 16, so I changed a few colors to larger
numbers and sure enough I can get other colors... so I could do global
searches and replaces to solve the color issue.. but I have other issues
with ptcgraph and/or linux.
If I try to use ggigraph, I cannot even compile it.  It says "Error while
linking" and it references the END. Line at the end of my main program.. I
don't know why, there is nothing wrong with that line and it compiles with
ptcgraph just fine.

2. I can't get my fonts to work with ptcgraph.  I was using the turbo pascal
graphic fonts, I was able to get them working in windows, but not in the
linux version.  I'm not sure if it's an issue with ptcgraph or linux or how
to even start to figure out the problem.

3. with ptcgraph, I have no control of the keyboard.   When I run from the
compiler, I must pop up the terminal window on top of my graphics window to
be able to use the keyboard, however if I try to run the compiled program on
it's own, I don't have a terminal window.. and I just have no control over
the program.. I have my graphic screen, but it ignores the keyboard, and I
can't do anything with it.  The windows version also has the Dos window, but
it allows it to remain behind the graphic window and my keyboard still
works.

4. not full screen.  For some reason I can't get it to be full screen in
linux at all.. Its always in a window.  The windows version is ALMOST full
screen, I would like to get rid of the windows bar across the top and make
it truly full screen.  I don't need a way to minimize it or to use any
windows controls, when I'm done with it I can just close it and be back in
windows.  

Any suggestions on how to either use the original 'graph' unit or how to
change to something else and retain functionality?  All I want to do is make
my program look and operate the way it did on DOS with turbo pascal.  I
don't want to redesign the entire thing.  The windows version is close but
as I mentioned I would love to get rid of the windows bar across the top of
the screen and make it truly full screen.





_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Graeme Geldenhuys-6
On 2016-07-22 20:59, James Richters wrote:
> 4. not full screen.  For some reason I can't get it to be full screen in
> linux at all..

Press F11. That is a almost universal shortcut for any X11 desktop
environment and Window Manager to switch the active program to full screen.

If you are running the program in a Console login (ie: no X11 running),
then in should be fullscreen as standard.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Zaaphod
Thank you for the F11 suggestion.. F11 does make the IDE window full screen,
Thanks!! That's very helpful.  My program however does not respond to F11.
There is no way to resize the window, make it larger or smaller or full
screen, it's just a fixed size window.. this is the version using ptcgraph

Is there a way to get the linux text mode IDE to colorize things like the
windows text mode IDE?  Linux is just all yellow on light blue. The windows
one for example will show comments in grey  reserved words in white.. ect..
it makes it a lot easier to follow

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Graeme
Geldenhuys
Sent: Friday, July 22, 2016 4:28 PM
To: [hidden email]
Subject: Re: [fpc-pascal] Linux Port help

On 2016-07-22 20:59, James Richters wrote:
> 4. not full screen.  For some reason I can't get it to be full screen
> in linux at all..

Press F11. That is a almost universal shortcut for any X11 desktop
environment and Window Manager to switch the active program to full screen.

If you are running the program in a Console login (ie: no X11 running), then
in should be fullscreen as standard.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Graeme Geldenhuys-6
On 2016-07-22 21:38, James Richters wrote:
> Linux is just all yellow on light blue. The windows
> one for example will show comments in grey  reserved words in white.. ect..
> it makes it a lot easier to follow

Are they the same versions of the IDE?  I don't really use the Text IDE,
but I can say that the FreeBSD version behaves like the Linux version
you describe.... the old Turbo Pascal IDE look and feel.

I've never tried the Text IDE under Windows.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Zaaphod
Yes, they are both 1.0.12 included with fpc 3.0.0   Here are screenshots:
https://github.com/Zaaphod/FPC-Parallel-Port/issues/1

I like the text ide because I understand it,  it's pretty much like the
Turbo Pascal ide.   I tried installing lazerus and I cannot even compile my
program with that... but it's not a windows program, it's a console
application, so that's probably why I couldn't get it to compile with
lazerus.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Graeme
Geldenhuys
Sent: Friday, July 22, 2016 6:18 PM
To: [hidden email]
Subject: Re: [fpc-pascal] Linux Port help

On 2016-07-22 21:38, James Richters wrote:
> Linux is just all yellow on light blue. The windows one for example
> will show comments in grey  reserved words in white.. ect..
> it makes it a lot easier to follow

Are they the same versions of the IDE?  I don't really use the Text IDE, but
I can say that the FreeBSD version behaves like the Linux version you
describe.... the old Turbo Pascal IDE look and feel.

I've never tried the Text IDE under Windows.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Graeme Geldenhuys-6
On 2016-07-22 23:33, James Richters wrote:
> Here are screenshots:
> https://github.com/Zaaphod/FPC-Parallel-Port/issues/1

I just checked. My FreeBSD version looks like the Windows screenshot.

Also under Linux, load the IDE, then go to Options -> Environment ->
Editor. Then under "Editor options" make sure "Syntax highlighting" is
checked. If I uncheck that and open a new *.pas file, then mine is all
blue and yellow text.

Something else to tweak. If you prefer the darker blue (Windows
screenshot) instead of the lighter blue (Linux screenshot). Those colors
are affected by your terminal program's console theme. eg: I use Mate
Terminal here. Go to Edit -> Profile Preferences -> Colours. Change the
Palette scheme to "Linux console" or "Rxvt". Those are my preferences.
Some Linux systems default that to "Tango" which are much lighter colours.


> I like the text ide because I understand it,  it's pretty much like the
> Turbo Pascal ide.

I fully understand. Sometimes I use the Text IDE too, to get rid of all
clutter and distractions seen so often in other IDE's or text editors.
But I forgot all the keyboard shortcuts, then I get frustrated with it,
and switch back to Lazarus or MSEide. MSEide is also a very nice,
flexible and super fast IDE. They can all handle console programs
without problems.

  MSEide
     https://sourceforge.net/projects/mseide-msegui/

You can download the IDE zip archive, unpack and run the binary. No need
for any installations.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Zaaphod
I checked and syntax highlight was already checked.. I did figure it out
though.. all my pascal files were named with a .PAS extension and I keep
forgetting that linux is extremely case sensitive with everything.. I saved
one with a .pas extention,  closed it then opened it and now that one file
has the highlight, the others do not.. easy enough to fix that though.

Thank you for the help and suggestions to tweak the colors!   I would have
never figured that out!  Nice I can customize it too.   I can't figure out
how to do that with windows.   I would like to get a black background
instead of blue.  

Thanks also for the suggestion of MSEIde  I will check it out!


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Graeme
Geldenhuys
Sent: Friday, July 22, 2016 7:41 PM
To: [hidden email]
Subject: Re: [fpc-pascal] Linux Port help

On 2016-07-22 23:33, James Richters wrote:
> Here are screenshots:
> https://github.com/Zaaphod/FPC-Parallel-Port/issues/1

I just checked. My FreeBSD version looks like the Windows screenshot.

Also under Linux, load the IDE, then go to Options -> Environment -> Editor.
Then under "Editor options" make sure "Syntax highlighting" is checked. If I
uncheck that and open a new *.pas file, then mine is all blue and yellow
text.

Something else to tweak. If you prefer the darker blue (Windows
screenshot) instead of the lighter blue (Linux screenshot). Those colors are
affected by your terminal program's console theme. eg: I use Mate Terminal
here. Go to Edit -> Profile Preferences -> Colours. Change the Palette
scheme to "Linux console" or "Rxvt". Those are my preferences.
Some Linux systems default that to "Tango" which are much lighter colours.


> I like the text ide because I understand it,  it's pretty much like
> the Turbo Pascal ide.

I fully understand. Sometimes I use the Text IDE too, to get rid of all
clutter and distractions seen so often in other IDE's or text editors.
But I forgot all the keyboard shortcuts, then I get frustrated with it, and
switch back to Lazarus or MSEide. MSEide is also a very nice, flexible and
super fast IDE. They can all handle console programs without problems.

  MSEide
     https://sourceforge.net/projects/mseide-msegui/

You can download the IDE zip archive, unpack and run the binary. No need for
any installations.

Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Graeme Geldenhuys-6
On 2016-07-23 01:15, James Richters wrote:
> forgetting that linux is extremely case sensitive with everything.. I saved
> one with a .pas extention,  closed it then opened it and now that one file
> has the highlight, the others do not.. easy enough to fix that though.

You can also tell Text IDE what file extensions are Pascal files. I saw
the setting somewhere under Options -> Environment I think.

But I would recommend you stick to all lowercase filenames.


> I can't figure out how to do that with windows.

You can't with the default console window. You need to download a 3rd
party console program. They tend to be MUCH better that the stock
console under Windows.



Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Sven Barth-2

Am 23.07.2016 02:40 schrieb "Graeme Geldenhuys" <[hidden email]>:
> > I can't figure out how to do that with windows.
>
> You can't with the default console window. You need to download a 3rd
> party console program. They tend to be MUCH better that the stock
> console under Windows.

Of course you can do that with the Windows consoles as well. You need to go to the settings of the console in the system menu (the one at the window icon) and there the setting for the colors is somewhere (I don't have it in front of me right now though).
Just google for "change default console background windows" or something like that...

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Linux Port help

Marco van de Voort
In reply to this post by Zaaphod
In our previous episode, James Richters said:

> On 2016-07-22 21:38, James Richters wrote:
> > Linux is just all yellow on light blue. The windows one for example
> > will show comments in grey  reserved words in white.. ect..
> > it makes it a lot easier to follow
>
> Are they the same versions of the IDE?  I don't really use the Text IDE, but
> I can say that the FreeBSD version behaves like the Linux version you
> describe.... the old Turbo Pascal IDE look and feel.
>
> I've never tried the Text IDE under Windows.

It's probably the chosen terminal emulator. On my LTS "Terminal" terminal
emulator, the IDE is also light blue, but in an xterm it is like Windows.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal