1. Ruth Spradlin
  2. PowerBuilder
  3. Tuesday, 31 March 2020 16:57 PM UTC

I am having 2 problems when trying to build my app migrated from 12.6

First, while building I get messages that it can't find my resource files.  I have the resource .pbr listed in the project.  All of the files are in my current directory, but it can't seem to find them.  I have tried to recreate the .pbr and to reattach it in the project.

Second, when the build does complete, it doesn't run.  It produces and .exe, but it doesn't do anything.  When you double click it or right click and choose open.  It just doesn't do anything.

Ruth Spradlin Accepted Answer Pending Moderation
  1. Tuesday, 7 April 2020 16:14 PM UTC
  2. PowerBuilder
  3. # 1

I am going from 12.6 to PB2019.

I copied all of the resource files to Appeon/PowerBuilder/shared which is on the path, but it still can't find them.

Comment
There are no comments made yet.
PRASHANT NIRGUN Accepted Answer Pending Moderation
  1. Friday, 3 April 2020 13:06 PM UTC
  2. PowerBuilder
  3. # 2

it sometime happened that if you have background image set to mdi window and if the file is not present or wrong path application get terminated. 

Comment
  1. Chris Pollach @Appeon
  2. Friday, 3 April 2020 16:05 PM UTC
Hi Prashant ... one of the "cardinal" rules in "how not to screw up an MDI application" ....

=> No "controls" on the surface of a MDI Frame window".

Otherwise, unpredictable behavour (including a GPF) is possible.

Food for thought. ;-)

  1. Helpful
There are no comments made yet.
Ricardo Jasso Accepted Answer Pending Moderation
  1. Tuesday, 31 March 2020 17:40 PM UTC
  2. PowerBuilder
  3. # 3

Have you tried optimizing all your pbls after migrating them from 12.6? I think that was the solution to the same problem someone posted here some weeks ago.

Comment
  1. Ruth Spradlin
  2. Tuesday, 31 March 2020 17:42 PM UTC
I will try it.
  1. Helpful
  1. Ruth Spradlin
  2. Tuesday, 31 March 2020 18:56 PM UTC
I optimized all of the .pbls. I did each one individually since I couldn't find an option to do them all at once. The .exe still doesn't run, but I am still having issues with the resource files. I don't think the two issues are related. The .exe should run without the resource files, the bitmaps should just not show up.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 31 March 2020 17:13 PM UTC
  2. PowerBuilder
  3. # 4

Hi Ruth;

  FWIW: PBR resources should never use a hard coded path ... does yours?

1) Does the App EXE start OK from within the PB Developers PC?

2) What version of PB and build number are you using?

3) What version & build number of MS-Windows are you using?

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 31 March 2020 19:14 PM UTC
FYI: When run from the PB IDE, the PBR has *no* effect on locating external resources. However, if your PB App uses a specific "path" to a resource then as an EXE, it will never be located in the resulting PBR link location (and vise versa of course).
  1. Helpful
  1. Andrew Barnes
  2. Tuesday, 7 April 2020 20:29 PM UTC
I'm a bit confused, and probably misunderstanding what you are saying about hardcoded paths. In our shop, we have all of our bitmaps on the developers' common network drive. And in our code, bitmaps are referenced by the full path. In the PBR they are likewise specified by the full path. We have never had a problem with this arrangement for twenty plus years going back to PowerBuilder version 5. Whether running in the IDE in which case the developer's network drive is naturally available or from a compiled EXE on a user's machine in which the developer's network drive is NOT available, the bitmaps show up just fine.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 8 April 2020 17:20 PM UTC
Hi Andrew .. that would work fine if the PBL that compiles into a PBD/DLL using a PSR file that all reside in the *same* folder on the shared drive. Then the image mapping in the EXE will work fine. That is the way I do it in your described case.
  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Tuesday, 31 March 2020 17:03 PM UTC
  2. PowerBuilder
  3. # 5

The image files listed in the .pbr need to be in a folder in the system path or the IDE's AppPath.

App Path in regedit:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\App Paths\pb####.exe

 

What version of PowerBuilder are you using? You only mentioned the one you are moving away from.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 31 March 2020 17:50 PM UTC
FWIW: Appeon PB 2017 Rx or 2019 Rx is no different than PB 12.6 compile wise. Not sure why your doing this?
  1. Helpful
  1. Roland Smith
  2. Tuesday, 31 March 2020 17:57 PM UTC
Without path or app path, the images files need to be in the same folder as the target file and you have to make sure that is the current directory of the IDE. Putting the image files in a dedicated Image folder makes it much easier.
  1. Helpful
  1. Ruth Spradlin
  2. Tuesday, 31 March 2020 18:53 PM UTC
The file names in the code have not path just "xxx.bmp"

The files and the .pbr file are in the directory with the target and all of the .pbls. In the project, on the General tab under resource file name, it lists the path and .pbr file name. Under the library tabs, it has the path and resource file name next to the .pbl with the application and project in it. There are other resource files next to other .pbls in the list that get created into .pbd files. It does not seem to have any problems with these.
  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.