Simple TUI framework/RAD

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

Simple TUI framework/RAD

MihaiR
Hello,

Is there any simple TUI framework or RAD tool for Free Pascal?
I mean simpler than FV which is quite big for small console apps
with simple widgets (Linux console).

Thank you very much,
Mihai
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Simple TUI framework/RAD

Michael Van Canneyt


On Sat, 17 Dec 2005, Mihai wrote:

> Hello,
>
> Is there any simple TUI framework or RAD tool for Free Pascal?
> I mean simpler than FV which is quite big for small console apps
> with simple widgets (Linux console).

Try ocrt in packages/extra/ncurses.
It's object oriented, but much simpler than FV. It has some demo apps.
It's ncurses based so should work quite well.

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

Quake 2 for Freepascal

L505
Hi,
Does anyone have a copy of Quake 2?

I got Quake to compile with freepascal, but I don't have the quake game files.

I need it, in order to test the exe! Otherwise, the exe is useless.

So if anyone has a copy of Quake 2, maybe you will you test the FreePascal Quake port
for me?

All that needs to be done is you copy the freepascal quake exe into your already
existing quake directory...

--
L505
Possible ADD

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

Re: Quake 2 for Freepascal

Felipe Monteiro de Carvalho
On 12/18/05, L505 <[hidden email]> wrote:
> Hi,
> Does anyone have a copy of Quake 2?

Doesn´t the demonstration Quake 2 work?

This is the case for many games, like Doom for Pascal.

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
L-9
Reply | Threaded
Open this post in threaded view
|

Re: Quake 2 for Freepascal

L-9

> Doesn´t the demonstration Quake 2 work?
>
> This is the case for many games, like Doom for Pascal.

I need to test the latest patched Quake 2 v3.21, because the demo is older, v3.14 I
think.

The game runs on the demo, but it tells me I'm missing a Plaque - or something. So I
think this is in the 3.21 patch. Not sure - but this is what I read on a forum.

I have never played quake so I don't know how to interpret what a "plaque" is.

--
L505


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

Re: Quake 2 for Freepascal

Ron Weidner
In reply to this post by L505


--- L505 <[hidden email]> wrote:

>
> So if anyone has a copy of Quake 2, maybe you will
> you test the FreePascal Quake port
> for me?
>

I have Quake II.  That happens to be my favorite FPS.
Anyway send me the source code and the EXE and I'll
test it for you.

--
Ronald Weidner
http://www.techport80.com
PHP Software developer for hire.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Quake 2 for Freepascal

L505


>I have Quake II.  That happens to be my favorite FPS.
>Anyway send me the source code and the EXE and I'll
>test it for you.

I figured out that the demo should in fact work.. Felipe was right.
The delphi port of Quake2 works just fine with the demo Quake files.

I'm compiling basically exactly the same source code on the two compilers side by
side and the FPC one loads the game, but doesn't let you play the game when selected,
nor does it play the video intro, or display graphics perfectly in the menu areas.
Seems FPC always has graphics related issues for some reason when compiling Delphi
code - I've not had problems with FPC/Delphi compatability when working with text,
since I mainly work with text programs and not graphics.

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

Compiling library / Win32 DLL

chromdildo
Hallo list.

I'm having trouble with library/DLL under Win32 (exporting one function
and having a little GUI).
Compiles fine, but the host application can't load them. The Host is
closed source (think MSVC).

Same code compiles and runs fine with Delphi.

Can someone describe the main differences with building/linking
libraries under Delphi/freepascal.
I'm sure I'm missing some compiler/linker - switch.

Thank you very much
chrom

P.S. Merry Xmas and happy new year to all.

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

Re: Quake 2 for Freepascal

Jonas Maebe-2
In reply to this post by L505

On 29 Dec 2005, at 04:27, L505 wrote:

> Seems FPC always has graphics related issues for some reason when  
> compiling Delphi
> code - I've not had problems with FPC/Delphi compatability when  
> working with text,
> since I mainly work with text programs and not graphics.

There's no inherent difference between "graphics" and "text" code. It  
simply means that there is a bug somewhere, either in the code  
generator or in the Windows-related units.


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

Re: Compiling library / Win32 DLL

Иван Шихалев
In reply to this post by chromdildo
> Same code compiles and runs fine with Delphi.

May be a troubles with export names. It is needed to define export
names explicite in "exports" clause.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling library / Win32 DLL

Tony Pelton
In reply to this post by chromdildo
you are using FP or its IDE and _not_ lazarus ... right ?

i had some troubles with building a DLL with lazarus, where identical
code would build link under lazarus, and my windows application
wouldn't load it, and everything would work fine when i built it using
the FP compiler standalone.

likely a user error, but i was never able to figure it out.

my $0.02

Tony

On 12/29/05, chromdildo <[hidden email]> wrote:

