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

cmd/fyne package can't find FyneApp.toml when -src option has given #3459

Closed
2 tasks done
hismailbulut opened this issue Dec 5, 2022 · 3 comments
Closed
2 tasks done
Labels
question A question has been asked

Comments

@hismailbulut
Copy link
Contributor

hismailbulut commented Dec 5, 2022

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

I am trying to build project with fyne cmd but I get an error:
Missing application icon at "cmd\myapp\Icon.png"

My project structure is like this:

root
--cmd
----myapp
------assets
--------icon.png
------main.go
--pkg
--FyneApp.toml
--Makefile

FyneApp.toml

Website = "https://www.example.com"

[Details]
  Icon = "cmd/myapp/assets/icon.png"
  Name = "myapp"
  ID = "com.myapp.app"
  Version = "0.1.0"
  Build = 50

I am running this command in the root but it doesn't work and gives the error:
fyne package -release -os windows -src cmd/myapp

I tried moving icon to cmd/myapp/Icon.png but it also doesn't work

Moving FyneApp.toml to cmd/myapp and running command fyne package -release -os windows in cmd/myapp works so I think the problem happens only with -src option

What I want is fyne should look FyneApp.toml in cwd and load it from there so I can put FyneApp.toml to root and run fyne package in root

How to reproduce

  1. Create a project with same structure like above
  2. Run fyne package -release -os windows -src cmd/myapp in root

Screenshots

No response

Example code

No response

Fyne version

2.2.3

Go compiler version

1.19.1

Operating system

Windows

Operating system version

11

Additional Information

No response

@hismailbulut hismailbulut added the unverified A bug that has been reported but not verified label Dec 5, 2022
@hismailbulut hismailbulut changed the title fyne/cmd can't find FyneApp.toml when -src option has given cmd/fyne package can't find FyneApp.toml when -src option has given Dec 5, 2022
@andydotxyz
Copy link
Member

I'm not too sure about this and would appreciate others feedback on this.
Currently our tooling assumes that FyneApp.toml is in the same location as the application files (i.e. "srcDir").
This includes things like the apps installer and "fyne get" command.
If this is to be changed it would need to still support this standard way.

What do others think about the request?

@andydotxyz andydotxyz added question A question has been asked and removed unverified A bug that has been reported but not verified labels Jan 4, 2023
hismailbulut added a commit to hismailbulut/fyne that referenced this issue Jan 7, 2023
@hismailbulut
Copy link
Contributor Author

After spending some time with cmd/fyne I agree with you that FyneApp.toml should be in the srcdir. Thats because multiple main fyne applications can be in same project. But the issue still needs to be fixed.

@andydotxyz
Copy link
Member

Thanks. Nice summary. Yes we still need to resolve the issue :)

@andydotxyz andydotxyz added this to the Fixes (v2.3.x) milestone Jan 7, 2023
hismailbulut added a commit to hismailbulut/fyne that referenced this issue Jan 7, 2023
hismailbulut added a commit to hismailbulut/fyne that referenced this issue Jan 7, 2023
hismailbulut added a commit to hismailbulut/fyne that referenced this issue Jan 8, 2023
hismailbulut added a commit to hismailbulut/fyne that referenced this issue Jan 8, 2023
hismailbulut added a commit to hismailbulut/fyne that referenced this issue Jan 8, 2023
andydotxyz added a commit that referenced this issue Jan 25, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix #3459 by changing srcdir to it's absolute path
andydotxyz pushed a commit to andydotxyz/fyne that referenced this issue Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question has been asked
Projects
None yet
Development

No branches or pull requests

2 participants