fix Chinese

This commit is contained in:
2026-10-21 01:07:50 +08:00
parent 8e7d3a8c78
commit 794cb30a21
2 changed files with 24 additions and 4 deletions
+2
View File
@@ -4,6 +4,8 @@ Tuanjie Hub 1.4.7,重打包自deb包
使用 FHS 环境运行 Hub 及其安装的编辑器,包含 nixpkgs Unity Hub 打包所列的编辑器、授权服务、Bug Reporter、字体和辅助工具依赖。`libxml2_13` 提供编辑器需要的 `libxml2.so.2`。 使用 FHS 环境运行 Hub 及其安装的编辑器,包含 nixpkgs Unity Hub 打包所列的编辑器、授权服务、Bug Reporter、字体和辅助工具依赖。`libxml2_13` 提供编辑器需要的 `libxml2.so.2`。
Hub 及其启动的编辑器通过独立的 `FONTCONFIG_FILE` 使用静态版 Noto Sans CJK、Core Fonts、DejaVu 和 Liberation 字体,为编辑器内部中文界面提供字体回退。更新软件包后,关闭编辑器和 Hub,再通过 `nix run` 启动。
## 使用 ## 使用
```sh ```sh
+22 -4
View File
@@ -3,11 +3,28 @@
stdenvNoCC, stdenvNoCC,
libarchive, libarchive,
buildFHSEnv, buildFHSEnv,
makeFontsConf,
fontconfig,
noto-fonts-cjk-sans,
corefonts,
dejavu_fonts,
liberation_ttf,
src, src,
}: }:
let let
version = "1.4.7"; version = "1.4.7";
editorFonts = [
(noto-fonts-cjk-sans.override { static = true; })
corefonts
dejavu_fonts
liberation_ttf
];
fontsConf = makeFontsConf {
fontDirectories = editorFonts;
impureFontDirectories = [ ];
includes = [ "${fontconfig.out}/etc/fonts/conf.d" ];
};
unpacked = stdenvNoCC.mkDerivation { unpacked = stdenvNoCC.mkDerivation {
pname = "tuanjiehub-unpacked"; pname = "tuanjiehub-unpacked";
inherit version src; inherit version src;
@@ -40,7 +57,7 @@ buildFHSEnv {
fontconfig fontconfig
freetype freetype
lsb-release lsb-release
]; ] ++ editorFonts;
multiPkgs = multiPkgs =
pkgs: with pkgs; [ pkgs: with pkgs; [
@@ -99,9 +116,6 @@ buildFHSEnv {
vulkan-loader vulkan-loader
libice libice
libsm libsm
corefonts
dejavu_fonts
liberation_ttf
]; ];
extraBuildCommands = '' extraBuildCommands = ''
@@ -112,6 +126,10 @@ buildFHSEnv {
runScript = "/opt/tuanjiehub/tuanjiehub"; runScript = "/opt/tuanjiehub/tuanjiehub";
profile = ''
export FONTCONFIG_FILE="${fontsConf}"
'';
extraInstallCommands = '' extraInstallCommands = ''
mkdir -p "$out/share" mkdir -p "$out/share"
cp -a "${unpacked}/usr/share/". "$out/share/" cp -a "${unpacked}/usr/share/". "$out/share/"