> Hallo list.
>
> I'm having trouble with library/DLL under Win32 (exporting one function
> and having a little GUI).
> Compiles fine, but the host application can't load them. The Host is
> closed source (think MSVC).
>
> Same code compiles and runs fine with Delphi.
>
> Can someone describe the main differences with building/linking
> libraries under Delphi/freepascal.
> I'm sure I'm missing some compiler/linker - switch.
>
> Thank you very much
> chrom
>
> P.S. Merry Xmas and happy new year to all.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling library / Win32 DLL

chromdildo
Thanks for your reply.

Whats the difference, when compiling without Lazarus?
The library relys on the LCL (for GUI) and compiling from commandline
results in exactly the same (non working) dll.
Where can I learn more about the structures, calling conventions, etc
used by freepascal/Lazarus vs. Delphi?

Thanks again and best regards.
chrom


This code(-snippet) compiled with Delphi works perfect (from
www.tobybear.de (GPL))

[code]
{$J-,H+,T-P+,X+,B-,V-,O+,A+,W-,U-,R-,I-,Q-,D-,L-,Y-,C-}
library VstPlugin;
uses
  uPlugin in 'uPlugin.pas',
  uEditor in 'uEditor.pas' {PluginEditorWindow},
  DAEffect;
var Effect : APlugin;
    Oome   : Boolean;
function main(audioMaster: TAudioMasterCallbackFunc): PAEffect; cdecl;
export;
begin
 // get vst version
 if audioMaster(nil, audioMasterVersion, 0, 0, nil, 0) = 0 then
 begin
  Result := nil;
  Exit;
 end;
 Effect := APlugin.Create(audioMaster);
 if not Assigned(Effect) then
 begin
  Result := nil;
  Exit;
 end;
 if oome then
 begin
  Effect.Free;
  Result := nil;
  Exit;
 end;
 Result := Effect.Effect;
end;

exports
Main name 'main';

begin
end.
[/code]




Tony Pelton wrote:

>you are using FP or its IDE and _not_ lazarus ... right ?
>
>i had some troubles with building a DLL with lazarus, where identical
>code would build link under lazarus, and my windows application
>wouldn't load it, and everything would work fine when i built it using
>the FP compiler standalone.
>
>likely a user error, but i was never able to figure it out.
>
>my $0.02
>
>Tony
>
>On 12/29/05, chromdildo <[hidden email]> wrote:
>  
>
>>Hallo list.
>>
>>I'm having trouble with library/DLL under Win32 (exporting one function
>>and having a little GUI).
>>Compiles fine, but the host application can't load them. The Host is
>>closed source (think MSVC).
>>
>>Same code compiles and runs fine with Delphi.
>>
>>Can someone describe the main differences with building/linking
>>libraries under Delphi/freepascal.
>>I'm sure I'm missing some compiler/linker - switch.
>>
>>Thank you very much
>>chrom
>>
>>P.S. Merry Xmas and happy new year to all.
>>    
>>
>_______________________________________________
>fpc-pascal maillist  -  [hidden email]
>http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>  
>


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

Re: Compiling library / Win32 DLL

Tony Pelton
On 12/29/05, chromdildo <[hidden email]> wrote:
> Thanks for your reply.
>
> Whats the difference, when compiling without Lazarus?

i don't know.

i just wanted to mention it, in case it was relevant.

i had started doing development using the FP console IDE.

i then "discovered" Lazarus, and wanting to be able to use a GUI IDE,
i downloaded and installed it.

i then took the exact same code, compiled it, which produced a DLL for
me, and when i tried to get my hosting application to load it, it
complained, saying it wasn't a DLL.

i then loaded the FP IDE, recompiled the same code, and it went back to working.

i posted to the list, asking questions about my problem, but no one
seemed to know why i might be having the problem.

someone even sent me a "dll loader" tool to test whether my DLL would
load with their testing tool.

the DLL _did_ load with the tool, but the application i was using
still wouldn't deal with it, until i recompiled it with the FP console
IDE.

since then, i've just stayed with the console IDE/compiler and i
haven't had any issues.

just as another thought ... because i recently had a problem that
really messed me up for a couple of hours.

i had installed the newer 2.0.2 compiler, after having used the 2.0.1
compiler on my windows machine for a while.

i then loaded up some of my source, and went about doing more
development on 2.0.2.

when i started testing some of my latest code changes, as a DLL within
another application, i was getting ALL KINDS of crazy behavior.

no crashes, just really bizzare behavior from some of the API calls i
was using for my third party application.

stuff that is really hard to explain in any detail in an e-mail ...
but things like "enumerators" within the API suddenly stopped
enumerating ... without error ... function calls that returned enums
were returning the wrong enum value ... stuff like that.

after alot of head scratching and poking and prodding ... i ended up
cleaning up a bunch of "dot o" files from some of the units for the
third party API wrappers that are implemented in pascal, and which
were being compiled by FP.

my problems went away.

some kind of weird issue between 2.0.1 and 2.0.2 in the object files.

