1. Vipin Dwivedi
  2. PowerBuilder
  3. Thursday, 23 March 2023 23:15 PM UTC

Appeon Folks,

What is the best way to identify which icon folder orca is referring when giving .PBR file full path while building EXE using orcascript. Here is below script I am using.....

 

Start Session
set debug "true"
scc set connect property localprojpath "C:\actions-runner\_work\Folder1\Folder2\Test\Master"
;This path is the path where ws_object is getting created like C:\actions-runner\_work\Folder1\Folder2\Test\Master\ws_object
scc set connect property logfile "C:\actions-runner\_work\Folder1\Folder2\Test\Master\createpbl.log"
scc connect offline
scc set target "C:\actions-runner\_work\Folder1\Folder2\Test\Master\units.pbt" "IMPORTONLY | OUTOFDATE"
scc refresh target 3pass
build library "pb1.pbl" "" pbd
build library "pb2.pbl" "" pbd
build library "pb2" "" pbd
set exeinfo property companyname "company1"
set exeinfo property productname "Test"
set exeinfo property copyright "All rights reserved."
set exeinfo property description "Test System"
set exeinfo property fileversion "2,0,0,3232"
set exeinfo property fileversionnum "2,0,0,3232"
set exeinfo property productversion "2,0,0,3232"
set exeinfo property productversionnum "2,0,0,3232"
build executable "C:\actions-runner\_work\Folder1\Folder2\Test\Master\units.exe" "C:\actions-runner\_work\Folder1\Folder2\Test\Master\_resources\ue_icon.ico" "C:\actions-runner\_work\Folder1\Folder2\Test\Master\_resources\units.pbr" "YYY" newvstylecontrols
 
We have _resource folder under "C:\actions-runner\_work\Folder1\Folder2\Test\Master" project path where we keep all the bitmap and icons file. Now when I build the exe. It creates exe and pbd but when I run the application, no icons appear and also size of the exe is very small.
 
PBR file contains only file name like (This is sample and not actual)
add.ico
alert.png
arrow_up.ico
....
....
etc
 
I want to understand when build runs and when it look for PBR file for icons. which folder it look for icons. I gave the complete path but still it is missing.
 
What is the exact process and when I provide PBR, how ORCA look for the icon files....
 
Kindly help!
Vipin Dwivedi Accepted Answer Pending Moderation
  1. Sunday, 26 March 2023 17:07 PM UTC
  2. PowerBuilder
  3. # 1

Kindly help! What the directory list EXE look for when we use complete directory list of PBR file while building EXE. The PBR file only content icon and bmp file name only without complete path.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 28 March 2023 18:52 PM UTC
Hi Vipin;

Whether you are using the PB IDE, ORCAScript, PBC compiler or the new PBAutoBuild compiler, then you should ...

1) Always have your App icon in the App's main Workspace/Target root folder

2) NEVER use direct referencing of any object (internal or external) in a PBR file.

3) If pathing is required - then use "Relative" paths to your PBR(s)

HTH

Regards ... Chris
  1. Helpful
  1. Vipin Dwivedi
  2. Tuesday, 28 March 2023 19:54 PM UTC
I have seen that if I add the resource path in environment variable path then it works fine.

I am trying to understand the exact process how internally build script identify the path of resource files mentioned in PBR file.

Regarding your answer...

1) Always have your App icon in the App's main Workspace/Target root folder - Do you mean to keep all the icons at the same path where we keep workspace and .pbt file?



2) NEVER use direct referencing of any object (internal or external) in a PBR file. - What does this mean? Any example greatly appreciated.



3) If pathing is required - then use "Relative" paths to your PBR(s) - If I set the localprojectpath like scc set connect property localprojpath "C:\actions-runner\_work\Folder1\Folder2\Test\Master" and if my PBR file is under _resource folder which is under TestMaster directory the use PBR file path as "..\_resources\units.pbr"



Please help
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 29 March 2023 17:43 PM UTC
Hi Vipin;

1) No, you only need the App's icon file in the root folder. Then also makes sure that that .ICO file is in the Application Object as well with *no* path assigned.

2) If you hard code an absolute path to an external resource, it needs to be deployed into the same directory structure in production. That is not normally how production teams like you to deploy Apps. They want to choose the App's location as per their corporate standards. This then also carries over to PowerClient and PowerServer Apps as well as they will be Cloud Deployed to the users AppData folder (however that becomes mapped at runtime by the O/S).

3) A relative path would be for example: ".\Images".

HTH
  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.