1. Vipin Dwivedi
  2. PowerBuilder
  3. Thursday, 14 December 2023 21:02 PM UTC

Hello Appeon Team -  I need to know when we should create the EXE.

In my project, we mostly work on the objects. We never change the application object. We also rarely add any new picture or bitmap file. I know EXE contains the bitmap and icon information embedded through PBR file. When we build the EXE, it embedds the icons and picture information. But if we are not changing pictures and icons and if we are making change in appplication objects, is it still needed to run the EXE? What if we only build the PBDs and deploy them. Any time if we deploy the EXE, we would need to user log off from the application otherwise we would get "file is in use" error whey copy the EXE file. Since we are not making any changes to EXE object, is it okay to leave them as it is?

So my question is

What else changes in PB would need to trigger the EXE build?

An exe file contains what other than picture information?

Does creating any new object in a PBL would need EXE build trigger? Remembe I am not adding a new library.

 

Kindly advice.

Thanks,

Vipin

Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 27 December 2023 22:03 PM UTC
  2. PowerBuilder
  3. # 1

Here is a method I developed back in the PB 6 time period that allows updating the application files on a network drive while users are using it.

I created a stub exe that the user's shortcut points to. There are two folders under the folder containing the stub exe. The folder names are Version1 and Version2. The stub exe reads an .ini file to determine which folder contains the current version and then runs it.

When a new version is deployed, it is copied to the Version# folder that is not current. Once the files finish copying, I would then change the folder name in the .ini file. We would then send out an email to all users telling them that they should exit the app and immediately run it again.

The application would set the AppName database parm to the version folder name. This allowed us to run the sp_who stored procedure to determine who was running what version. Occasionally a user would have a shortcut to one of the version folders. These were discovered by the sp_who results.

Comment
There are no comments made yet.
David Peace Accepted Answer Pending Moderation
  1. Thursday, 21 December 2023 10:39 AM UTC
  2. PowerBuilder
  3. # 2

Personally I do not like compiling to PBDs and rolling them out. There is no versioning of a PBD file in the build process so you really have no idead which version of the PBD file a user is running.

Having said that we do roll out ad-hoc reports for customers through a PBD, the reports themselves are all versioned so that negates the PBD file version proiblem. As Rolnad said I think the PBD file may well be blocked from overwrite if the APP is runnign and has opened the PBD.

Finally I would now advise using the PowerClient to deploy your application. This pretty much deals with the issue. The PBD files are versioned and in this method so the code is fully protected. The PBDs are ecrypted too so it's very diffcult to hack open your PBDs. From a security and IPR protection this is vital.

To answer your original question: I would think that you might get away with copying out a new PBD file, withthe only issue being if the EXE App has the PBD file open.

Hope hat helps.

David

Comment
There are no comments made yet.
Vipin Dwivedi Accepted Answer Pending Moderation
  1. Friday, 15 December 2023 18:06 PM UTC
  2. PowerBuilder
  3. # 3

Please find attached Zip contains image of ORCA and application.

Attachments (2)
Comment
There are no comments made yet.
Bruce Armstrong Accepted Answer Pending Moderation
  1. Friday, 15 December 2023 18:00 PM UTC
  2. PowerBuilder
  3. # 4

What we do is create an "EBF" PBL.  Empty at first but when we make changed to objects we copy them to them to that PBL and create a PBD from that.  We store that in a table in the database.  There is code in the app that looks for that and when it finds it downloads it and then does a SetLibraryList call to add that PBD to the beginning of the library search path.  That allows us to update code without having to redeploy the EXE or any of the PBD.   The entries in the database are versioned so that the application can look to see that it's version of the EBF PBD is out of date and download the new one.

There are a number of things that can't be updated this way though.  Any of the global variables such as the transaction object and in the case of PFC apps the PFC app manager.   That's because they all get loaded into memory before our code that checks for the EBF PBD gets a chance to run.

Note we did that because something like PowerClient (https://www.appeon.com/products/power-client) wasn't available when we first wrote that.  If that's a possible solution you could use I'd highly recommend it.  It allows you to update the entire application dynamically.

 

Comment
  1. Vipin Dwivedi
  2. Friday, 15 December 2023 18:12 PM UTC
Hey Bruce.

Great to see your reply. We follow the same trend for any patch deployment where we copy the changed object to patch library and keep them on top in library list dynamically.



And that is also true that it does not apply in every case where we update something which has been reference in whole libraries like transcation object, global variable or any pfc call in whole libraries.

  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 15 December 2023 17:27 PM UTC
  2. PowerBuilder
  3. # 5

If you generate a PBD for all libraries including the one that contains the application object, no code objects will be in the EXE.

I haven't tested this for recent versions but in the past PBD files that had been loaded into memory were locked.

Comment
  1. Vipin Dwivedi
  2. Friday, 15 December 2023 17:53 PM UTC
I generate the PBD for the library that contains application object.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 15 December 2023 02:48 AM UTC
  2. PowerBuilder
  3. # 6

I agree with Chris, but I do not believe he fully answered your question.

The application object contains the declarations for the app's global variables and global external function declarations, so any change to those would necessitate a re-deploy of the .exe. Also signature changes (new/different arguments) to methods in other objects that get called by code in the application object, because the method bindings have to be updated.

While I understand your desire to not having to require users to exit the application, I think there are times where it makes sense to do so. Database/schema changes, database server maintenance, for example. The commercial app I work on combines a five-minute "heartbeat" feature with a quick check of an application status value in a configuration table. When this value is changed to indicate the app is to be disabled, the next heartbeat check causes the app to display a critical message that the app will shut down and the gives the user a chance to save their data. If a customer needs to install a new release of the app or make the system unavailable for maintenance, this logs all users off within those five minutes. As Chris is fond of saying: Food for thought.

Best regards, John

 

Comment
  1. Vipin Dwivedi
  2. Friday, 15 December 2023 18:05 PM UTC
My application object is in units.pbl. This library file only contains application object and one project object (There are few other project objects and dataobject which we don't use. No use in our application. We didn't delete them either but we don't change them) I have attached the image.



My orca script does create PBD of units.pbl and EXE. I have attached the image of my orca script.



I totally agree if we are changing structure of the object which we are calling in application object. We will have to build the EXE. But if any objects we are calling/using in application object don't change then looks like not re-building EXE would work. Correct?



Here I conclude my statement

An EXE contains

1 - global functions information

2 - global variable information

3 - icons and image information (through PBR file if we use them)

4 - Application object information



A new EXE build would require if

1 - change to any of the above list

2 - change in the signature of the object being used/called from application object



Please correct me if I am wrong.









  1. Helpful
  1. Vipin Dwivedi
  2. Friday, 15 December 2023 21:17 PM UTC
Please confirm if my understanding is correct or guide me.



Vipin
  1. Helpful
  1. Vipin Dwivedi
  2. Wednesday, 20 December 2023 19:55 PM UTC
Kindly confirm.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 14 December 2023 21:09 PM UTC
  2. PowerBuilder
  3. # 7

Hi Vipin;

  Normally, an App Build for a new EXE is done by the developer(s) when getting ready to Unit Test before shipping the PB App of to the QA Team. This build is basically a "Production Candidate" (IMHO) for the QA team to fully test. So I personally (as a developer) would perform an App EXE build on my PB IDE machine and then do a quick "sanity test" on this before shipping it over to QA.  Food for thought.  HTH

Regards ... Chris

Comment
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.