1. Moises Mescua
  2. PowerBuilder
  3. Thursday, 15 August 2019 17:04 PM UTC

Hi Appeon Community,

I have troubles to create PBDs with resources in a PBR when the PBR path is relative.  

I am using Appeon PowerBuilder 2017 R3 Build 1880.

Please let me know, how I can figure out this issue.

Thank you.

Who is viewing this page
Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 15 August 2019 20:06 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Moises;

  If you want to have resources in your PBD or EXE that are automatically located at run time, you cannot even use relative folders like "./Resource/xxxx.yyy" for example. The resource must be treated as local. For example: "XXXXX.png". Then including these in a PBR would work 100% so that you do not have to deploy the sub-folder(s) with your EXE.

   Once you get into large production Apps though, PBD & DLL files are definitely the way to go. Otherwise, your PBR setups can be quite complicated. Also, to maintain as well.

 Regards... Chris

Comment
  1. Moises Mescua
  2. Friday, 16 August 2019 14:19 PM UTC
Thanks Chris for this info. Regards.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Sunday, 18 August 2019 17:52 PM UTC
  2. PowerBuilder
  3. # 1

Hi Tobias;

  Nothing wrong with the relative paths in the PBR. Just not in your PB App.

Regards ... Chris

Comment
There are no comments made yet.
Tobias Roth Accepted Answer Pending Moderation
  1. Sunday, 18 August 2019 17:41 PM UTC
  2. PowerBuilder
  3. # 2

Hi Chris,

what is exactly the problem with relative resource-paths in the PBR?
We have restructured our workspace and moved all resources into a subfolder "resource".

The PBR look like this:
resource\save.ong
resource\load.png

The pictures are defined in the source code like this "resource\save.png".
All works fine when we compile that PBR into our resource.pbd, no image needs to be deployed.

Thanks,
Tobi

Comment
  1. Chris Pollach @Appeon
  2. Sunday, 18 August 2019 17:50 PM UTC
Hi Tobias;

That does not work for me.

However, if I place the resource PBL in the same "resource" folder with no paths in the PBR. That links all the external resources properly into a PBD which works at deployment time. I just copy the resource PBD to the main EXE deployment folder. If I do it your way, I need to deploy the "resources" folder along with the EXE.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 16 August 2019 04:20 AM UTC
  2. PowerBuilder
  3. # 3

You absolutely want to embed the images into your application, and NOT have them sitting around in folders.

First, it's faster, but most importantly no one can replace your images with other, perhaps less work friendly ones.

 

Olan

Comment
  1. Moises Mescua
  2. Friday, 16 August 2019 14:32 PM UTC
Yes, I want to create just one execute file embed the images without PBDs or DLLs using PowerBuilder Compile.
  1. Helpful
There are no comments made yet.
Moises Mescua Accepted Answer Pending Moderation
  1. Thursday, 15 August 2019 19:51 PM UTC
  2. PowerBuilder
  3. # 4

Hi Roland,

I am using relative path in several objects in my app, for instance:

At the PictureName of an object (Properties)
..\RESOURCES\run.bmp

The Collect.PBR file looks like:
..\RESOURCES\run.bmp
..\RESOURCES\go.bmp

My home directory is:
C:\Work\Apps-local
The images files were copied to my home directory where the PBR, and PBT files are.

Added as System variables:
C:\Work\Apps-local
and
C:\Work\Apps-local\RESOURCES

Unfortunately, the issues persist.

By the way we wouldn't like rename or modify the Picture Name of hundreds objects.

 

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 15 August 2019 17:28 PM UTC
  2. PowerBuilder
  3. # 5

I would put the PBR and the image files referenced in the same folder and add that folder to your system path.

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.