[solved] CEF files in an own directory lazarus / 21-General ---------------------------------------------------------------------- Nicole · 2025-10-07 12:54 Solution is here: https://forum.lazarus.freepascal.org/index.php/topic,72468.0.html =============== I tried this "inc" thing, which was suggested up from posting #3 in this thread: https://forum.lazarus.freepascal.org/index.php/topic,72409.msg566683.h tml#msg566683 The plan was to write a slim unit and to start anything there from my main form's create event. Not sure, if I dare to post the code attempts. It is that a disaster, that I fear, there is not a single sense making line in it. Anywhere was a line Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$I cef.inc}Not sure, what this means. Is this the file I write? Is it a joker? Is it something I have to get anywhere as file or snipet? The next riddle is "GlobalCEFApp" Is this an stand alone app? The name of my app? I end up with pure chaos of uses-clauses I do not need, compiler directives I am not sure, how to set the comma in connection. Has anybody a block of lines to get the files of Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const Pfad = 'C:\Programmieren\CEFDateien'; into my code? (Pfad = directory, I use German words, not to use reserved words) Or have I misunderstood another time, how a wrapper works? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  unit unit_CEF;// C:\Programmieren\CEFDateien// diese Unit dient dazu, den CEF wrapper einzubinden, dessen Datein in obigem Verzeichnis liegen// das Programm ist aus Create des Forms aufzurufen, die den Browser einbinden will// dabei lasse ich die dlls, die für shtml zuständig sind, im Hauptverzeichnis liegen.// diese Dateien haben ca 100 MB und sind statisch. D.h. sie werden nicht täglich gesichert,// sondern liegen in "Backup" {$mode ObjFPC}{$H+} interfaceuses Classes, SysUtils;   Procedure Initialisiere_CEF;   const Pfad = 'C:\Programmieren\CEFDateien'; implementation //Die CEFDateien Dateien müssen im selben Verzeichnis wie die "executables" liegen.//Will ich das nicht, so steht unten, wie ich sie manuell einrichten kann.//Hinweis: Die Dateien müssen zu Win 7 und dem Wrapper passen .  // **************************************************************** ********// ***************************** CEF4Delphi *******************************// ************************************ ************************************//// CEF4Delphi is based on DCEF3 which uses CEF3 to embed a chromium-based// browser in Delphi applications.//// The original license of DCEF3 still applies to CEF4Delphi.//// For more information about CEF4Delphi visit ://       https://www.briskbard.com/index.php?lang=en&pageid=cef////        Copyright © 2018 Salvador Díaz Fau. All rights reserved.//  // program SimpleBrowser2;  // CEF3 needs to set the LARGEADDRESSAWARE flag which allows 32-bit processes to use up to 3GB of RAM.// If you don't add this flag the rederer process will crash when you try to load large images.   Procedure Initialisiere_CEF;begin  //{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}  //GlobalCEFApp := TCefApplication.Create;   // In case you want to use custom directories for the CEF3 binaries, cache and user data.  // If you don't set a cache directory the browser will use in-memory cache.{  GlobalCEFApp.FrameworkDirPath     := 'c:\cef';  GlobalCEFApp.ResourcesDirPath     := 'c:\cef';  GlobalCEFApp.LocalesDirPath       := 'c:\cef\locales';  GlobalCEFApp.EnableGPU            := True;      // Enable hardware acceleration  GlobalCEFApp.cache                := 'c:\cef\cache';  GlobalCEFApp.UserDataPath         := 'c:\cef\User Data';}  //GlobalCEFApp.FrameworkDirPath     := Pfad;//GlobalCEFApp.ResourcesDirPath     := Pfad;//GlobalCEFApp.LocalesDirPath       := Pfad + '\locales';//GlobalCEFApp.EnableGPU            := True;      // Enable hardware acceleration  end; //GlobalCEFApp.cache                := 'c:\cef\cache';//GlobalCEFApp.UserDataPath         := 'c:\cef\User Data';    // You *MUST* call GlobalCEFApp.StartMainProcess in a if..then clause  // with the Application initialization inside the begin..end.  // Read this https://www.briskbard.com/index.php?lang=en&pageid=cef   {  if GlobalCEFApp.StartMainProcess then    begin      Application.Initialize;      {$IFDEF DELPHI11_UP}      Application.MainFormOnTaskbar := True;      {$ENDIF}      Application.CreateForm(TForm1, Form1);      Application.Run;    end;   GlobalCEFApp.Free;  GlobalCEFApp := nil;end.   } end. ---------------------------------------------------------------------- salvadordf · 2025-10-07 16:01 I recently removed almost all include files in the Lazarus demos of CEF4Delphi but older releases (your case) still have them. You can ignore them safely. GlobalCEFApp is the central class that loads and initializes CEF. Read these documents for more information : https://github.com/salvadordf/CEF4Delphi/wiki https://www.briskbard.com/index.php?lang=en&pageid=cef ---------------------------------------------------------------------- salvadordf · 2025-10-07 16:03 By the way, this is the general Lazarus forum and I can't read it everyday. See the CEF4delphi developers forum for more information about this component : https://www.briskbard.com/forum/ ---------------------------------------------------------------------- paule32 · 2025-10-07 16:04 CEF4 comes with a Lazarus Package. Install it, and all will be gone your needs. There, you can find all what you need: https://kallup.net/chmviewer/ ---------------------------------------------------------------------- paweld · 2025-10-07 16:11 This post contains the answer to your question: https://forum.lazarus. freepascal.org/index.php/topic,72429.msg566975.html#msg566975 ---------------------------------------------------------------------- Nicole · 2025-10-07 16:55 Sure, all the knowledge is out there. And probably on my HD. And may be at my screen. Unfortunately, the answer hides in hundreds of 100 MB. I cannot see it. The thing I would like to have is a demo, which starts a browser window. This wonderful "simplebrowser.exe", this would be great to have as source in Lazarus being able to start by myself.