Embed application icon as a resource and refactor icon usage

Replaced the external `icon.png` file with an embedded resource using Go's embed functionality. Updated all references to use the new resource, eliminating the need for the standalone icon file.
This commit is contained in:
2025-06-01 19:58:28 +05:00
parent 3241b88158
commit 43d794373a
6 changed files with 19 additions and 5 deletions

View File

@@ -1,10 +1,12 @@
package main
import (
_ "embed"
"fyne.io/fyne/v2"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/convertor"
error2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/error"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/handler"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/internal/resources"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/localizer"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/menu"
@@ -16,12 +18,11 @@ var application kernel.AppContract
var ffPathUtilities *kernel.FFPathUtilities
func init() {
iconResource, _ := fyne.LoadResourceFromPath("icon.png")
appMetadata := &fyne.AppMetadata{
ID: "net.kor-elf.projects.gui-for-ffmpeg",
Name: "GUI for FFmpeg",
Version: "0.9.0",
Icon: iconResource,
Icon: resources.IconAppLogoResource(),
}
ffPathUtilities = &kernel.FFPathUtilities{FFmpeg: "", FFprobe: "", FFplay: ""}