Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ localization/packages
localization/*.lnk
localization/*.zip
buildDate.json
electron-builder.yml
env-config/env-files*.zip
src/renderer/index.html
*.log*
Expand Down
45 changes: 0 additions & 45 deletions electron-builder.yml

This file was deleted.

43 changes: 31 additions & 12 deletions env-config/genLogoAssets.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,33 @@ const cropped = (svg) =>
const TARGETS = [
// Full-bleed favicon frames: at 16px every spare pixel counts, so the mark's
// own padding is cropped away rather than shrinking it further.
{ out: null, sizes: [16, 32, 48, 64], pad: 1, bg: null, ico: true },
{
sizes: [16, 32, 48, 64],
pad: 1,
bg: null,
ico: true,
// favicon.ico is read from three places: the web root, the Electron auth
// window, and the packaged resources.
icoOutputs: [
'src/renderer/public/favicon.ico',
'src/renderer/favicon.ico',
'resources/favicon.ico',
],
},

// The Windows app/installer icon. Pre-generated and committed rather than
// left for electron-builder to derive from resources/icon.png at build
// time: that derivation shells out to a tool it downloads from GitHub on
// every build, which is one more thing that can go wrong (or differ) on a
// given build agent. Rendered directly from the vector source per size,
// same as the favicon, rather than downscaled from a raster.
{
sizes: [16, 24, 32, 48, 64, 128, 256],
pad: ART.size / VIEWBOX,
bg: null,
ico: true,
icoOutputs: ['resources/icon.ico'],
},

// iOS draws its own rounded-rect mask and never adds padding, and it
// composites any alpha over black — so this one must be opaque.
Expand Down Expand Up @@ -81,8 +107,9 @@ const TARGETS = [
bg: WHITE,
},

// electron-builder derives .icns/.ico from this; 1024 gives macOS a real
// retina source instead of upscaling 512.
// electron-builder derives macOS's .icns from this (and it's the mac build
// icon directly); 1024 gives it a real retina source instead of upscaling
// 512. Windows uses the pre-generated resources/icon.ico above instead.
{
out: 'resources/icon.png',
sizes: [1024],
Expand All @@ -97,14 +124,6 @@ const TARGETS = [
},
];

// favicon.ico is read from three places: the web root, the Electron auth
// window, and the packaged resources.
const ICO_OUTPUTS = [
'src/renderer/public/favicon.ico',
'src/renderer/favicon.ico',
'resources/favicon.ico',
];

/** Pack PNG buffers into an ICO. PNG-compressed entries are read by every
* browser and by Windows Vista and later. */
function buildIco(entries) {
Expand Down Expand Up @@ -230,7 +249,7 @@ async function main() {

if (target.ico) {
const ico = buildIco(rendered);
for (const out of ICO_OUTPUTS) {
for (const out of target.icoOutputs) {
fs.writeFileSync(path.join(root, out), ico);
written.push([out, ico.length]);
}
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "audio-project-manager",
"version": "4.5.1",
"description": "An Electron application with React and TypeScript",
"description": "A flexible audio-text orality solution",
"main": "./out/main/index.js",
"homepage": "./out",
"scripts": {
Expand Down Expand Up @@ -166,7 +166,7 @@
"productName": "Audio Project Manager",
"copyright": "Copyright © 2020-2026 ${author}",
"win": {
"icon": "resources/icon.png"
"icon": "resources/icon.ico"
},
"linux": {
"icon": "debian/audio-project-manager.png",
Expand All @@ -177,8 +177,8 @@
"Encoding": "UTF-8",
"Name": "Audio Project Manager",
"Name[fr]": "Audio Project Manager",
"Comment": "Flexible audio-text orality solution",
"Comment[fr]": "Solution flexible d'oralité audio-textuelle",
"Comment": "A flexible audio-text orality solution",
"Comment[fr]": "Une solution flexible d'oralité audio-textuelle",
"Icon": "audio-project-manager",
"Categories": "GTK;GNOME;Education;Utility;",
"Keywords": "audio;obt;transcribe;ai",
Expand Down
Binary file added resources/icon.ico
Binary file not shown.
Loading