palmunits: added a simple 'Hello, World' for PalmOS

git-svn-id: trunk@37903 -
This commit is contained in:
Károly Balogh 2018-01-04 09:04:31 +00:00
parent a371b39ee9
commit f609c55b59
3 changed files with 28 additions and 0 deletions

1
.gitattributes vendored
View File

@ -6668,6 +6668,7 @@ packages/os4units/src/workbench.pas svneol=native#text/pascal
packages/palmunits/Makefile svneol=native#text/plain
packages/palmunits/Makefile.fpc svneol=native#text/plain
packages/palmunits/Makefile.fpc.fpcmake svneol=native#text/plain
packages/palmunits/examples/hello.pas svneol=native#text/plain
packages/palmunits/fpmake.pp svneol=native#text/plain
packages/palmunits/src/aboutbox.pp svneol=native#text/plain
packages/palmunits/src/alarmmgr.pp svneol=native#text/plain

View File

@ -0,0 +1,24 @@
{$APPID FPHL}
{$APPNAME Hello, FPC}
program hello;
uses
event_, sysevent, systemmgr, window;
const
message = 'FPC says: Hello, Palm!';
procedure EventLoop;
var
event: EventType;
begin
repeat
EvtGetEvent(event, evtWaitForever);
SysHandleEvent(event);
until (event.eType = appStopEvent);
end;
begin
WinDrawChars(message, length(message), 35, 74);
EventLoop;
end.

View File

@ -123,6 +123,9 @@ begin
P.Targets.AddUnit('pdilib.pp',[PalmOS]);
P.Targets.AddUnit('helperserviceclass.pp',[PalmOS]);
P.ExamplePath.Add('examples');
P.Targets.AddExampleProgram('hello.pas');
{$ifndef ALLPACKAGES}
Run;
end;