Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Bundler on Windows creates console window. #16

Closed
FloThinksPi opened this issue Mar 5, 2018 · 20 comments
Closed

Bundler on Windows creates console window. #16

FloThinksPi opened this issue Mar 5, 2018 · 20 comments
Assignees
Labels

Comments

@FloThinksPi
Copy link

When Opening the Gui of the Demo Project(https://github.com/asticode/go-astilectron-demo) on windows, there is also a empty CLI besides the Electron GUI.

So i suspect the -ldflags -H=windowsgui flag is not set properly in

if e.OS == "windows" {
l["H"] = []string{"windowsgui"}
}

Or does the bundler.json needs any adaption here ?

Best Regards
Florian :)

@asticode
Copy link
Owner

asticode commented Mar 6, 2018

@FloThinksPi are you working on Windows 10 or on a lower version? Which version of Go are you using?

@asticode asticode self-assigned this Mar 6, 2018
@FloThinksPi
Copy link
Author

Hi @asticode I am on Windows 10 and Go 1.10

@asticode
Copy link
Owner

@FloThinksPi Could you test on Go 1.10.1 ? I've tested it with Windows 10 and it's working properly.

@asticode asticode added the bug label Mar 31, 2018
@sebaap
Copy link

sebaap commented Apr 8, 2018

I'm seeing the same behavior on Windows 10 with Go version go1.10.1 windows/amd64

@asticode
Copy link
Owner

asticode commented Apr 9, 2018

ha, so you're building a windows binary from a windows machine?

I'll try that.

@sebaap
Copy link

sebaap commented Apr 9, 2018

Yes, exactly.

@asticode
Copy link
Owner

asticode commented Apr 9, 2018

ok, can anyone test building a windows binary on a linux machine like I did and say whether it works with Go 1.10.1 and Windows 10?

In the meantime I'll investigate building a windows binary with a windows machine.

@sebaap
Copy link

sebaap commented Apr 9, 2018

I tested it building on linux with go version go1.10.1 linux/amd64 and running it on Windows 10 and the problem persists

@asticode
Copy link
Owner

Damn, that's a bummer.

A few questions:

  • are you using any kind of cygwin-based terminals? If so, which ones?
  • which type of console window appears? a windows one or something else?
  • could attach a screenshot here so that I can see exactly?

@FloThinksPi
Copy link
Author

I compiled one on Linux for Windows and will try if this occurs when i am back from Work.
I Use git for Windows in cygwin but the shell that opened was a windows cmd. I will make a scrrenshot also when i am back home.

@sebaap
Copy link

sebaap commented Apr 10, 2018

In my case I used a virtual machine created just for this test, running Linux Mint, to build the Windows executable. Here is a screenshot of how it looks like:

win10

@asticode
Copy link
Owner

Mmm one thing I notice is that the name on the top left of the window is Electron instead of Astilectron demo. Did you use the default demo project? If so that may be a lead...

@sebaap
Copy link

sebaap commented Apr 10, 2018

Yes, I used the default demo project. Just added the environments option in the bundler.json file in order to build it for windows in the linux machine. When building in windows I didn't change anything. In both cases the empty console appears and the window title is Electron

@asticode
Copy link
Owner

asticode commented Apr 11, 2018

@sebaArriagada could you try the following:

  • tell me what is the electron version and the astilectron version used currently in the go-astilectron project
  • make sure all the astilectron projects are up to date (go-astilectron, go-astilectron-bundler, go-astilectron-bootstrap, go-astilectron-demo)
  • go install the bundler again once all the projects are up to date
  • build the demo project and tell me whether you're still experiencing the issue

I want to check whether the problem is caused by an older version of electron or astilectron used.

@sebaap
Copy link

sebaap commented Apr 11, 2018

The versions are:

        VersionAstilectron      = "0.20.0"
        VersionElectron         = "1.8.1"

I managed to get rid of the empty console but I don't know the reason behind it. In the first attemps I did a git clone of the demo repo instead of a go get as the readme file says (my bad, I'm sorry). I'm pretty new in Go, and I'm very used to just clone a repo. Do you know why that append? Is this still a bug?
Thanks for your time.

@asticode
Copy link
Owner

No worries about the git clone: if you do it, others do it, therefore the project needs to be compatible with it :)
The fact that you managed to get rid of the empty console is very good news. I don't know whether this is linked to the Electron version as I think it is.

@FloThinksPi could you:

  • make sure all the astilectron projects (go-astilectron, go-astilectron-bundler, go-astilectron-bootstrap, go-astilectron-demo) are up to date
  • go install the bundler
  • build your project again
  • and tell us whether you see the empty console?

@sebaap
Copy link

sebaap commented Apr 11, 2018

One think I forgot to point out is that I didn't update anything from the tests I did before. The test that work and the ones that not, were built with the same astilectron project's versions (go-astilectron, go-astilectron-bundler and go-astilectron-bootstrap). The only difference was the demo project.

@asticode
Copy link
Owner

hey guys, could you check out the last answer of this issue and see if that helps in any way?

@sebaap
Copy link

sebaap commented Apr 19, 2018

hey @asticode, seems like the last answer is about how to reproduce the problem. I managed to solve it by using go get in linux, but in windows I haven't been able to get rid of the empty console.
Seems to be a go problem, so I gave up with go and decided to go back to javascript.
Anyway, if you need me to test something just let me know.

@asticode
Copy link
Owner

asticode commented May 28, 2018

Hey guys,

Seems like the issue is indeed in GO and will be fixed in the next version: golang/go#24232 (comment). Seems like it will also be backported to 1.10.

I'll close this issue for now, but feel free to reopen it if the problem is still there even after upgrading GO.

Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants