feat: sign Android APK and generate icons from logo.png or favicon.ico

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-28 09:01:58 +08:00
parent edf2bdada6
commit 3730b7df3b
9 changed files with 269 additions and 18 deletions

View File

@@ -2,6 +2,7 @@ import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import AdmZip from "adm-zip";
import { generateAppIcons } from "./generate-app-icons.mjs";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const root = path.resolve(__dirname, "../..");
@@ -68,13 +69,6 @@ if (fs.existsSync(androidConfPath)) {
patchTauriConfig(androidConfPath);
}
const iconCandidates = ["icon.png", "favicon.png", "logo.png"];
for (const candidate of iconCandidates) {
const iconPath = path.join(distDir, candidate);
if (fs.existsSync(iconPath)) {
console.log(`Found icon candidate: ${candidate}`);
break;
}
}
generateAppIcons();
console.log("Template prepared successfully");