Skip to content

Commit

Permalink
feat: ajout du nom et l’icône pour Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
DjLeChuck committed Jun 2, 2024
1 parent ead3f6f commit 528bccf
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,30 @@ import (
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
"github.com/wailsapp/wails/v2/pkg/options/linux"
)

//go:embed all:frontend/dist
//go:embed all:frontend/dist build/appicon.png
var assets embed.FS

const (
appName = "toggl track - Redmine"
)

func main() {
icon, err := assets.ReadFile("build/appicon.png")
if err != nil {
panic(err)
}

appcfg.CreateAppDir()

// Create an instance of the app structure
app := NewApp()

// Create application with options
err := wails.Run(&options.App{
Title: "toggl track - Redmine",
err = wails.Run(&options.App{
Title: appName,
Width: 800,
Height: 770,
AssetServer: &assetserver.Options{
Expand All @@ -33,6 +43,10 @@ func main() {
app,
},
Logger: logger.Create(),
Linux: &linux.Options{
ProgramName: appName,
Icon: icon,
},
})

if err != nil {
Expand Down

0 comments on commit 528bccf

Please sign in to comment.