feat: build licensed desktop image processor

This commit is contained in:
2026-08-26 07:26:35 +08:00
parent 6ff3d71921
commit 1f31424015
32 changed files with 6515 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
const fs = require('node:fs/promises')
const path = require('node:path')
const sharp = require('sharp')
async function main() {
const source = path.resolve(__dirname, '../build/icon.svg')
const output = path.resolve(__dirname, '../build/icon.png')
await fs.mkdir(path.dirname(output), { recursive: true })
await sharp(source).resize(512, 512).png().toFile(output)
process.stdout.write(`icon=${output}\n`)
}
main().catch((error) => {
console.error(error)
process.exitCode = 1
})
+5
View File
@@ -0,0 +1,5 @@
const fs = require('node:fs')
const path = require('node:path')
// 编译前只清理可再生的 Electron 输出,避免旧测试产物被误打进安装包。
fs.rmSync(path.resolve(__dirname, '../dist-electron'), { recursive: true, force: true })