1. Suvendu Dey
  2. PowerBuilder
  3. Friday, 8 April 2022 08:06 AM UTC

We are using Powerbuilder 19 r3 and building exe using powerbuilder compiler(PBC190). 

Is there any way to embed icons in EXE so that we do not need to provide actual icon or image files along with pbd and exe?

We can achieve it using powergen. Powergen can includes all the image and icons in exe we do not need actual image file to run exe.  

Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 8 April 2022 10:24 AM UTC
  2. PowerBuilder
  3. # 1

Also pay attention to the following difference difference when using pbcxxx (documented in PBC manual).

Andreas.

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 8 April 2022 10:15 AM UTC
  2. PowerBuilder
  3. # 2

Hi.

One thing you should pay attention to is that it isn't enough to simply add the resources you use in the pbr file. You have to reference them the exact same way as they are referenced in your application. This means that if in your application you reference the file using full filename, then you have to do the same in your pbr. Examples:

Appication icon: myapp.ico -> in pbr you should add myapp.ico.

Appication icon: c:\myapp\myapp.ico -> in pbr you should add c:\myapp\myapp.ico.

Appication icon: .\myapp.ico -> in pbr you should add .\myapp.ico.

Appication icon: .\resources\myapp.ico -> in pbr you should add .\resources\myapp.ico.

That is the most important thing to pay attention when adding resource (images - icons) files to pbr. And this has to be done fore every resource you want to embed.

Andreas.

Comment
There are no comments made yet.
Konstantin Goldobin Accepted Answer Pending Moderation
  1. Friday, 8 April 2022 08:15 AM UTC
  2. PowerBuilder
  3. # 3

Sure! You create a resource file and use it with the /r parameter.

Comment
  1. Suvendu Dey
  2. Friday, 8 April 2022 08:42 AM UTC
Thank you Konstantin! I am already using it like /r "fullpath\resource.pbr" but images and icons are not visible. To make those visible I need to place all the icons and images to the exe,pbd folder.
  1. Helpful
  1. Konstantin Goldobin
  2. Friday, 8 April 2022 11:55 AM UTC
Are those images included in the built EXE file? If you examine it, do you see the names of the image files?
  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.