Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fyne bundle ignores -name flag in windows #2395

Closed
luciferchase opened this issue Aug 23, 2021 · 3 comments
Closed

fyne bundle ignores -name flag in windows #2395

luciferchase opened this issue Aug 23, 2021 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@luciferchase
Copy link

Describe the bug:

I tried to package my application like this

fyne package -name "Result Converter" -sourceDir src/gui -os windows -icon src/gui/assets/icon.png

However, instead of "Result Converter.exe", the app is named as simply "gui.exe":

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        23/08/2021  11:58 AM                assets
d-----        19/08/2021  08:10 PM                custom
-a----        23/08/2021  12:26 PM       19361274 gui.exe
-a----        23/08/2021  12:16 PM           5575 main.go

Interestingly, if I go to properties of "gui.exe", the name of the program is stated as "Result Converter" there:

properties

To Reproduce:

Steps to reproduce the behaviour:

  1. Make a folder "test"
  2. Copy the code below to main.go
package main

import (
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/widget"
)

func main() {
	a := app.New()
	w := a.NewWindow("Hello")

	hello := widget.NewLabel("Hello Fyne!")
	w.SetContent(container.NewVBox(
		hello,
		widget.NewButton("Hi!", func() {
			hello.SetText("Welcome :)")
		}),
	))

	w.ShowAndRun()
}
  1. From the root folder, package the application like this
fyne package -name "Custom Name" -sourceDir test -os windows
  1. Instead of "Custom Name.exe", a "test.exe" will be generated in the "test" folder

Device (please complete the following information):

  • OS: Windows
  • Version: 10
  • Go version: 1.17 (should work with 1.16 too I think)
  • Fyne version: 2.04
@luciferchase luciferchase added the unverified A bug that has been reported but not verified label Aug 23, 2021
@andydotxyz andydotxyz added bug Something isn't working and removed unverified A bug that has been reported but not verified labels Aug 23, 2021
@andydotxyz andydotxyz added this to the Aberlour (2.1) milestone Aug 23, 2021
@andydotxyz
Copy link
Member

Good find. It seems to be as a result of the windows packaging not creating a new, final, file after the build - it just overwrites the .exe. This should be fixed.

@andydotxyz andydotxyz added the good first issue Good for newcomers label Aug 23, 2021
andydotxyz added a commit that referenced this issue Sep 28, 2021
Requires a little juggling of .exe extension
Fixes #2395
@andydotxyz
Copy link
Member

That should be fixed on develop now :)

@luciferchase
Copy link
Author

Awesome thanks for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants