@@ -4,6 +4,9 @@ Techsenger CEFFX is a library for integrating the Chromium Embedded Framework in
44of [ JCEF] ( https://github.com/chromiumembedded/java-cef ) (commit d3de827), migrated from Swing to JavaFX. Designed
55specifically for JavaFX, CEFFX provides an optimized and efficient solution for working with Chromium on the platform.
66
7+ CEFFX provides prebuilt native libraries, making it easy to integrate CEF into any JavaFX application without the need
8+ to compile native code from source.
9+
710## Table of Contents
811* [ Demo] ( #demo )
912* [ Features] ( #features )
@@ -15,6 +18,7 @@ specifically for JavaFX, CEFFX provides an optimized and efficient solution for
1518* [ Usage] ( #usage )
1619 * [ Settings] ( #usage-settings )
1720 * [ Threads] ( #usage-threads )
21+ * [ Prebuilt Natives] ( #usage-prebuit-natives )
1822* [ Code building] ( #code-building )
1923* [ Running Demo] ( #running-demo )
2024* [ License] ( #license )
@@ -89,15 +93,38 @@ the application.
8993
9094## Dependencies <a name =" dependencies " ></a >
9195
92- This project will soon be available on Maven Central. :
96+ This project will soon be available on Maven Central:
9397
9498```
99+ <dependency>
100+ <groupId>com.techsenger.ceffx</groupId>
101+ <artifactId>ceffx-natives</artifactId>
102+ <version>${ceffx.version}</version>
103+ <classifier>${ceffx.classifier}</classifier>
104+ </dependency>
95105<dependency>
96106 <groupId>com.techsenger.ceffx</groupId>
97107 <artifactId>ceffx-core</artifactId>
98108 <version>${ceffx.version}</version>
99109</dependency>
100110```
111+ The ` ceffx.classifier ` uses the same values as the OpenJFX classifiers:
112+
113+ * linux (built using the ` ubuntu-22.04 ` GitHub runner)
114+ * win (built using the ` windows-2022 ` GitHub runner)
115+ * mac (built using the ` macos-15-intel ` GitHub runner)
116+ * mac-aarch64 (built using the ` macos-14-arm64 ` GitHub runner)
117+
118+ Note that Maven can determine the ` classifier ` using a ` profile ` . See an example in the demo [ pom.xml] ( java/ceffx-demo/pom.xml ) .
119+
120+ To use snapshot versions, add our repository:
121+
122+ ```
123+ <repository>
124+ <id>repsy-snapshots</id>
125+ <url>https://repo.repsy.io/mvn/techsenger/snapshots</url>
126+ </repository>
127+ ```
101128
102129## Usage <a name =" usage " ></a >
103130
@@ -149,6 +176,40 @@ or intermittently), while others may fail. In addition, this can result in CEF-r
149176
150177As a rule of thumb, if something does not work as expected, it is recommended to first check which thread is being used.
151178
179+ ### Prebuilt Natives <a name =" usage-prebuit-natives " ></a >
180+
181+ CEFFX provides prebuilt native libraries, making it easy to integrate CEF into any JavaFX application without the need
182+ to compile it from source. This section describes all the steps required to set it up.
183+
184+ 1 . Download the minimal CEF distribution from [ CEF] ( https://cef-builds.spotifycdn.com/index.html ) version
185+ ` 146.0.10+g8219561+chromium-146.0.7680.179 ` . Use the Version Filter to locate the correct version. Please note that
186+ other versions will not work, as CEFFX includes a built-in version check.
187+ 2 . Create a directory on your system, for example: ` /foo/cef ` .
188+ 3 . Copy the ` contents ` of the ` Release ` folder from the archive into ` /foo/cef ` .
189+ 4 . Copy the ` contents ` of the ` Resources ` folder from the archive into ` /foo/cef ` .
190+
191+ After that, the ` /foo/cef ` directory should contain the following files (Linux):
192+
193+ ```
194+ chrome_100_percent.pak
195+ chrome_200_percent.pak
196+ chrome-sandbox
197+ icudtl.dat
198+ libcef.so
199+ libEGL.so
200+ libGLESv2.so
201+ libvk_swiftshader.so
202+ libvulkan.so.1
203+ locales
204+ resources.pak
205+ v8_context_snapshot.bin
206+ vk_swiftshader_icd.json
207+ ```
208+ 5 . Add the dependencies to your JavaFX project as described in the [ Dependencies] ( #dependencies ) section.
209+ 6 . On the first run, you need to extract the native binaries from the ` ceffx-natives ` module into ` /foo/cef ` .
210+ Use ` NativeExtractor ` provided by the ` ceffx-natives ` module.
211+ 7 . Set the system property: ` -Djava.library.path=/foo/cef `
212+
152213## Code Building <a name =" code-building " ></a >
153214
154215To build the library use the following commands.
0 commit comments