I can't get the TTMSFMXWebBrowser working

Hi, I have the TMS Pack for Firemonkey. But I'm not sure of the version since I can't get this from inside delphi. Anyway.

I am trying to follow these steps but cannot figure out how to get it working. 

http://www.tmssoftware.com/site/fmxwindowssupport.asp

1) Download and Extract http://www.tmssoftware.biz/download/ChromiumFMX.zip
2) Open the package ChromiumFMX.dpk, compile and then install the package.
3) Add the directory where the ChromiumFMX source is located to your Win32 library path in the IDE (ceffmx.pas, ceflib.pas, ...)
4) Navigate to the directory where the TMS Pack/Cloud Pack/WebGMaps/WebOSMaps for FireMonkey source is installed.
5) Open the file FMX.TMSFMXxxxxWebBrowser.Win and comment the line {$DEFINE CHROMIUMOFF}
6) Copy the files inside the lib directory from the extracted ChromiumFMX.zip file to the directory where your application executable is or will be located.
7) Create or open a new or existing project and build your project.

I am having trouble understanding steps 4 .. 6 so far. 
When I add the TTMSFMXWebBrowser to my form, the control has the message "Please follow the instructions..."

Can I get clarification on the steps ?
Thanks.

To start with, what Delphi version do you use?
If you use Delphi 10, these steps are not required, the built-in browser will be used instead.

Delphi XE7 Professional with update 1 installed.  (with firedac and mobile add-on packs installed).
I have a twebbrowser in android working fine. But to my surprise, its not supported in windows under firemonkey framework for multip-platform development. But I do need a browser for firemonkey (windows 7 and 8) since my app will be used on both platforms. This is an non-VCL project. 

I need a browser (mini browser) to display a report from a grid component (not TMS) exported to html. The report is converted to html, (a manifest.html file) that I am using as a preview before finally sending off to print. (initially I searched for a PDF component to help do this but didn't want to spend the extra $100 plus, for this method, so i gave up and found another way)

Hi, 


You need to comment the line  {$DEFINE CHROMIUMOFF} in the tmsdefs.inc file that is present in the installation directory and then recompile your application. When starting it should throw errors and then you need to copy the files from the chromium zip file into the same directory where the executable is located.

Kind Regards, 
Pieter

where is this ?


4) Navigate to the directory where the TMS Pack/Cloud Pack/WebGMaps/WebOSMaps for FireMonkey source is installed.

When using our installer, you need to specify an installation directory. This is the directory where the source is located after installation. By default, this is under C:\Users\Public\Documents\tmssoftware%ProductName%<div>

Replace %ProductName% with the product of your choice.

Kind Regards, 
Pieter

Pieter Scheldeman2015-11-04 16:46:58

in addition to the above step that I need help on..


I tried to see if I could complete this next step: 

5) Open the file FMX.TMSFMXxxxxWebBrowser.Win and comment the line {$DEFINE CHROMIUMOFF}

I searched around the whole c: hard drive for that file:
"FMX.TMSFMXxxxxWebBrowser.Win" and could not find it. I also tried wild-card searches, eg.,
"FMX.TMSFMX*WebBrowser.Win" and still can't locate this file. 

The correct file name is FMX.TMSWebBrowser.Win.pas (TMS Pack for FireMonkey) or FMX.TMSCloudWebBrowser.Win.pas (TMS Cloud Pack for FireMonkey) or FMX.TMSWebGMapsWebBrowser.Win.pas (TMS WebGMaps for FireMonkey) or FMX.TMSWebOSMapsWebBrowser.Win.pas (TMS WebOSMaps for FireMonkey).

ok, I found the "FMX.TMSWebBrowser.Win.pas" file, but it does not have the line {$DEFINE CHROMIUMOFF} in it to rem out.

unit FMX.TMSWebBrowser.Win;


interface


{$I TMSDEFS.INC}


{$IFNDEF CHROMIUMOFF}
{$DEFINE USECHROMIUM}

And I also found the "tmsdefs.inc" file. 

{$J+}
{$R-}
{$B-}
{$C+}
{$T-}


{$DEFINE CHROMIUMOFF}
{$DEFINE FMXLIB}


what is the proper way to REM out a line ?

like this? // {$DEFINE CHROMIUMOFF}
or like this? // $DEFINE CHROMIUMOFF

On my system the file is tmsdefs.inc

I change the appropriate line to read:-

{      $DEFINE CHROMIUMOFF}

Commenting a line is done with to forward slashes:


//{$DEFINE CHROMIUMOFF}

Yes, I was using // {$DEFINE CHROMIUMOFF} in the last compile. Thank you, Pieter.

From what I can tell, I have the following steps completed, but I did not receive any error messages mentioned earlier:


2) Open the package ChromiumFMX.dpk, compile and then install the package.
3) Add the directory where the ChromiumFMX source is located to your Win32 library path in the IDE (ceffmx.pas, ceflib.pas, ...)
4) Navigate to the directory where the TMS Pack/Cloud Pack/WebGMaps/WebOSMaps for FireMonkey source is installed.
5) Open the file FMX.TMSFMXxxxxWebBrowser.Win and comment the line {$DEFINE CHROMIUMOFF}

Also, when people say to compile something, I never know which compile do they are instructing me to use, since there are 4 ways to compile something: 

* compile project, or Ctrl+F9
* build project, or Shift+F9
* compile all projects
* build all projects 

Here is my project 

* design view 
* http://s28.postimg.org/f6x8bgjd9/tmswebbrowser_design_demo1.png

http://s13.postimg.org/tszypyvgj/tmswebbrowser_design_demo1_src.jpg">
* design view source
http://s13.postimg.org/e7in60jif/tmswebbrowser_design_demo1_src.png

Update.  It is working now. 


* first compile the .dpk package. 
then, open the "tmsdefs.inc" file and comment out the line, {$DEFINE CHROMIUMOFF}  to // {$DEFINE CHROMIUMOFF} 
* then, recompile again.. save.. close all.. and shut down the delphi IDE completely
* then launch delphi IDE and follow steps 6 and 7, finished.
6) Copy the files inside the lib directory from the extracted ChromiumFMX.zip file to the directory where your application executable is or will be located.
7) Create or open a new or existing project and build your project.
I am noticing that the browser has a strange behaviour. You can't use a wheelmouse for scrolling the webpage, and when I go to google, and paste an url in my txtURL textbox control, I am noticing that the browser is sometimes copying the text into the google webpage textbox. Very strange considering I have no code doing anything to the browser.

Also, resizing the window causes the refresh painting of the contents to dissapear complete and you have to close down the app.

These are just a few things I quickly noticed so far. I am guessing that there are some pre-initiallizations that need to be applied first, before using the control. 

Is there a good reference source, glossary or tutorial for all the command functions and features ?

Hi, 


The webbrowser in XE7 is based on the opensource delphi embedded chromium webbrowser so the limitations are due to incorrect implementations in this source code and we are not able to modify the source code for our distributions. More information can be found at the followin URL: http://https://code.google.com/p/delphichromiumembedded/

Starting from XE8, the default TWebBrowser implementation is used and no further steps are needed.

Kind Regards, 
Pieter

Well, at least its working and can do the things I need in my current project.  


Thank you for all the help with getting it going, and your tmswebbrowser support for firemonkey in windows!