PCT always compiles in batch mode

Posted by lKuijpers on 24-Mar-2014 08:17

Hi,

We are currently automating the build Process of a Webspeed application for one of our customers. We are using ant together with the PCT plugin to compile the Webspeed application.

We got many weird compile errors and finally discovered that the application was being compiled in batch mode which resulted in the wrong include files being used. We now have tried several changes in the Ant build file but we had no luck so far, it always compiles in batch mode.

I have read it will only compile in batch mode if you make a connection to the database with the -b parameter but we aren't using the -b parameter.

We are now using the following build configuration:

<PCTCompile debugListing="true" destDir="${build.tmp_dir}/@{dir}" dlcHome="${env.DLC}" preprocess="true">
  <DBConnection dbDir="${build.db_dir}" dbName="mydb" singleUser="yes"/>
  <propath>
    <pathelement location="lib/myproject"/>
  </propath>
  <fileset dir="lib/myproject/@{dir}" includes="*.p" />
</PCTCompile> 

Are we doing something wrong? How can we compile in "interactive" mode?

Thanks,

Lennert

Posted by Riverside Software on 01-Apr-2014 01:35

Yes, removing the -b switch will also require you to deal with output redirector. So I guess you're using this "&IF {&BATCH-MODE} = Yes", that has to be changed to "if session:batch-mode"

All Replies

Posted by Riverside Software on 24-Mar-2014 11:39

PCT always use the -b switch (and by the way, the -b switch only applies to the client session, not for the database connection). How could the -b switch change your propath ? Wouldn't it be about GUI or TTY client ?

Gilles

Posted by lKuijpers on 24-Mar-2014 15:18

Hi Gilles,

Thanks for the answer. The application is mainly a webspeed application but some features are also available in batch mode. For this we are using compile switches. If in batch-mode it uses include file A and if not then it uses include file B.

So the problem is not the propath but the webspeed application is using the wrong include file.

It's clear now that we will have to change the compile switches.

Lennert

Posted by Riverside Software on 25-Mar-2014 01:07

Do you have "&IF {&BATCH-MODE} = Yes" conditions in your code ? If so, you'd have to recompile PCT to remove the -b switch which is automatically added to the command line.

Posted by lKuijpers on 26-Mar-2014 17:15

I recompiled PCT without the -b parameter but the PCTCompile task will fail with the following error:

Redirection or piping of stdin or stdout is allowed only with -b. (156)

It doesn't allow you to redirect the output of _progres without starting it in batch mode.

As an alternative we are checking if we can change the compile switches into runtime switches.

Lennert  

Posted by Riverside Software on 01-Apr-2014 01:35

Yes, removing the -b switch will also require you to deal with output redirector. So I guess you're using this "&IF {&BATCH-MODE} = Yes", that has to be changed to "if session:batch-mode"

Posted by lKuijpers on 01-Apr-2014 04:51

We removed the references to {&BATCH-MODE} and solved it with some changes to the code. It works like a charm now.

Thanks for the tips and the nice tool.

This thread is closed