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:
5
main.go
5
main.go
@@ -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: ""}
|
||||
|
Reference in New Issue
Block a user