i'm not sure if this would be considred "unexpected" ... but at the
time it just didn't occur to me.

so ... make sure you are building all your code, and dependent source
code "clean".

$0.02

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

Re: Quake 2 for Freepascal

L505
In reply to this post by Jonas Maebe-2

----- Original Message -----
From: "Jonas Maebe" <[hidden email]>
To: "FPC-Pascal users discussions" <[hidden email]>
Sent: Thursday, December 29, 2005 2:07 AM
Subject: Re: [fpc-pascal] Quake 2 for Freepascal


>
> On 29 Dec 2005, at 04:27, L505 wrote:
>
> > Seems FPC always has graphics related issues for some reason when
> > compiling Delphi
> > code - I've not had problems with FPC/Delphi compatability when
> > working with text,
> > since I mainly work with text programs and not graphics.
>
> There's no inherent difference between "graphics" and "text" code. It
> simply means that there is a bug somewhere, either in the code
> generator or in the Windows-related units.
>
>
> Jonas

Right, I hope it is maybe something simple in the Windows related units which is
being called over and over again.. If anyone is interested I can post the Quake 2
freepascal port up online. I'm working on other things at the moment so don't have
much time to peak at the moment..

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

Re: Quake 2 for Freepascal

Tony Pelton
On 12/29/05, L505 <[hidden email]> wrote:
> If anyone is interested I can post the Quake 2 freepascal port up online.

i'm interested in looking at the code from an academic perspective.

please do post.

i could even help mirror it if need be.

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

Re: Compiling library / Win32 DLL

L505
In reply to this post by Tony Pelton



>i had started doing development using the FP console IDE.
>
>i then "discovered" Lazarus, and wanting to be able to use a GUI IDE,
>
>i downloaded and installed it.
>
>i then took the exact same code, compiled it, which produced a DLL for
>me, and when i tried to get my hosting application to load it, it
>complained, saying it wasn't a DLL.
>
>i then loaded the FP IDE, recompiled the same code, and it went back to working.
>
>i posted to the list, asking questions about my problem, but no one
>seemed to know why i might be having the problem.

>someone even sent me a "dll loader" tool to test whether my DLL would
>load with their testing tool.

I had sent you that tool, and it was extremely simple but it has solved some problems
I've had before.  I recalled having the same problem as you, once with lazarus..
lazarus didn't create a good DLL for me but for some reason my problem went away
after a while, and lazarus was producing OKAY dll's. I should have written down what
if anything I found out?? One of my issues was smart linking. The compiler did not
generate good DLL's when you had the smart linking on. But this was later repaired by
someone.. And again, it may not have to do with your issue. I am just guessing maybe
you had smartlinking on in lazarus, but not in the FP ide. Or maybe the FP Ide was a
different version of compiler than your compiler included with Lazarus in /pp/bin/

>the DLL _did_ load with the tool, but the application i was using
>still wouldn't deal with it, until i recompiled it with the FP console
>IDE.

Since the IDE has it's own compiled in compiler, maybe the compiler that was compiled
in was a different version than the one you were using with Laz? If you have time,
try pointing lazarus to use the exact same version of compiler that the FP IDE was
using (in environment options).

>stuff that is really hard to explain in any detail in an e-mail ...
>but things like "enumerators" within the API suddenly stopped
>enumerating ... without error ... function calls that returned enums
>were returning the wrong enum value ... stuff like that.


>after alot of head scratching and poking and prodding ... i ended up
>cleaning up a bunch of "dot o" files from some of the units for the
>third party API wrappers that are implemented in pascal, and which
>were being compiled by FP.
>
>my problems went away.

I've had the FPC config file problem before, where FPC config file is referencing my
old FPC units in other directories. It will pick up old .PPU/.o/.a files especially
if the FPC.CFG file has not updated the -FuC:\wherever\ to the new directories.
It's not actually in FPC config file problem as much as it is a user error problem
(my fault, really, for not updating the FPC cfg file in all the directories - the
problem is when you have two or more compilers running on one system)

> some kind of weird issue between 2.0.1 and 2.0.2 in the object files.

They are simply generated from the compiler with the PPU files, so if you use 2.0.0
.o files with 2.0.2 ppu files this will definitely cause issues AFAIK, and I've had
this problem before when the FPC.CFG file is pointing to old directories, as far as I
can remember.


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

Re: Quake 2 for Freepascal

L505
In reply to this post by Tony Pelton

> If anyone is interested I can post the Quake 2 freepascal port up online.

>> i'm interested in looking at the code from an academic perspective.
>>
>> please do post.
>>
>> i could even help mirror it if need be.


http://z505.com/cgi-bin/qkcont/qkcont.cgi?p=Quake2FreePascal

Remember everyone, to read instructions.. if you don't, you will get an error saying
"software refresh blah blah" because the Quake PAK file is missing (similar to a doom
WAD file).

--
L505

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