<p>Hi there. I am interested in learning about teams running / maintaining Go software on Windows.</p>
<p>What kind of software do you run and what issues do you face ?</p>
<p>Those of you that happen to be running the same software on both Linux and Windows what is your development workflow and again what kind of challenges do you face ?</p>
<hr/>**评论:**<br/><br/>kardianos: <pre><p>Generally there are no issues / no platform differences between running Go built software on both Linux and Windows. I do it for some business software; I mostly develop on Linux, another dev works on OS X, we deploy to Windows / MS SQL Server as a windows service. Normal command line applications also work fine.</p>
<p>Some software does assume platform specific code, especially watch out for cgo packages. But I encounter those rarely.</p></pre>holyjeff: <pre><p>What lib/pkg you use for win service? Kardianos or nssm?</p></pre>kardianos: <pre><p>I use github.com/kardianos/service (but I'm biased, see my handle)</p></pre>frebb: <pre><p>kardianos/service was awesome to work with. Thanks for it!</p></pre>gopher1717: <pre><p>I'm not OP, but I've used both and both work fine.</p></pre>Sythe2o0: <pre><p>I'm working on a GUI application for Windows/Linux, and the two issues are A) libraries that I'm using claiming to support both platforms but having obvious bugs with specific platforms and B) libraries I want to use that only support one platform specifically, but these complaints are almost solely due to this being a GUI project.</p></pre>gopher1717: <pre><p>What lib are you using for GUI?</p></pre>Sythe2o0: <pre><p>We're building an engine on top of <a href="https://godoc.org/golang.org/x/exp/shiny/screen" rel="nofollow">exp/shiny</a>.</p></pre>shovelpost: <pre><blockquote>
<p>We're building an engine on top of exp/shiny.</p>
</blockquote>
<p>I'd be very interested to see that. Is it open source?</p></pre>Sythe2o0: <pre><p>We're planning on open sourcing it in the next month-ish. </p>
<p>There's a number of things we want to resolve before we make a public release. We have OK documentation but a good amount of the library needs work. We have very few tests. Everyone who has used the project has used Windows so while we've built and run it on linux occasionally there's a good chance we have obscure linux bugs, and we've never run it on osx. </p>
<p>That's not to mention a couple of memory fault bugs that we haven't nailed down the exact cause of (but we know it has something to do with allocating and then deallocating a lot of memory very quickly, usually seen when using a lot of particle effects).</p></pre>holyjeff: <pre><p>Can you give us a screenshot of what it looks like? Feel free to blur out confidential parts :-)</p></pre>Sythe2o0: <pre><p>What part of it do you want to see? This is a particle demo application that I wrote recently: <a href="https://github.com/200sc/particle-demo/blob/master/demo.go" rel="nofollow">code</a>, <a href="http://imgur.com/a/M1CVa#1HBCljq" rel="nofollow">gif</a></p>
<p>This is a text demo: <a href="https://github.com/200sc/rainbow-text/blob/master/core.go" rel="nofollow">code</a>, <a href="http://imgur.com/a/a3uKt" rel="nofollow">gif</a></p>
<p>There's a much larger application with available binaries <a href="https://github.com/200sc/go-compgeo/tree/master/demo" rel="nofollow">here</a>, but the version of oak being used there is a few months old (there's only one severe bug fixed since then, in that the engine might be cripplingly slow on machines with less than 5 cores) and even the binaries in the package are not up to date with the rest of the package: </p>
<p>A game (with binaries) <a href="https://bitbucket.org/StephenPatrick/cliffracers/overview" rel="nofollow">here</a>, even older than the last demo</p>
<p><a href="https://gist.github.com/200sc/707ea930a718930499d176fd55ffc6d8" rel="nofollow">Flappy bird</a></p>
<p><a href="https://gist.github.com/200sc/6c8e9c1c79f0157bbe6c183164065d22" rel="nofollow">Pong</a> (very old)</p></pre>shovelpost: <pre><p>It looks very cool!</p>
<p>How was the experience building on top of the still incomplete <code>exp/shiny</code>?</p></pre>Sythe2o0: <pre><p>Sad, I guess. There's no one really maintaining shiny and no one's using it on windows, so there's been a number of bugs we've run into that we had to raise issues to fix, and it looks like the recent work into shiny hasn't been, say, adding full-screen support or window scaling options or basic window management features but instead work with flex boxes.</p>
<p>Shiny also has it's coordinates completely flipped from what makes sense (quadrant 4 is negative x, negative y), so to draw anything in shiny you need to convert all x and y values to be negative, which is confusing</p></pre>Yojihito: <pre><p>Okay that particle demo application looks cool as hell.</p>
<p>Would make a great screensaver (randomized parameters every x seconds).</p></pre>gopher1717: <pre><p>Thanks!</p></pre>JHunz: <pre><p>The software I work on has a primarily Windows userbase. It's largely been smooth sailing. There have been a few gnarly Windows-specific Go language bugs that popped up, but most of them only affected us because of heavy cgo and Windows API call usage. It's certainly been the easiest language to work with cross-platform that I've ever used.</p></pre>PaluMacil: <pre><p>My team is 100% Windows (26 people) and we generally develop Go or .Net Core under Linux / Docker conditions, so we often run it in Windows a number of times before we make a Dockerfile, and then we're running it in Docker, but the complexity is almost always from Docker, networking, and databases--not Linux. If you write web, terminal, or database heavy things you'll see little difference. For gui libraries, game libraries, and hardware control, you'll see a fair bit more difference.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传