Live data from Hacker News

Cross-compiling binaries for Windows is easier than building natively

gist.github.com

201–210 of 349 posts

Re: Cross-compiling binaries for Windows is easier than building natively

#201

Earlier quoted context omitted.

> Then test with Wine. I tried doing that, and then found that my test suite passes on real Windows but fails on Wine, because it uses APIs which Wine doesn't implement correctly (or at all).

Which APIs are those? A bug filed at https://bugs.winehq.org/ might get some attention.

Waiting on this one.[1]

It's rather impressive that the whole Rend3->WGPU->Vulkan chain for 3D graphics works under Wine, because that's all bleeding-edge stuff. It's only that full screen won't work. Wine reports "fullscreen true stub!", so it's something not implemented yet, rather than something broken.

[1] https://bugs.winehq.org/show_bug.cgi?id=53115

Re: Cross-compiling binaries for Windows is easier than building natively

#202
post #31

Earlier quoted context omitted.

Cargo-bundle was supposed to do that, but only the Mac part was completed. Nobody ever did the .msi output. I've been trying to get someone interested in doing that. That task needs someone very familiar with the Microsoft ecosystem, which I am not. Discussion in Rust tools forum here.[1] [1] https://internals.rust-lang.org/t/cross-platform-bundling/16...

I wonder if InnoSetup could be a good point of reference for anyone interested. It is in Delphi though, but there is also this guide I found whilst trying to figure out if you could run Inno Setup on Linux: https://gist.github.com/amake/3e7194e5e61d0e1850bba144797fd7... Inno Setup was the best and easiest thing for me to ever use but when I was building Windows installers for use from a Windows OS. Update: Found this…

> Found this Cargo package rust-msi.

I looked at that crate. That lets you read and write .msi files, but those are just containers. It doesn't help you set up the rather complicated contents required. Someone who's into the Windows ecosystem could probably use it to do the limited things cargo-bundler does. The neat thing about cargo-bundle is that it only needs the info from the Cargo.toml file to drive the bundling process. Most Windows installer builders involve manually constructing Windows-specific XML files.

Re: Cross-compiling binaries for Windows is easier than building natively

#203
post #21

For me SDK sizes are showstopper. Mingw packages are probably 100-200 Mb total. To build anything native one has to install Windows (20+Gb in modern version and then Visual Studio 40+Gb). Not so easy to fit it all on an SSD drive. Xcode also have this problem now. 8Gb for Xcode 7 is manageable. But why 70Gb for Xcode 11?

How is that too big for an SSD? My computer is ALL SSDs. What kind of shit drives u buying?

Re: Cross-compiling binaries for Windows is easier than building natively

#204
post #81

Earlier quoted context omitted.

The visual studio build tools are substantially smaller than 40GB. My IDE install is about 25GB, and visual studio has distributed the build tools separately since vs2015 - my toolchains directory is about 4GB including whatever dotnet runtimes, windows GDK. > Not so easy to fit it all on an SSD drive. Professionally, no excuse. As an open source or otherwise unpaid pursuit, a 250GB SSD is about $45 on Amazon right n…

It's interesting how people assume that their world is everyone else's... It's easy to forget that there are billions of people for whom $45 is a massive investment, and that SSD isn't so conveniently available even if they have the money. I know I got into programming on a mix of graphing calculators and thrown out PCs, and I also distinctly remember having to work around the download sizes of tooling because I was…

If stretching your budget is so important then enable NTFS compression on your entire drive... I'm storing well over a terabyte of data on my one terabyte drive right now lol

Re: Cross-compiling binaries for Windows is easier than building natively

#205
post #87

Earlier quoted context omitted.

Meanwhile I’d rather serve coffee than be a software developer on any laptop! I can’t fathom developing on anything other than a high-end desktop. M1 is very impressive. But I hate macOS as much, if not more than, you hate Windows. My Threadripper makes me very happy.

