1. Ashutosh Varshney
  2. PowerBuilder
  3. Thursday, 5 August 2021 16:05 PM UTC

Hello,

I have a good sized PowerBuilder application (PB 2017 R3) and I am looking into automating builds using Git/Jenkins. Right now there is a global variable which stores the application version. This is updated every time just before the application is compiled. There are many functions which rely on this global variable to function properly.

My question is how would this work with automated builds? I am assuming that there would be a function which would get version information from the exe at runtime rather than being hard coded. Is there a function which can provide compile version? Is there any other approach I should be looking at?

Thank You.

 

Kevin Ridley Accepted Answer Pending Moderation
  1. Thursday, 5 August 2021 18:19 PM UTC
  2. PowerBuilder
  3. # 1

You can easily get file information like create datetime etc using windows api's like FindFirstFileW.  A good reference is the PFC.  You can download the version that matches your PB version and look at objects like pfc_n_cst_filesrvunicode, functions like of_getcreationdatetime.  I know there are also functions to get the compiled exe version stored in the exe, just can't remember off the top of my head.  Here's the declaration for the FindFirstFileW in case you need it:

Function long FindFirstFileW(ref string filename, ref os_finddata findfiledata) library "KERNEL32.DLL"

Comment
  1. Ashutosh Varshney
  2. Thursday, 5 August 2021 21:14 PM UTC
Thanks Kevin.
  1. Helpful
  1. Kevin Ridley
  2. Friday, 6 August 2021 02:13 AM UTC
Here's a link to get the project info from the exe:

https://www.rgagnon.com/pbdetails/pb-0120.html
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 August 2021 18:38 PM UTC
  2. PowerBuilder
  3. # 2

Hi Ashutosh,

You should upgrade to PB 2021 or at least to PB 2019 R3.  If you keep insisting to not upgrade and stay in 2017 R3 version that is many years old... it is likely you need to spend a lot of time to get this CI/CD process to work, and you might find there are limitations you may not be able to accept.

If you upgrade to PB 2021, you can use the new PB AutoBuild that is integrated with Git/SVN and Jenkins.  Another nice thing is this utility supports not just traditional client/server but also PowerClient and PowerServer deployment methods.  Here is the related product documentation.

If you upgrade to PB 2019 R3, then it is not as elegant as PB 2021.  You will need to use ORCA to integrate with Git/SVN, then use PBC to compile your app, and then use the Jenkins plugin that was created by Appeon MVP Bruce Armstrong.  Here is the tech article written by Bruce.

Best regards,
Armeen

Comment
  1. Ashutosh Varshney
  2. Thursday, 5 August 2021 21:31 PM UTC
Thanks Armeen. It is good to know about all the new features. I really like what Appeon has done with PowerBuilder. Unfortunately, the decision to update is not under my control but I will surely make the suggestion to the bosses.

Do you have any training videos of these new features? I would be very much interested in source control and the new autobuild functions of 2021.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Thursday, 5 August 2021 21:48 PM UTC
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.