PureBasic 4.10 Beta 2 for Linux released

Developed or developing a new product in PureBasic? Tell the world about it.
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Well it inherently against the principles of Linux and Unix in general so, better not.
You could use a script though or one could integrate a console in the IDE...
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Well, it is actually Windows which is very weird in its handling of the console, not the other OS.
(You have to create a special "Console" exe if you want to run it from cmd.exe,
but then you always get a weird console window when running from GUI, which sucks)

The terminal on Linux is a separate program. Trying to hack something together
to automatically open one would create dependancies on the specific terminal
program in question which is very bad since there are tons of different ones out there.
Also this would mean that you cannot write console programs anymore that
can run without any GUI system because of the terminal dependancies.

For debugging from the IDE, you can select the "Console" executable type
in the Compiler Options. In this case the IDE will open a console for you
and run the program inside it. It will have no effect on created executables though.
quidquid Latine dictum sit altum videtur
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Is there some kind of GTK Terminal widgets, so there is an easy way to emped a terminal? Then one could simply let the program be it's own terminal so one has two exes and can use the program on servers as well.
Fred
Administrator
Administrator
Posts: 18178
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

May be you can redirect the stdout of your program and use a readonly editorgadget() to display it ?
Kazmirzak
User
User
Posts: 92
Joined: Fri Jun 18, 2004 5:44 pm
Location: Germany

Post by Kazmirzak »

actually, my code has always worked without even opening a console - it has always put all console-writings to the linux console (which is only open if the user started the program from there). Only problem is the compiler should never notice or he would righteous stop my code :-)

Still I think an option would be great : OpenConsole(showconsole)

where showconsole could be 0=show no console, 1=only in debug 2=always
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

simply redirect stdout of your program wherever you want.
For Linux a per-project target line ( especialyl for debugging ) could be handy.

aka:

#?pbcompiler myprog.pb >> /home/foo/mylog.txt

just from editor - basically a console redirect to any console or tty interface would work that way ( i just love pipe =)

Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
Post Reply