How to perform Automated Build via Command Line?

Discussion forum about all things Gupta, OpenText and the community.
maryo87
India
Posts: 6
Joined: 18 Dec 2019, 12:41
Location: India

How to perform Automated Build via Command Line?

Post by maryo87 » 18 Dec 2019, 12:51

As of now, I do the Compilation /Build by following the below steps,
  • Open the Team Developer
  • Open the Project File i.e file_name.apt by browsing the file location
  • Click on Project option and Click on Compile or Press F8
  • As soon as, the result confirm there is no issue
  • I build the, by clicking on Project --> Build
The last step generates the exe. Is there a way, I can do the same thing via command line? If yes, it would help us to automate the Build process.

Any pointers would be appreciated.

User avatar
Peter.Hugk
Germany
Posts: 369
Joined: 06 Mar 2017, 07:48
Location: Germany

Re: How to perform Automated Build via Command Line?

Post by Peter.Hugk » 18 Dec 2019, 13:06

We use batch files for such tasks. Command line looks like this:
cbi71.exe -bx %pathIn%%name%.apt %pathOut%%name%.exe
Have a look in the online help for more details (Command Line Switches).

Best regards,
Peter

maryo87
India
Posts: 6
Joined: 18 Dec 2019, 12:41
Location: India

Re: How to perform Automated Build via Command Line?

Post by maryo87 » 18 Dec 2019, 13:17

Thanks for replying. Just a last query in-line with your previous command. I understand, the command compiles and builds the exe. Is there a command just for compilation and if that passes then only I build it based on the compilation result?

Also, how about incrementing the version every build automatically? If you know and if you can give me some hint would be beneficial.

memic
Germany
Posts: 52
Joined: 07 Mar 2017, 08:51
Location: Germany

Re: How to perform Automated Build via Command Line?

Post by memic » 18 Dec 2019, 13:29

Hi,

you can use the command line like Peter.Hugh suggested with a batch file.

We made a Tool to do this for us. We have to generate over 50 .exe Files everytime we release a new version.

The Tool does does a few things automaticaly:
  • generate the executables
  • update the buildnumber in our versions.apt file
  • update the build settings (executable properties, right click in windows explorer, properties, author, version ecc)
  • all executables are signed with a code signing certificate
I can share some code if someone is interested...

maryo87
India
Posts: 6
Joined: 18 Dec 2019, 12:41
Location: India

Re: How to perform Automated Build via Command Line?

Post by maryo87 » 18 Dec 2019, 13:38

Please do share, so that it will give us some pointers on how you have achieved it. Thanks again.

memic
Germany
Posts: 52
Joined: 07 Mar 2017, 08:51
Location: Germany

Re: How to perform Automated Build via Command Line?

Post by memic » 18 Dec 2019, 15:04

Teamdev 7.0 Code Example attached.

Check the SAM_Create Message in the frmMain Window. You need to set some Config variables there...
You also need a CSV List with the .app source files. Example provided.
You do not have the required permissions to view the files attached to this post.

maryo87
India
Posts: 6
Joined: 18 Dec 2019, 12:41
Location: India

Re: How to perform Automated Build via Command Line?

Post by maryo87 » 18 Dec 2019, 17:31

I couldn't find SAM_Create Message in the frmMain Window. Could you also please provide little more details on how to do the testing?

memic
Germany
Posts: 52
Joined: 07 Mar 2017, 08:51
Location: Germany

Re: How to perform Automated Build via Command Line?

Post by memic » 19 Dec 2019, 08:04

You could not find the SAM_Create Message? Are you looking the "AutoBuild.app" file? There is only 1 Form Window in the .app file.

There are only 2 files you need to check there, AutoBuild.app and AutoBuildConfig.csv. The other source files are libraries from MTbl.

Simply put your source path in the .csv file, then open the .app with Team Developer, Look at the SAM_Create Message, modify some Variables there and run it, you will see then how it works.

This an Example, you need to change it a litle bit to suit your needs.

maryo87
India
Posts: 6
Joined: 18 Dec 2019, 12:41
Location: India

Re: How to perform Automated Build via Command Line?

Post by maryo87 » 06 Jan 2020, 17:28

Thanks, I was able to figure it out.

guptaman
Finland
Posts: 1
Joined: 23 Jan 2020, 02:24
Location: Finland

Re: How to perform Automated Build via Command Line?

Post by guptaman » 24 Jan 2020, 00:19

We have about 400 applications to build, build is slow.

We have made a multi-thread C# compiler application, to build multi threaded. You can give as parameters for example the thread count, file mask what to build (*.app), etc.

It opens given amount of threads, to open cbiXX compiler processes in parallel. It has been running 10 years now robustly, without errors, and we have this way better control how Gupta compilers behave. By this way, we can build our software in 15 minutes, instead of 3-4 hours. I would share the code, but it is company/corporate private.

We run the builds at Jenkins CI-server, building all applications in every change in code.

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests