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

Windows #261

Open
wants to merge 76 commits into
base: master
Choose a base branch
from
Open

Windows #261

wants to merge 76 commits into from

Conversation

refi64
Copy link
Contributor

@refi64 refi64 commented Sep 29, 2016

Closes #201. I still have to figure out why the tests are failing on Travis, but I figured I might as well put this up so that you guys can review.

TL;DR of this pull request: Windows is weird.

@nilnor
Copy link
Contributor

nilnor commented Oct 12, 2016

Re AppVeyor, that would be great. The specs are bound to break pretty fast by mistake otherwise.

@pid = @_process.pid
@working_directory = File opts.working_directory or get_current_dir!
@stdin = OutputStream(@_process.stdin_pipe) if @_process.stdin_pipe
@stdout = InputStream(@_process.stdout_pipe) if @_process.stdout_pipe
@stderr = InputStream(@_process.stderr_pipe, PRIORITY_LOW - 10) if @_process.stderr_pipe
@stdout_done = nil
@stderr_done = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now old cruft

@@ -127,7 +148,14 @@ class Process

send_signal: (signal) =>
signal = signals[signal] if type(signal) == 'string'
C.kill(@pid, signal)
if jit.os == 'Windows'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that sounds good, that will clean up the diffs a lot.

require 'ljglibs.gio.input_stream'
ffi = require 'ffi'
core = require 'ljglibs.core'
{:ref_ptr} = require 'ljglibs.gobject'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to run this PR through the new linter later before merging btw to catch all of these things (e.g. unused var above).

@refi64
Copy link
Contributor Author

refi64 commented Nov 6, 2016

Well, at some point I guess I broke processes again...ugh...

@refi64
Copy link
Contributor Author

refi64 commented Nov 6, 2016

Wow, this is really, really weird...

So, TerminateProcess kind of kills the process, except it doesn't. Apparently, the process gets "killed", but it doesn't actually stop running. If I run something like sleep 2; touch, the exit callback is called, but stdout and stderr stay waiting for sleep 2 to finish. But touch is never run. So it appears the shell is killed, but it waits for the first process to finish first.

And it seems that read_async can actually return an EOF error, but ret never becomes nil. So, my idea:

  • Follow what @nilnor said about doing the callbacks. Again.
  • Put a pcall around read_async, but make sure it was actually an EOF error, not just swallowing everything.

How does that sound?

@markus-oberhumer-forks
Copy link

I would like to try your Windows patch (and possibly add support for cross-compilation in .travis.yml).

Could you please rebase your branch on current master? Thanks.

@shalabhc
Copy link
Contributor

shalabhc commented Apr 3, 2017

@kirbyfan64 - is this PR still good? Maybe we can merge even if not everything on windows is fixed?

@refi64
Copy link
Contributor Author

refi64 commented Apr 28, 2017

@shalabhc Uhh...yeah...

I still can't figure out what the hell is going on with processes. Meanwhile, I just shoved a nasty retry-three-times loop when the troublesome error appears. Messy, but Windows I/O seems to generally only be solvable with retry loops.

As an aside, here's a zip file with the binaries:

https://www.dropbox.com/s/3d3extidx56h1t7/howl.zip?dl=0

(created using the new make windist) and a nice, shiny Inno Setup installer (in wininst.iss):

https://www.dropbox.com/s/7whewn5d43ug6o8/howl-setup.exe?dl=0

@soapdog
Copy link

soapdog commented May 30, 2017

@kirbyfan64 tried both the zip file and the installer on my windows 10 machine. The executable just exited without any error, nothing appeared on the screen. (PS: I don't have msys2 installed, thought maybe it is not needed for running it)

@refi64
Copy link
Contributor Author

refi64 commented Oct 23, 2017

Okay guys, this is really, really bad...

The problem

Basically, everything's broken again, especially since I got a new computer with an upgraded MSYS2 (since the old one kinda...met an unfortunate end):

  • Icons don't work anymore.
  • glib process crud is still broken.
  • Pixbufs don't work, even though I can see the symbols present in the resulting binary.
  • There's this persistent, ugly border that I can't get rid of.
  • I have legit tried to make a binary distribution for several hours, and I still cannot figure out why some (again pixbuf-related) DLLs aren't getting picked up.

Here's the fundamental problem I've noticed: using MSYS for this is never going to work correctly. The entire concept of a UNIX environment that's not really UNIX inside of Windows has caused nothing but endless pain, and I'm incredibly sick of trying to mess with it. It surprises me that these broken binaries are what the GTK+ project recommends using...

The new plan

Screw MSYS2.

I've stumbled upon this GTK+ building project. The new idea is to instead use Visual Studio for building. I have no clue how this is going to end up, but it can't possibly be any worse.

Meanwhile...

I literally set up Howl with my entire custom config to work flawlessly under Windows Subsystem for Linux w/ VcXsrv in under an hour. I'll probably write up somewhere how to install it, but if you're looking for a quick way to get Howl working under Windows until I get everything here working, this is probably the way to go.

@refi64 refi64 mentioned this pull request Nov 10, 2017
@nilnor
Copy link
Contributor

nilnor commented Nov 17, 2017

@kirbyfan64 it sounds like you've had good success with the subsystem for Linux and VcXsrv. Could we (and I really mean you :)) do a detailed write-up of this that we can put on the site as installation instructions?

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

Successfully merging this pull request may close these issues.

6 participants