32 lines
1.0 KiB
Dart
32 lines
1.0 KiB
Dart
class RuntimeOptions {
|
|
const RuntimeOptions({
|
|
this.runtimeLuaRoot = defaultRuntimeLuaRoot,
|
|
this.basePackages = const [],
|
|
this.runtimeVersion = '0.0.0',
|
|
this.hostBuild = 0,
|
|
this.channel = 'dev',
|
|
this.platform,
|
|
});
|
|
|
|
static const defaultRuntimeLuaRoot = 'assets/runtime/lua';
|
|
|
|
final String runtimeLuaRoot;
|
|
|
|
// 框架包 gameId 列表,按顺序先于游戏包加载。
|
|
// 后加载的同名模块覆盖先加载的。
|
|
final List<String> basePackages;
|
|
|
|
// 宿主 Flutter App 当前集成的 Lua Runtime 版本。
|
|
// 远程包可通过 minRuntimeVersion/maxRuntimeVersion 限制兼容范围。
|
|
final String runtimeVersion;
|
|
|
|
// 宿主 App 构建号。远程包可通过 minHostBuild/maxHostBuild 避免旧 App 拉取新包。
|
|
final int hostBuild;
|
|
|
|
// dev/staging/prod 等发布通道,用于服务器和客户端双重筛选远程包。
|
|
final String channel;
|
|
|
|
// 平台名,例如 windows/android/ios。为空时 Runtime 会尝试自动识别。
|
|
final String? platform;
|
|
}
|