1. Håvard Heide
  2. PowerBuilder
  3. Thursday, 24 March 2022 10:20 AM UTC

I wonder if it is possible to use <RuntimePath>   in  <application>.xml    to put the pbd's in a different folder?

Does the application have ability to look elsewhere for pbd's without using OS PATH?

Companies are becoming strickter on users ability to install. By just updating pbd's   an install should be avoided.

Will <application>.exe only change whenever you add libraries ?  or does it always change when generating a project?

<?xml version="1.0" encoding="utf-8" ?>
<Application>
<RuntimePath>C:\Program Files (x86)\xxxxxx;  C:\Users\axxxxxx\AppData\Local\xxxxxx</RuntimePath>
</Application>

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 24 March 2022 13:54 PM UTC
  2. PowerBuilder
  3. # Permalink

We've been sending out 'patches' consisting of only a few PBD files for many years and it works well.

The help doesn't say if RuntimePath in the xml file can have more than one folder.

I just tried it myself and it actually works! I built a small app with two libraries. I put the EXE in C:\Temp and the PBD files in C:\Temp\PBDFiles. The app also uses a PBNI extension and putting the PBX in the sub folder works.

<?xml version="1.0" encoding="utf-8" ?>
<Application>
<RuntimePath>C:\Program Files (x86)\Appeon\Common\PowerBuilder\Runtime 21.0.0.1311;C:\Temp\PBDFiles</RuntimePath>
</Application>

 

Based on this behavior, it appears that the EXE reads RuntimePath from the XML file and makes a call to GetEnvironmentVariable to get the current system path and then calls SetEnvironmentVariable to update the process path with whatever is found in RuntimePath at the front.

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 24 March 2022 14:03 PM UTC
Hi Roland ... yes, the multiple paths in the XML file is documented - but, deep in the PB Help. ;-)
  1. Helpful
There are no comments made yet.
Håvard Heide Accepted Answer Pending Moderation
  1. Thursday, 24 March 2022 14:16 PM UTC
  2. PowerBuilder
  3. # 1

Thanks for helpful response.

In addition I wonder what will change the .exe or what will make it necessary to distribute the .exe in addition to pbd's ?

 

Comment
  1. mike S
  2. Thursday, 24 March 2022 19:38 PM UTC
i believe that having the images in the exe = faster processing. having a resource PBD for images/icons etc is easy to do; but slows down the application. that may not be the case anymore, i haven't tested it.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 24 March 2022 20:49 PM UTC
Hi Mike .. FYI just make sure that the PBD with the images is the 1st in the library list after the PBL that contains only the App Object. Then the speed difference to load images should be negligible compared to placing them in the EXE. ;-)
  1. Helpful
  1. Olan Knight
  2. Saturday, 26 March 2022 01:20 AM UTC
One more thought: we compile images into the EXE to prevent the users, or any hackers, from modiying the image files once the code has been distributed.



Security. It's the new Boss.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 24 March 2022 13:52 PM UTC
  2. PowerBuilder
  3. # 2

Hi Håvard ;

  Yes, that is what the SetLibraryList() and AddToLibraryList() commands in PB are for. They can either point to another PBL and/or PBD dynamically. 

HTH   ;-)

Regards ... Chris

Comment
  1. Roland Smith
  2. Thursday, 24 March 2022 14:07 PM UTC
Doing it in the XML file is a simpler no code solution that can be different at different locations.

The Appeon documentation team should add something to the help topic 'Selecting a version of PowerBuilder Runtime' letting developers know that additional folders can be added.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 24 March 2022 14:20 PM UTC
Hi Roland;

Also new ....

1) New GetInstalledRuntimes() method ( Returns the version number as a string, or returns null if no PowerBuilder Runtime has been installed)

2) A new property RuntimePath is added to the Environment object (runtime path and version used by the current application executable).

HTH ;-)

Regards ... Chris



  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.