Truly amazing software. I only recently learned that Crossover, which enables running windows software (mainly games) on MacOS, is built on Wine and significantly contributes to Wine Development.
they employs many devs of Wine (including the project lead, Alexandre Julliard). but technically Wine is still an independent open-source project, and has many contributors from outside Codeweavers.
Anyone have experience with distributing win32 programs for Linux and/or MacOS by bundling wine? I take it that statically linking is out of the question, but I am guessing you could make an AppImage binary for linux that includes wine, and for MacOS you could include wine in the app bundle. I haven't tried either though. I'm interested in this so I can use win32 as a cross-platform desktop GUI library.
Flathub offers the org.winehq.Wine package, which you can use in the base and base-version fields of your own package's manifest. It wouldn't cause your code to be statically linked with Wine. Your package could then be distributed from your own flatpak remote.
There was an announcement about a year ago of an effort to make a paid flatpak market, apparently to be called Flathub LLC. I don't know if that effort is still active.
I think Qt would yield better results than Wine for most things. Since your comment suggests that you're making proprietary software, you would have to take special care with linking or else submit to the Qt Group's commercial license terms.
Too lazy to dig up the PRs, but Flathub doesn't merge Windows applications using the Wine runtime unless the submitter is also the upstream maintainer. They don't mention this requirement anywhere on the docs, they'll only tell you after you've spent 12 hours getting it to work.
As someone who has tried this, I agree that Winelib is the way to go. Just don't go into it expecting it to "just work" without any code changes. Since NTFS is case-insensitive, it's likely that you'll have to fix your include paths to use the right case. If you used any MSVC compiler extensions, you'll likely need to modify your code to not use them or add `#ifdef __GNUC__` with alternative implementations for GCC. GCC's `-fms-extensions` can emulate some of them, but not all. Winemaker can help you with some of the more wrote aspects of this conversion, but not all of it. It will also produce Makefiles for you, but if you want a single build system that works on all platforms, I'd recommend that you use CMake with a CMake toolchain file targeting Winelib and `winegcc` instead. Visual Studio has pretty good CMake support these days, so it should look pretty much like any other Visual Studio solution when you open it there too.
Once you do get it working, you'll notice that on first run of your application Wine will create a `~/.wine` directory and populate it just like it would if you created a new Wine prefix to run a standard Windows application in. Other than that, it will feel pretty seamless. You'll even get a native application launcher for it (which is really just a shell script to run your project's `.exe` under Wine, but it's hidden from the user so it feels native if you don't look too closely.) Compiling against Winelib has the added benefit that you'll only be using win32 features that Wine supports, and can use native platform libraries (if you choose to do so when you're compiling your application, as described in the Winelib User's Guide) mixed with Windows libraries from Wine. It's nicer and works more smoothly than just running a Windows application you compiled with Visual Studio under a bundled version of Wine, in my experience.
I'm sure that you'd be able to bundle it as an AppImage, but I haven't actually tried that part myself.
This started out with bundling wine in appimages, but is expanded a lot. The author created a new appimage alternative that adds some stuff to make games work more reliably. I’ve used this several times to create portable versions of old windows games for my Steam Deck. It’s awesome!
I've seen a few russian pirated game releases for linux do this, they just bundle a copy of wine (downloaded from the same places as e.g. lutris gets it from), and a start script that sets the WINEPREFIX variable to a pre-populated prefix, with the game already installed and all the needed registry configurations already present.
I suppose you could bundle all this in an AppImage, the annoying part however is that the WINEPREFIX is supposed to be read-write, so you'd have to set it to some place specific to your app, to avoid messing with the user's main prefix. These prefixes are huge (hundreds of MB upon creation), so I'm not sure I'd consider this a desireable solution.
If this is your distribution method, consider having the user install wine before running your app.
I don’t have experience but I have heard of winelib which is a library implementing Win32 APIs. I suppose you don’t compile your code as PE executable, but compile to Linux natively while dynamically linking to winelib.
I'm curious why you'd want this over using a GUI library that is actually cross-platform? The way you've worded things suggests to me that you're building something new.
I want to go back to making desktop programs the way we used to before they turned into web apps that bundled chrome. I know I should just use Qt but I have some experience already with win32, and all the programs I have fond memories of are written with it (foobar2000, winamp, Everything, etc).
Congrats on ntsync and new wow64 support! Those are two huge features released last year.
ntsync allows efficient and correct synchronization usage that matches logic of Windows and new wow64 allows running 32-bit Windows programs without 32-bit Linux dependencies.
I didn't know about WoW64 mode. I remember when trying to install an old windows program I had to install a bunch of 32-bit translation library for audio and stuff. This WoW64 means that I can just simply use 64-bit arch. This is fabulous.
I remember I was using Gentoo when I first tried WoW64. I tried it because I didn't feel like compiling all those 32bit libraries. And it turned out that Wine's WoW64 mode worked just fine. It was really handy.
It's a bit different. WoW64 is the technology used to run 32-bit applications on 64-bit Windows. Wine has support WoW64 for a long time. The difference is the "old" wine WoW64 mode required 32-bit libraries on the host side, whereas this "new" WoW64 mode doesn't.
It's a bit different. WOW64 is a compatibility layer that intercepts calls into system libraries from 32-bit apps and translates them into calls to 64-bit libraries. macOS shipped both 32-bit and 64-bit versions of all system libraries, no translation involved.
This is all amazing work. Is there a list of applications/games that previously didn't work that now do (like what Dolphin puts out)? I'd love to understand what the improvements mean in a practical sense.
That gold rating was last tested with wine 5.0 in 2020. I have tried many times to install Office 2016 after that, and failed because Microsoft keeps changing their login/activation front-end. The last time the issue was with some Edge-dependency. For a while it was possible to get it working with Crossover, and then it broke again. Currently I'm using WinApps for the infrequent project that requires MS Office.
That said, I haven't tried Office on wine in the last 2 years, and there have a lot of development in that time...
Go does hardcode system call numbers on Linux, but it doesn't on Windows. Instead it follows the normal Windows convention of calling the userspace wrappers from kernel32.dll and similar libraries.
Unlike on Linux, the low-level syscall numbers on the NT kernel are highly unstable across releases, so programs that try to call them directly will generally only work on a very specific kernel version.
Userland DRMs do all sort of nonsense. Kernel anticheats wouldn't use the syscalls, they're already able to call the kernel routines they want directly.
If you think directly calling Windows syscall is crazy, some applications parse binary code from ntdll.dll to figure out what the syscall numbers actually are, since they change across different Windows versions :)
I’d like to thank them for this, specifically! I had some old applications that weren’t working in the old WoW mode.
they employs many devs of Wine (including the project lead, Alexandre Julliard). but technically Wine is still an independent open-source project, and has many contributors from outside Codeweavers.
Flathub offers the org.winehq.Wine package, which you can use in the base and base-version fields of your own package's manifest. It wouldn't cause your code to be statically linked with Wine. Your package could then be distributed from your own flatpak remote.
There was an announcement about a year ago of an effort to make a paid flatpak market, apparently to be called Flathub LLC. I don't know if that effort is still active.
https://discourse.flathub.org/t/request-for-proposals-flathu...
Winelib might also be worth considering, depending on how you are able to navigate the relevant licenses.
https://gitlab.winehq.org/wine/wine/-/wikis/Winelib-User's-G...
I think Qt would yield better results than Wine for most things. Since your comment suggests that you're making proprietary software, you would have to take special care with linking or else submit to the Qt Group's commercial license terms.
Once you do get it working, you'll notice that on first run of your application Wine will create a `~/.wine` directory and populate it just like it would if you created a new Wine prefix to run a standard Windows application in. Other than that, it will feel pretty seamless. You'll even get a native application launcher for it (which is really just a shell script to run your project's `.exe` under Wine, but it's hidden from the user so it feels native if you don't look too closely.) Compiling against Winelib has the added benefit that you'll only be using win32 features that Wine supports, and can use native platform libraries (if you choose to do so when you're compiling your application, as described in the Winelib User's Guide) mixed with Windows libraries from Wine. It's nicer and works more smoothly than just running a Windows application you compiled with Visual Studio under a bundled version of Wine, in my experience.
I'm sure that you'd be able to bundle it as an AppImage, but I haven't actually tried that part myself.
Good luck!
https://github.com/gameimage/gameimage
This started out with bundling wine in appimages, but is expanded a lot. The author created a new appimage alternative that adds some stuff to make games work more reliably. I’ve used this several times to create portable versions of old windows games for my Steam Deck. It’s awesome!
If this is your distribution method, consider having the user install wine before running your app.
Instead of making your own GUI library, you could just make a shim that translates to whatever framework you want to support.
See: https://learn.microsoft.com/en-us/dotnet/standard/native-int...
https://github.com/Sikarugir-App/Sikarugir
https://github.com/vitor251093/wineskin
Deleted Comment
ntsync allows efficient and correct synchronization usage that matches logic of Windows and new wow64 allows running 32-bit Windows programs without 32-bit Linux dependencies.
WoW64: https://en.wikipedia.org/wiki/WoW64
> https://www.codeweavers.com/blog/jwhite/2019/12/10/celebrati...
Which is kind of funny because yet again windows was a better application in terms of longevity than MacOS native.
[0] https://gitlab.winehq.org/wine/wine/-/releases
That being said, apparently the 2016 version is gold-rated on WineHQ: https://appdb.winehq.org/objectManager.php?sClass=applicatio...
That said, I haven't tried Office on wine in the last 2 years, and there have a lot of development in that time...
Other than antivirus software and maybe MAYBE kernel-level "anticheat" slop - who in their right mind does straight syscalls to the kernel?
https://cs.opensource.google/go/go/+/refs/tags/go1.25.6:src/...
Unlike on Linux, the low-level syscall numbers on the NT kernel are highly unstable across releases, so programs that try to call them directly will generally only work on a very specific kernel version.
Deleted Comment