fix(mobile): ship EdgeEver launcher icon

This commit is contained in:
tianma-if committed 2026-07-19 16:04:38 +08:00
1 parent 39f9a87ee1
commit ee3f85f4fe
8 files changed
+40 -5

No files matched your search

+5 -3
View File
@@ -3,7 +3,8 @@
"name": "EdgeEver",
"slug": "edgeever",
"scheme": "edgeever",
"version": "0.4.6",
"version": "0.4.7",
"icon": "./assets/icon.png",
"orientation": "portrait",
"userInterfaceStyle": "light",
"newArchEnabled": true,
@@ -13,9 +14,10 @@
},
"android": {
"package": "org.edgeever.mobile",
"versionCode": 12,
"versionCode": 13,
"adaptiveIcon": {
"backgroundColor": "#f8fafc"
"backgroundColor": "#d1fae5",
"foregroundImage": "./assets/adaptive-icon-foreground.png"
}
},
"plugins": [
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="EdgeEver">
<rect x="14" y="10" width="36" height="44" rx="8" fill="#047857" />
<path d="M24 23h18v5H30v5h11v5H30v6h13v5H24V23Z" fill="#f8fafc" />
<path d="M19 16h26" stroke="#6ee7b7" stroke-width="3" stroke-linecap="round" />
</svg>

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@edgeever/mobile",
"version": "0.4.6",
"version": "0.4.7",
"private": true,
"type": "module",
"main": "expo-router/entry",
+1
View File
@@ -16,6 +16,7 @@
"dev:api:remote": "bun scripts/run-wrangler.mjs dev --remote --port 8787",
"dev:web": "vite --config apps/web/vite.config.ts --host 127.0.0.1 --port 5173",
"dev:mobile": "bun --cwd apps/mobile expo start",
"prepare:mobile:icons": "bun scripts/prepare-mobile-icons.mjs",
"build:android:fast": "bash scripts/build-android-local.sh fast",
"build:android:play": "bash scripts/build-android-local.sh play",
"build:android:play:local": "bun --env-file=${EDGE_EVER_ANDROID_ENV_FILE:-$HOME/.config/edgeever/android/signing.env} run build:android:play",
+8 -1
View File
@@ -38,8 +38,15 @@ fi
cd "$PROJECT_ROOT"
bun install --frozen-lockfile
bun run prepare:mobile:icons
PREBUILD_FINGERPRINT="$({ shasum apps/mobile/app.json bun.lock; } | shasum | awk '{print $1}')"
PREBUILD_FINGERPRINT="$({
shasum \
apps/mobile/app.json \
apps/mobile/assets/adaptive-icon-foreground.svg \
apps/web/public/pwa-512x512.png \
bun.lock
} | shasum | awk '{print $1}')"
PREBUILD_STAMP="$ANDROID_DIR/.edgeever-prebuild-fingerprint"
PREVIOUS_FINGERPRINT="$(test -f "$PREBUILD_STAMP" && cat "$PREBUILD_STAMP" || true)"
+20
View File
@@ -0,0 +1,20 @@
import { copyFile, mkdir } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
import sharp from "sharp";
const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const mobileAssetsDir = path.join(projectRoot, "apps/mobile/assets");
const sharedIconPath = path.join(projectRoot, "apps/web/public/pwa-512x512.png");
const mobileIconPath = path.join(mobileAssetsDir, "icon.png");
const adaptiveIconSourcePath = path.join(mobileAssetsDir, "adaptive-icon-foreground.svg");
const adaptiveIconPath = path.join(mobileAssetsDir, "adaptive-icon-foreground.png");
await mkdir(mobileAssetsDir, { recursive: true });
await copyFile(sharedIconPath, mobileIconPath);
await sharp(adaptiveIconSourcePath, { density: 384 })
.resize(1024, 1024)
.png()
.toFile(adaptiveIconPath);
console.log("已同步 Android 图标资源");