Yeah, given the sheer cpu/ram/m.2 power of what even a tiny NUC provides, with modular, replaceable monitor(s)/keyboard/mouse/USB(3/C/Thunderbolt)/HDMI etc, for less than a Mac, I am unable to understand the appeal of a laptop. And I use a i7/64GB/1TB NUC for traveling! I use a twice as powerful Ryzen rack server for my office dev box. 5m extension cables so the noise is in a closet. I have no problems with external…

I got the cheapest M1 Mac Mini when it came out. I got two m.2 NVME drives hooked up to it (1.92TB & 1TB) and a 1TB SATA SSD and a 64GB microSD card along with the built in 250GB drive. No issues. Never have ram issues either with the 8GB. I can compile stuff. Code. Have tabs in my browser. Do stuff in Logic. Edit video. Emulate old computers and systems for games. Dosbox. Parsec to my Windows desktop. Do pretty much anything. Got it hooked up to my 55" 4K HDR TV. Bluetooth Logitech keyboard with touchpad. It's great!

Re: Cross-compiling binaries for Windows is easier than building natively

#206
post #14

It is. I generate the Windows executables for a program by cross-compiling Rust on Linux. Then test with Wine. The Rust crates are cross-platform enough that I don't have to special case platforms. This is easier than having a Windows machine. The only current headache is that there's no pure Rust bundler, to make ".msi" or ".msix" installer files. If you dump the legacy OS stuff, it gets easier.

NSIS (Nullsoft Scriptable Install System)[1] can be compiled[2] for Linux if that's any help. I use that to prepare the install .exe package for a Java based program for one of my clients. [1] https://nsis.sourceforge.io/Main_Page [2] E.g.: https://aur.archlinux.org/packages/nsis / https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=nsis

NSIS is not a substitute. It's good for shipping to home users, but msi installers are essential for enterprise software distribution.

Re: Cross-compiling binaries for Windows is easier than building natively

#207
post #198

Earlier quoted context omitted.

A big reason for that is their commitment to compatibility to past software. They kind of have to because they have people all over the world using old Microsoft software. They finally were just able to kill IE6 and Japan is screaming about it. So they ship a lot of ship a lot of weird software and technology in your words. Google just kills things when they get bored with it. Microsoft can't do that.

that's the classic excuse. but even azure, which was built from the ground up, is pretty weird compared to its major competitors. also, apple showed us how to do this. build the right thing for today and use virtualization to support yesterday until it can be updated. all software is living these days anyhow.

I currently own an iPad which is useless to me because a bunch of apps won't load on it because it's old, including GMail. I have better luck with my old hardware running Windows software.

Re: Cross-compiling binaries for Windows is easier than building natively

#208
post #62

Earlier quoted context omitted.

Their message originally read "Actual Windows developers know NTFS has Symbolic Links"

So it did say "developers" and not "users"? I think they misread the line. (Whether it was right or not, so you don't need to tell me anything about that.)

Would anyone like to explain their downvotes?

From my point of view, even when someone is on the correct 'side' of an argument, if they got there by mistake it's still important to point that out. Both fortran77 and CoastalCoder can be wrong at the same time.

Is "I think you misread that line" far ruder than I thought it was?

...surely "I doubt my mom knows" wasn't supposed to be a developer anecdote that I misunderstood massively?

Re: Cross-compiling binaries for Windows is easier than building natively

#209
post #60
post #42

Earlier quoted context omitted.

Is she a Windows developer? https://docs.microsoft.com/en-us/windows-server/administrati...

The developers who complained to me about this are Windows developers regularly. One is even a professional AAA DirectX gamedev.

Apparently not professional enough to know a feature as old as Windows 2000.

Re: Cross-compiling binaries for Windows is easier than building natively

#210

Mozilla’s automated builds of Firefox for Windows, macOS, Linux, and Android are all cross-compiled on Linux VMs. Cross-compiling is faster and cheaper, especially because Windows’ file I/O and process launching is so slow.

> Windows’ file I/O and process launching is so slow.

It's not Windows' fault, rather it's NTFS.

Post reply on HN