chore(jcef): 更新缓存数据库日志文件

- 更新 shared_proto_db/metadata/000003.log 文件内容
- 更新 Site Characteristics Database/00003.log 文件内容
- 添加新的数据库条目和元数据记录
- 保持数据库文件格式的一致性
- 删除Vivid2D的内容
- 重写启动加载界面
This commit is contained in:
2026-01-02 17:12:54 +08:00
parent 75bdca05f2
commit 8de2b0f2fe
261 changed files with 4375 additions and 59810 deletions

View File

@@ -1,36 +1,26 @@
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.gradle.internal.os.OperatingSystem
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
plugins {
id 'java'
id 'application'
id 'edu.sc.seis.launch4j' version '2.5.4'
id 'org.openjfx.javafxplugin' version '0.1.0'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false // 关闭 shadow
}
configurations {
all*.exclude group: 'org.openjfx', module: 'javafx'
proguardLib
}
javafx {
version = "21"
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.web' ]
}
// JDK 版本检查
def requiredJavaVersion = 20
def currentJavaVersion = JavaVersion.current().majorVersion.toInteger()
if (currentJavaVersion != requiredJavaVersion) {
throw new GradleException("构建需要 JDK ${requiredJavaVersion},但当前是 JDK ${currentJavaVersion}。请更换 JDK 环境。")
id 'edu.sc.seis.launch4j' version '2.5.4'
}
group = 'com.axis.innovators.box'
version = '0.0.1'
// JDK 版本检查
java {
toolchain {
languageVersion = JavaLanguageVersion.of(20)
}
}
repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
@@ -38,10 +28,28 @@ repositories {
mavenCentral()
}
dependencies {
// === 构建工具 ===
proguardLib files('libs/proguard.jar')
// 操作系统 Native 标识符
def lwjglNatives = ""
if (OperatingSystem.current().isWindows()) {
lwjglNatives = "natives-windows"
} else if (OperatingSystem.current().isLinux()) {
lwjglNatives = "natives-linux"
} else if (OperatingSystem.current().isMacOsX()) {
lwjglNatives = System.getProperty("os.arch") == "aarch64" ? "natives-macos-arm64" : "natives-macos"
}
javafx {
version = "21"
modules = [ 'javafx.controls', 'javafx.graphics', 'javafx.web', 'javafx.swing' ]
}
// 排除冲突的日志和旧版 FX
configurations {
all*.exclude group: 'org.openjfx', module: 'javafx'
all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
dependencies {
// === 测试框架 ===
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
@@ -51,19 +59,15 @@ dependencies {
// === 开发工具 ===
developmentOnly 'org.springframework.boot:spring-boot-devtools'
// === JnaFileChooser ===
// === JnaFileChooser & Swing ===
implementation 'com.github.steos.jnafilechooser:jnafilechooser-api:1.1.2'
implementation 'com.github.steos.jnafilechooser:jnafilechooser-win32:1.1.2'
// === Swing 组件 ===
implementation 'org.swinglabs:swingx:1.6.1'
// === 本地库文件 ===
implementation files('libs/JNC-1.0-jnc.jar')
implementation files('libs/dog api 1.3.jar')
implementation files('libs/DesktopWallpaperSdk-1.0-SNAPSHOT.jar')
implementation fileTree(dir: 'libs', include: ['*.jar'])
// === DJL API ===
// === AI (DJL) ===
implementation platform('ai.djl:bom:0.35.0')
implementation 'ai.djl:api'
implementation 'ai.djl:model-zoo'
@@ -73,12 +77,13 @@ dependencies {
implementation 'ai.djl.onnxruntime:onnxruntime-engine'
runtimeOnly 'ai.djl.pytorch:pytorch-native-cpu:2.7.1'
runtimeOnly 'ai.djl.onnxruntime:onnxruntime-native-cpu:1.3.0'
// === 核心工具库 ===
implementation 'com.google.code.gson:gson:2.10.1' // 统一版本
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.20.0'
implementation 'commons-io:commons-io:2.18.0' // 统一版本
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0'
implementation 'commons-io:commons-io:2.18.0'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'net.java.dev.jna:jna:5.13.0'
implementation 'net.java.dev.jna:jna-platform:5.13.0'
@@ -95,8 +100,8 @@ dependencies {
implementation 'net.bytebuddy:byte-buddy:1.17.6'
// === 反编译工具 ===
implementation 'org.bitbucket.mstrobel:procyon-core:0.6.0' // 统一版本
implementation 'org.bitbucket.mstrobel:procyon-compilertools:0.6.0' // 统一版本
implementation 'org.bitbucket.mstrobel:procyon-core:0.6.0'
implementation 'org.bitbucket.mstrobel:procyon-compilertools:0.6.0'
implementation 'org.benf:cfr:0.152'
// === Java 解析与分析 ===
@@ -110,18 +115,14 @@ dependencies {
// === Web 和网络 ===
implementation 'org.jsoup:jsoup:1.17.2'
implementation 'org.json:json:20231013' // 统一版本
implementation 'org.openjfx:javafx-web:17'
implementation 'org.json:json:20231013'
implementation 'org.openjfx:javafx-web:21'
// === UI 框架 ===
implementation 'com.formdev:flatlaf:3.2.1'
implementation 'com.formdev:flatlaf-extras:3.2.1'
implementation 'com.formdev:flatlaf-intellij-themes:3.2.1'
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.2'
// JavaFX
implementation 'org.openjfx:javafx-controls:21'
implementation 'org.openjfx:javafx-graphics:21'
implementation 'org.fxmisc.richtext:richtextfx:0.11.0'
implementation 'org.controlsfx:controlsfx:11.1.2'
implementation 'com.dlsc.formsfx:formsfx-core:11.6.0'
@@ -133,32 +134,24 @@ dependencies {
implementation 'com.fifesoft:languagesupport:3.3.0'
implementation 'com.fifesoft:autocomplete:3.3.2'
// === 图形和游戏引擎 ===
// LWJGL
implementation 'org.lwjgl:lwjgl:3.3.6'
implementation 'org.lwjgl:lwjgl-stb:3.3.6'
implementation 'org.lwjgl:lwjgl-glfw:3.3.6'
implementation 'org.lwjgl:lwjgl-opengl:3.3.6'
implementation 'org.lwjgl:lwjgl-jawt:3.3.5'
// === LWJGL 图形引擎 ===
def lwjglVersion = "3.3.6"
implementation "org.lwjgl:lwjgl:$lwjglVersion"
implementation "org.lwjgl:lwjgl-stb:$lwjglVersion"
implementation "org.lwjgl:lwjgl-glfw:$lwjglVersion"
implementation "org.lwjgl:lwjgl-opengl:$lwjglVersion"
implementation "org.lwjgl:lwjgl-jawt:$lwjglVersion"
// Lwjgl natives
if (DefaultNativePlatform.currentOperatingSystem.isWindows()) {
runtimeOnly 'org.lwjgl:lwjgl:3.3.6:natives-windows'
runtimeOnly 'org.lwjgl:lwjgl-glfw:3.3.6:natives-windows'
runtimeOnly 'org.lwjgl:lwjgl-opengl:3.3.6:natives-windows'
runtimeOnly 'org.lwjgl:lwjgl-stb:3.3.6:natives-windows'
} else if (DefaultNativePlatform.currentOperatingSystem.isLinux()) {
runtimeOnly 'org.lwjgl:lwjgl:3.3.6:natives-linux'
runtimeOnly 'org.lwjgl:lwjgl-glfw:3.3.6:natives-linux'
runtimeOnly 'org.lwjgl:lwjgl-opengl:3.3.6:natives-linux'
runtimeOnly 'org.lwjgl:lwjgl-stb:3.3.6:natives-linux'
} else if (DefaultNativePlatform.currentOperatingSystem.isMacOsX()) {
runtimeOnly 'org.lwjgl:lwjgl:3.3.6:natives-macos'
runtimeOnly 'org.lwjgl:lwjgl-glfw:3.3.6:natives-macos'
runtimeOnly 'org.lwjgl:lwjgl-opengl:3.3.6:natives-macos'
runtimeOnly 'org.lwjgl:lwjgl-stb:3.3.6:natives-macos'
implementation("com.github.LWJGLX:lwjgl3-awt:bc8daf521a") {
exclude group: "org.lwjgl"
}
// LWJGL Natives
runtimeOnly "org.lwjgl:lwjgl:$lwjglVersion:$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-glfw:$lwjglVersion:$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-opengl:$lwjglVersion:$lwjglNatives"
runtimeOnly "org.lwjgl:lwjgl-stb:$lwjglVersion:$lwjglNatives"
// 其他图形库
implementation 'com.badlogicgames.gdx:gdx:1.12.1'
implementation 'org.joml:joml:1.10.7'
@@ -186,6 +179,10 @@ dependencies {
implementation 'org.xerial:sqlite-jdbc:3.41.2.1'
implementation 'org.postgresql:postgresql:42.6.0'
// === 伪终端与测试容器 ===
implementation 'org.jetbrains.pty4j:pty4j:0.12.13'
implementation 'org.testcontainers:testcontainers:1.19.0'
// === 音频处理 ===
implementation 'jflac:jflac:1.3'
implementation 'com.github.axet:TarsosDSP:2.4'
@@ -207,52 +204,39 @@ dependencies {
implementation 'org.casbin:casdoor-java-sdk:1.37.0'
}
configurations.configureEach {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
// 自动生成构建信息文件
tasks.register('generateBuildProperties') {
group = 'build'
doLast {
def resDir = file("src/main/resources/build")
resDir.mkdirs()
def propertiesFile = new File(resDir, 'build.properties')
propertiesFile.text = """# Auto-generated build information
version=${project.version}
buildTimestamp=${LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME)}
buildSystem=${OperatingSystem.current().isWindows() ? "WINDOWS" : "UNIX"}
"""
}
}
// 复制依赖到 libs 目录
task copyDependencies(type: Copy) {
compileJava.dependsOn generateBuildProperties
// 复制依赖包到构建目录
tasks.register('copyDependencies', Copy) {
group = "build"
from configurations.runtimeClasspath
into "$buildDir/libs/libs"
}
// 原始 jar 打包(不含依赖)
tasks.jar {
dependsOn copyDependencies
archiveBaseName.set("${rootProject.name}")
archiveVersion.set("${version}")
}
// ProGuard 混淆任务
task obfuscateJar(type: JavaExec) {
dependsOn jar
group = "build"
description = "使用 ProGuard 混淆并生成映射表"
mainClass = 'proguard.ProGuard'
classpath = configurations.proguardLib
args = [
'-injars', "$buildDir/libs/${rootProject.name}-${version}.jar",
'-outjars', "$buildDir/libs/${rootProject.name}-${version}-obf.jar",
'-libraryjars', "${System.getProperty('java.home')}/jmods/java.base.jmod",
'-printmapping', "$buildDir/libs/output.srg",
'-keep class com.axis.innovators.box.plugins.**',
'-keep class com.axis.innovators.box.plugins.BoxClassLoader{*;}',
'-keeppackagenames', 'com.axis.innovators.box',
'-keeppackagenames', 'com.axis.innovators.box.plugins',
'-keepnames', 'class com.axis.innovators.box.**',
'-keepnames', 'class com.axis.innovators.box.plugins.**',
'-dontwarn',
'-dontoptimize',
'-dontshrink',
'-keepattributes', 'Signature,InnerClasses,EnclosingMethod,RuntimeVisibleAnnotations,RuntimeInvisibleAnnotations,RuntimeVisibleParameterAnnotations,RuntimeInvisibleParameterAnnotations,Deprecated,SourceFile,LineNumberTable,LocalVariableTable,LocalVariableTypeTable'
]
}
build {
dependsOn obfuscateJar
manifest {
attributes(
'Main-Class': 'com.axis.innovators.box.Main',
'Class-Path': configurations.runtimeClasspath.files.collect { "libs/${it.name}" }.join(' ')
)
}
}
application {
@@ -260,84 +244,11 @@ application {
}
tasks.register('runBoxClient', JavaExec) {
group = "run-toolboxProgram"
description = "执行工具箱程序"
group = "run"
classpath = sourceSets.main.runtimeClasspath
mainClass = "com.axis.innovators.box.Main"
jvmArgs = [
"-Dfile.encoding=UTF-8",
"-Djava.system.class.loader=com.axis.innovators.box.plugins.BoxClassLoader"
]
}
tasks.register('runVivid2DClient', JavaExec) {
group = "run-vivid2D"
description = "执行工具箱程序"
classpath = sourceSets.main.runtimeClasspath
mainClass = "com.chuangzhou.vivid2D.Main"
jvmArgs = [
"-Dfile.encoding=UTF-8"
]
}
tasks.register('test2DModelLayerPanel', JavaExec) {
group = "test-model"
description = "运行 2D Model Layer Panel 测试"
classpath = sourceSets.main.runtimeClasspath
mainClass = "com.chuangzhou.vivid2D.test.ModelLayerPanelTest"
jvmArgs = [
"-Dfile.encoding=UTF-8"
]
}
tasks.register('testModelRenderLightingTest', JavaExec) {
group = "test-model"
description = "运行 2D Model 高亮灯光测试"
classpath = sourceSets.main.runtimeClasspath
mainClass = "com.chuangzhou.vivid2D.test.ModelRenderLightingTest"
jvmArgs = [
"-Dfile.encoding=UTF-8"
]
}
tasks.register('testModelTest', JavaExec) {
group = "test-model"
description = "运行 2D Model 保存和完整性测试"
classpath = sourceSets.main.runtimeClasspath
mainClass = "com.chuangzhou.vivid2D.test.ModelTest"
jvmArgs = [
"-Dfile.encoding=UTF-8"
]
}
tasks.register('testModelTest2', JavaExec) {
group = "test-model"
description = "运行 2D Model 物理基准测试"
classpath = sourceSets.main.runtimeClasspath
mainClass = "com.chuangzhou.vivid2D.test.ModelTest2"
jvmArgs = [
"-Dfile.encoding=UTF-8"
]
}
task printFxPath {
doLast {
// 1. 获取所有运行时依赖文件
def runtimeClasspath = configurations.runtimeClasspath.files
// 2. 筛选出所有名字包含 "javafx" 的 jar 包
def javafxJars = runtimeClasspath.findAll { file ->
file.name.contains("javafx")
}
// 3. 获取这些 jar 包的绝对路径
def javafxPaths = javafxJars.collect { it.absolutePath }
// 4. 使用系统的路径分隔符 (Windows是';', Linux/macOS是':') 将它们连接起来
def modulePath = javafxPaths.join(System.getProperty("path.separator"))
println "========================================================================"
println "COPY THIS JavaFX Module Path: " + modulePath
println "========================================================================"
}
}