Alaska Software Inc. - PBuild for linux
Username: Password:
AuthorTopic: PBuild for linux
Adelaide LopesPBuild for linux
on Wed, 31 May 2006 19:17:08 +0100
Phil Ide
Re: PBuild for linux
on Thu, 01 Jun 2006 01:07:44 +0100
Adelaide,

> I'm looking for the correct package of xbase to install in a linux S.O. (CentOS 4.3).
> I've found this site: http://rpmforge.net/user/packages/xbase/. 
> Can anyone tell me if it's the best place?
> 
> I've managed to install WAA with wine on the linux plataform.
> Now I need to know how to build the projects for the WAA aplications.
> 
> Can anyone tell me if I'm on the right track? ... how to puild projects? ... which package t use?

Firstly, you can run your web on Linux and WAA on another (Windows) machine,
so you don't need to run it under Wine.

Secondly, the docs for WAA show how to create a WAA package quite well, so
read the manual and you'll get there.

If you want to find an easier way to produce HTML than using the methods of
the oHtml object (which is klunky and limiting), then take a look at xbHCL. 

The source below creates a complete WAA package (when linked as a DLL).

This (xbHCL) example shows how to create a simple form which is displayed to
the user. When they submit the form, the details they have entered are
reflected back to them.

Assuming the web is available on localhost, you can access it via
these URL's:

 replace waa1gate.exe with waa1gate.isa etc.
WAA:
http://localhost/cg-bin/waa1gate.exe?WAA_PACKAGE=SIMPLE&WAA_FORM=WEB_FORM

Xb2.NET: 
http://localhost/form?

<<< begin sample.prg
#include "xbhcl.ch"

 WAA compatibility routines
 required by WAA, ignored by Xb2.NET

Function _register( oPkg )
   return TRUE

Function _copyright()
   return "Polar Bear International"

Function _version()
   return "1.0"
   
INIT Procedure _simple_onload_()
   HCL WAAFORM PREFIX WEB_
   return

Function WEB_Form()

    declare a <form>
   FORM ACTION 'form_submit' name=myform
       use a table to make the layout nice
      TABLE
         TR
            TD ? '~Name'
            TD ! name=UNAME, size=20, maxlength=20, accessKey=N
         TR
            TD ? '~Email'
            TD ! name=UEMAIL, size=20, maxlength=30, accessKey=E
         TR
            TD ? '~Password'
            TD ! AS PASSWORD name=UPASS1, size=20, maxlength=20, accessKey=P
         TR
            TD ? 'Repeat P~assword'
            TD ! AS PASSWORD name=UPASS2, size=20, maxlength=20, accessKey=A

         TR
            TD ? NBSP  make this cell blank
            TD SUBMIT value=Submit, accessKey=S  submit button 
         EndTr
      EndTable
   EndForm

   HCL SEND  commit to client
   Return TRUE

Function WEB_Form_Submit()
   local cName  := hclDefVar(UNAME,'')
   local cEmail := hclDefVar(UEMAIL,'')
   local cPass1 := hclDefVar(UPASS1,'')
   local cPass2 := hclDefVar(UPASS2,'')

   STYLETEXT
      .data {color:blue;}
      .err  {color:red; font-weight: bold;}
   ENDTEXT
   EndStyleText

   SPAN class=err
      do case
         case Empty(cName)
            ? 'You must enter a name'

         case Empty(cEmail)
            ? 'You ust enter an email address'

         case Empty(cPass1) .or. Empty(cPass2)
            ? 'You must enter both passwords'

         case !(cPass1 == cPass2)
            ? 'Passwords must match'

         otherwise
            ? 'Data is accepted!'
      endcase
   EndSpan

   TABLE
      TR
         TD ? '~Name'
         TD class=data ? cName
      TR
         TD ? '~Email'
         TD class=data ? cEmail
      TR
         TD ? '~Password'
         TD class=data ? cPass1
      TR
         TD ? 'Repeat P~assword'
         TD class=data ? cPass2

      TR
         TD ? NBSP  make this cell blank
         TD NavigateHistory()
      EndTr
   EndTable

   HCL SEND
   Return TRUE
<<< end sample.prg

Regards,

Phil Ide

***************************************
* Xbase++ FAQ, Libraries and Sources: *
* goto: http://www.idep.org.uk/xbase  *
***************************************

I will not shoot at any of my enemies if they are standing in front of the
crucial support beam to a heavy, dangerous, unbalanced structure.
          [Things I'd do as an Evil Overlord]
Frans VermeulenRe: PBuild for linux
on Thu, 01 Jun 2006 10:14:55 +0200
Adelaide,

In addition to what Phil said:

>I'm looking for the correct package of xbase to install in a linux S.O.
(CentOS 4.3).
> I've found this site: http://rpmforge.net/user/packages/xbase/.

If I am not mistaken this package is an object library in order to be able
to
work with DBF's from linux applications. AFAIK it is of no use if you try
and run Xbase++ applications under WINE.

You would have to do something like "wine pbuild blablabla" in a terminal
window
under linux. I would not even dream of getting that to work.

> I've managed to install WAA with wine on the linux plataform.

Cool!!!, How did you get the required enviroment-settings to work,
I failed on that point. I'm very curious (where my mistake lies).

> Now I need to know how to build the projects for the WAA aplications.

You are not choosing the easy way...

> Can anyone tell me if I'm on the right track? ... how to puild projects?
... which package t use?

I would in all honesty advise to work under windows, because it will take
you
without doubt a lot of time to find out the details of how to get this to
work
under linux.

Regards,
Frans Vermeulen
Frans VermeulenRe: PBuild for linux
on Thu, 01 Jun 2006 15:26:31 +0200
Adelaide,

Thnx for the info,
got WAA-server running now on FC5 

Regards,
Frans Vermeulen