Hi Thierry;
FWIW: Here is what I use in my STD framework ...
INI file:
; ----- Start Web Browser Control Settings Section. ----
[Browser Template]
CachePath= ; The folder that stores the web page cache, cookies etc.
UserDataPath= ; The folder that stores the user data dictionary.
DownloadPath= ; The default download path.
UserAgent=AppeonWebBrowser ; The User-Agent request header
ProxyAuto=1 ; Whether to use auto proxy detection (default 1=yes)
ProxyPacUrl= ; The URL of the server where the PAC file is located.
ProxyAddress= ; The address of the proxy server.
ProxyPort= ; The port of the proxy server.
ProxyUser= ; The user name that will be authenticated by the proxy server.
ProxyPassword= ; The password that will be authenticated by the proxy server.
RemoteDebuggingPort=6124 ; The remote debugging port used by AscentialTest (default 6124)
PowerScript:
global type fn_web_browser_control_settings from function_object
end type
forward prototypes
global subroutine fn_web_browser_control_settings (string as_ini_name, string as_section_name)
end prototypes
global subroutine fn_web_browser_control_settings (string as_ini_name, string as_section_name);/*
Method : (Global Function)
Author : Chris Pollach
Scope : Public
Extended : No
Level : Base
Description : Called to set the App's Web Browser Control settings
Behaviour : Will be used for all instances of the WB Control
Note :
New PB2019 R2 Web Briowser Control "Proxy" settings ...
Path settings:
CachePath // The folder that stores the web page cache, cookies etc.
UserDataPath // The folder that stores the user data dictionary.
DownloadPath // The default download path.
User agent settings:
UserAgent // The User-Agent request header
Proxy settings:
ProxyAuto = "1" // Whether to use auto proxy detection( default 1=yes)
ProxyPacUrl // The URL of the server where the PAC file is located.
ProxyAddress // The address of the proxy server.
ProxyPort // The port of the proxy server.
ProxyUser // The user name that will be authenticated by the proxy server.
ProxyPassword // The password that will be authenticated by the proxy server.
Argument(s) : None
Throws : N/A
Return Value : None
-------------------------------------------- CopyRight -----------------------------------------------------
Copyright © 2020 by Software Tool & Die Inc, here in known as STD Inc. All rights reserved.
Any distribution of the STD Foundation Classes (STD_FC) for PowerBuilder®, InfoMaker®,
PowerServer Web® or PowerServer Mobile® source code by other than by STD Inc. is prohibited.
------------------------------------------- Revisions -------------------------------------------------------
1.0 Inital Version - 2020-09-25
1.1 Added code to log changes if in DEBUG mode - 2021-01-08
1.2 Added a set "remote-debugging-port" to allow AscentialTest to work with App - 2021-04-01
*/
// Declarations
Integer li_rc // RC work Var
// Web Browser property settings work variables ...
String ls_CachePath
String ls_downloadpath
String ls_proxyaddress
String ls_proxyauto
String ls_proxypacurl
String ls_proxypassword
String ls_proxyport
String ls_proxyuser
String ls_useragent
String ls_userdatapath
String ls_port
String ls_msg
String ls_title
String ls_class
sr_pass_data lo_sr
// Read INI values from App's INI file ...
ls_CachePath = ProFileString ( as_ini_name , as_section_name , "CachePath", "" ) // Get CachePath
ls_downloadpath = ProFileString ( as_ini_name , as_section_name , "DownLoadPath", "" ) // Get DownLoadPath
ls_proxyaddress = ProFileString ( as_ini_name , as_section_name , "ProxyAddress", "" ) // Get ProxyAddress
ls_proxyauto = ProFileString ( as_ini_name , as_section_name , "ProxyAuto", "" ) // Get ProxyAuto
ls_proxypacurl = ProFileString ( as_ini_name , as_section_name , "ProxyPacUrl", "" ) // Get ProxyPacUrl
ls_proxypassword = ProFileString ( as_ini_name , as_section_name , "ProxyPassword", "" ) // Get ProxyPassword
ls_proxyport = ProFileString ( as_ini_name , as_section_name , "ProxyPort", "" ) // Get ProxyPort
ls_proxyuser = ProFileString ( as_ini_name , as_section_name , "ProxyUser", "" ) // Get ProxyUser
ls_useragent = ProFileString ( as_ini_name , as_section_name , "UserAgent", "" ) // Get UserAgent
ls_userdatapath = ProFileString ( as_ini_name , as_section_name , "UserDataPath", "" ) // Get UserDataPath
ls_port = ProFileString ( as_ini_name , as_section_name , "RemoteDebuggingPort", "" ) // Get Debugging Port#
// Process Setting updates and Apply if supplied ...
IF Len ( ls_CachePath ) > 0 THEN
li_rc = WebBrowserset ( "CachePath", ls_CachePath )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "CachePath"
lo_sr.si_data [ 3 ] = ls_CachePath
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_DownLoadPath ) > 0 THEN
li_rc = WebBrowserset ( "DownLoadPath", ls_DownLoadPath )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "DownLoadPath"
lo_sr.si_data [ 3 ] = ls_DownLoadPath
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_ProxyAddress ) > 0 THEN
li_rc = WebBrowserset ( "ProxyAddress", ls_ProxyAddress )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "ProxyAddress"
lo_sr.si_data [ 3 ] = ls_ProxyAddress
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_ProxyAuto ) > 0 THEN
li_rc = WebBrowserset ( "ProxyAuto", ls_ProxyAuto )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "ProxyAuto"
lo_sr.si_data [ 3 ] = ls_ProxyAuto
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_ProxyPacUrl ) > 0 THEN
li_rc = WebBrowserset ( "ProxyPacUrl", ls_ProxyPacUrl )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "ProxyPacUrl"
lo_sr.si_data [ 3 ] = ls_ProxyPacUrl
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_ProxyPassword ) > 0 THEN
li_rc = WebBrowserset ( "ProxyPassword", ls_ProxyPassword )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "ProxyPassword"
lo_sr.si_data [ 3 ] = ls_ProxyPassword
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_ProxyPort ) > 0 THEN
li_rc = WebBrowserset ( "ProxyPort", ls_ProxyPort )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "ProxyPort"
lo_sr.si_data [ 3 ] = ls_ProxyPort
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_ProxyUser ) > 0 THEN
li_rc = WebBrowserset ( "ProxyUser", ls_ProxyUser )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "ProxyUser"
lo_sr.si_data [ 3 ] = ls_ProxyUser
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_UserAgent ) > 0 THEN
li_rc = WebBrowserset ( "UserAgent", ls_UserAgent )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "UserAgent"
lo_sr.si_data [ 3 ] = ls_UserAgent
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF Len ( ls_UserDataPath ) > 0 THEN
li_rc = WebBrowserset ( "UserDataPath", ls_UserDataPath )
IF go_ac.of_is_debug_mode( ) = TRUE THEN
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = "UserDataPath"
lo_sr.si_data [ 3 ] = ls_UserDataPath
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
END IF
IF go_ac.of_is_debug_mode( ) = TRUE THEN
String ls_key = "remote-debugging-port"
li_rc = WebBrowserset ( ls_key, ls_port )
lo_sr.si_data [ 1 ] = ls_class
lo_sr.si_data [ 2 ] = ls_key
lo_sr.si_data [ 3 ] = ls_port
go_ac.of_get_message( 133, ls_title, ls_msg, lo_sr )
go_ac.of_write_log ( ls_msg )
END IF
RETURN // Return To caller
end subroutine
HTH
Regards ... Chris
1) Use the PB Packager utility to deploy the PB runtime. In there, just make sue that you check the extra PB features that your App is using (ie: Web Browser) and this utility will take care of all the necessary runtime DLL packaging.
2) Use the PB help. Search for the keyword "runtime". Then follow the link "List of runtime files". This will give you a manual check list of what DLL's to manually copy over to the deployment machine.
That's what I did. I used the "Runtime Packager" - with "Webbrower control support" .
All these dll's are well delivered with our executable (they are copied in the executable folder, we didn't use the .msi install).
pbwebbrowser190.dll (and its dependent DLLs: chrome_elf.dll, d3dcompiler_43.dll, d3dcompiler_47.dll, libEGL.dll, libGLESv2.dll, libcef.dll, swiftshader/libEGL.dll, swiftshader/libGLESv2.dll) (and "pbcef190" folder)
The dependent DLL's are in the "pbcef190" subfolder of the executable (if i move them to the main folder, the application crash with minidump files creation).
Even if a file was missing in the user PC, it should work on the dev PC where PB is installed and this is not the case.
Am I Wrong ?