Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e88bebad3d | ||
| a0eb652098 | |||
|
|
53bfd1c84e | ||
| b179c46e35 | |||
|
|
338e51bcbc | ||
| cce84abfe1 |
@@ -151,7 +151,11 @@ jobs:
|
||||
- name: Prepare release files
|
||||
run: |
|
||||
mkdir -p release-files
|
||||
find artifacts -type f \( -name "*.exe" -o -name "*.AppImage" -o -name "*.nupkg" -o -name "*.apk" -o -name "RELEASES*" \) -exec cp {} release-files/ \;
|
||||
find artifacts -type f \( -name "*.exe" -o -name "*.AppImage" -o -name "*.nupkg" -o -name "RELEASES*" \) -exec cp {} release-files/ \;
|
||||
APK=$(find artifacts -type f -name "*.apk" | head -1)
|
||||
if [ -n "$APK" ]; then
|
||||
cp "$APK" "release-files/Paarrot.apk"
|
||||
fi
|
||||
ls -la release-files/
|
||||
|
||||
- name: Create or Update Release
|
||||
|
||||
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 49 KiB |
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
<color name="ic_launcher_background">#00000000</color>
|
||||
</resources>
|
||||
2
cinny
BIN
icons/1024x1024.png
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
icons/128x128.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
icons/16x16.png
Normal file
|
After Width: | Height: | Size: 839 B |
BIN
icons/24x24.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
icons/256x256.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
icons/32x32.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
icons/48x48.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
icons/512x512.png
Normal file
|
After Width: | Height: | Size: 295 KiB |
BIN
icons/64x64.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
icons/icon.icns
BIN
icons/icon.ico
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 138 KiB |
8
obtainium.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "com.paarrot.app",
|
||||
"url": "http://synbox.ruv.wtf:8418/litruv/cinny-mobile",
|
||||
"author": "litruv",
|
||||
"name": "Paarrot",
|
||||
"overrideSource": "Forgejo (Codeberg)",
|
||||
"additionalSettings": "{\"apkFilterRegEx\":\"Paarrot\\\\.apk\",\"invertAPKFilter\":false,\"autoApkFilterByArch\":true,\"releaseIdSkipPatterns\":[],\"sortMethodChoice\":0}"
|
||||
}
|
||||
6503
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "paarrot",
|
||||
"version": "4.11.74",
|
||||
"version": "4.11.77",
|
||||
"description": "Paarrot - A Matrix client based on Cinny",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
|
||||
@@ -49,6 +49,56 @@ async function generateElectronIcons() {
|
||||
console.log('Generated: icon.icns');
|
||||
}
|
||||
|
||||
/**
|
||||
* Android adaptive icon density configs.
|
||||
* Foreground canvas = 108dp equivalent. Safe zone = center 72dp (66.7%).
|
||||
* Legacy launcher icon = 48dp equivalent.
|
||||
* @type {Array<{density: string, foregroundSize: number, launcherSize: number}>}
|
||||
*/
|
||||
const androidDensities = [
|
||||
{ density: 'mipmap-mdpi', foregroundSize: 108, launcherSize: 48 },
|
||||
{ density: 'mipmap-hdpi', foregroundSize: 162, launcherSize: 72 },
|
||||
{ density: 'mipmap-xhdpi', foregroundSize: 216, launcherSize: 96 },
|
||||
{ density: 'mipmap-xxhdpi', foregroundSize: 324, launcherSize: 144 },
|
||||
{ density: 'mipmap-xxxhdpi', foregroundSize: 432, launcherSize: 192 },
|
||||
];
|
||||
|
||||
/**
|
||||
* Generates Android mipmap launcher icons from the source icon.
|
||||
* The foreground layer centers the content within the adaptive icon safe zone
|
||||
* (72/108dp = 66.7% of canvas), leaving transparent padding for the system mask.
|
||||
*/
|
||||
async function generateAndroidIcons() {
|
||||
const resDir = path.join(rootDir, 'android', 'app', 'src', 'main', 'res');
|
||||
|
||||
for (const { density, foregroundSize, launcherSize } of androidDensities) {
|
||||
const dir = path.join(resDir, density);
|
||||
|
||||
// Foreground layer: content occupies 72/108 of the canvas (safe zone), centered
|
||||
const contentSize = Math.round(foregroundSize * (72 / 108));
|
||||
const padding = Math.round((foregroundSize - contentSize) / 2);
|
||||
|
||||
const foregroundBuffer = await sharp(sourceIcon)
|
||||
.resize(contentSize, contentSize, { fit: 'contain', background: { r: 0, g: 0, b: 0, alpha: 0 } })
|
||||
.extend({ top: padding, bottom: padding, left: padding, right: padding, background: { r: 0, g: 0, b: 0, alpha: 0 } })
|
||||
.png()
|
||||
.toBuffer();
|
||||
|
||||
await fs.writeFile(path.join(dir, 'ic_launcher_foreground.png'), foregroundBuffer);
|
||||
console.log(`${density}/ic_launcher_foreground.png (${foregroundSize}x${foregroundSize}, content ${contentSize}px)`);
|
||||
|
||||
// Legacy launcher icon (ic_launcher, ic_launcher_round) — plain square resize
|
||||
const legacyBuffer = await sharp(sourceIcon)
|
||||
.resize(launcherSize, launcherSize, { fit: 'contain', background: { r: 0, g: 0, b: 0, alpha: 0 } })
|
||||
.png()
|
||||
.toBuffer();
|
||||
|
||||
await fs.writeFile(path.join(dir, 'ic_launcher.png'), legacyBuffer);
|
||||
await fs.writeFile(path.join(dir, 'ic_launcher_round.png'), legacyBuffer);
|
||||
console.log(`${density}/ic_launcher.png + ic_launcher_round.png (${launcherSize}x${launcherSize})`);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
console.log('Generating icons from:', sourceIcon);
|
||||
console.log('');
|
||||
@@ -57,6 +107,10 @@ async function main() {
|
||||
await generateElectronIcons();
|
||||
console.log('');
|
||||
|
||||
console.log('=== Android Mipmap Icons ===');
|
||||
await generateAndroidIcons();
|
||||
console.log('');
|
||||
|
||||
console.log('Done!');
|
||||
}
|
||||
|
||||
|
||||