Hi, Amil -
I suggest you read the information about .pbr files here:
https://docs.appeon.com/pb2022r3/pbug/Distributing_resources.html
I would never reference a resource file (such as a graphics image) on a network drive. I suggest they be copied into the same folder as your pbl's, or in a sub-folder (named "resources" or "graphics", for example) under the folder that contains the pbl's.
In your application, reference the graphic only by the name.ext, or by a relative path. Example: ..\graphics\xyz.gif
In the pbr file, list the graphics resources in the same manner as you do in the code.
When deploying (compiling) the app, specify the pbr file in the project painter. If everything is done correctly, the resource(s) will be included into the application exe, thus being available to the app when it executes without having the individual resource file(s) be distributed with the app.
Also in the Libraries tab of the Project Painter, in the list of pbl's you can optionally associate a pbr file with a pbl. When compiled, the resource(s) listed in such a "pbl-level" pbr file will be included in the PBD/DLL that is produced.
Using an empty pbl (no objects in it), if you build resources into the pbl, the PBD/DLL produced by the compiler will contain ONLY the graphics listed in the pbr file. I've seen this technique used to include one or more versions of a customer's company logo on invoices or other documents, for example, so that the DataWindow(s) needed to produce the invoice, etc. are generic, but are branded for each client/customer by simply distributing the appropriate "logo" PBD/DLL with the application.
Others in the Community will likely have additional ideas/suggestions, so I invite them to chime in.
HTH, Best regards, John
FYI: Have a look at my STD Framework's OrderEntry Demo App. It's been coded for decades now so that not one absolute path is being used to any external resources. Especially in the PBR / Images area. https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry
HTH ;-)
Regards .. Chris
If I am understanding the way is works correctly, it seems conceptually similar to what I was doing with my OldIocons build, but with you having the .PBL. .PBR, and image files all in the same folder instead of having the bitmaps in an external folder. As such, it makes sense that you do not need any absolute paths in the .PBR for the PB build process to properly package the graphic files into the compiled PBD.
The part though that I am curious about, is how do you reference the images in your code without an absolute path? The Select Image dialog always puts in the absolute path when you pick an image, and if I delete the path aside from the actual image file name, the only way the PB can find said image in the IDE is if the image is in the same folder as the PBL containing the object for which I am selecting the image file.
Looking at what you did, I see how I could reconfigure my OldIcons project to remove the image paths in its PBR, but I cannot see how I can avoid including the full image paths in the many applications that reference those images.
You could do the same & thus no paths required. Food for thought.