This commit is contained in:
make
2026-01-10 20:20:09 +08:00
parent f680c97559
commit 7c274497aa
2 changed files with 13 additions and 14 deletions

View File

@@ -2669,20 +2669,18 @@ class SiteStyle
// 持久化 svg便于排查、也便于后续升级 // 持久化 svg便于排查、也便于后续升级
@file_put_contents($svgFile, $svg); @file_put_contents($svgFile, $svg);
// 转 ico16 / 32 // 转 ico16 / 32目前不使用ico
$bin = 'magick'; // $bin = 'magick';
if (!shell_exec('which magick')) { // if (!shell_exec('which magick')) {
$bin = 'convert'; // $bin = 'convert';
} // }
// $cmd = sprintf(
$cmd = sprintf( // '%s %s -background none -define icon:auto-resize=16,32 %s',
'%s %s -background none -define icon:auto-resize=16,32 %s', // $bin,
$bin, // escapeshellarg($svgFile),
escapeshellarg($svgFile), // escapeshellarg($icoFile)
escapeshellarg($icoFile) // );
); // @exec($cmd);
@exec($cmd);
return $strTmpSvgDir; return $strTmpSvgDir;
} }

View File

@@ -20,6 +20,7 @@ location / {
- 4. 上传logo 等图片到img public/statics/img/* - 4. 上传logo 等图片到img public/statics/img/*
- 5. 初始化数据库 `php think db:manage init` - 5. 初始化数据库 `php think db:manage init`
- 5. 初始化数据库 `php think mongo:manag migrate` - 5. 初始化数据库 `php think mongo:manag migrate`
yum install ImageMagick