fawtytoo / ManicMiner

Manic Miner
zlib License
2 stars 3 forks source link

Windows build? #1

Closed monkeyx-net closed 6 months ago

monkeyx-net commented 6 months ago

Hi,

I mainly use linux and have enjoyed playing your excellent Manic Miner and JSW ports :)

I decided to try and compile Manic Miner today for windows and got it compiled and working.

Any interest in sharing the binaries or the build process?

Thanks,

Tim

fawtytoo commented 6 months ago

Absolutely. But, it's been a very long time since I've used Windows, I had been thinking about doing this, but there's a learning curve involved with the likes of Visual Studio so kept putting it off.

So please share anything you have. Does it compile cleanly? Any changes needed?

monkeyx-net commented 6 months ago

It compiles very cleanly with mingw https://www.mingw-w64.org/

I then also installed the mingw64 sdl2 files and it worked without any code changes :)

I can document the versions I used etc. All latest versions . I initially looked at cygwin but that looked light a lot of work!

I think it might also be possible to do this on Linux now with mingw, which is my normal OS. I will see if I can repeat this process with Linux as well.

fawtytoo commented 6 months ago

I'll create a branch for mingw so you can modify.

monkeyx-net commented 6 months ago

Thanks. I've also been looking at msys2 which works on windows and is based on arch.

This would build too using the existing code and makefile.

It should also be possible to build for Windows from Linux but would probably need a modified makefile for building.

I'll try both approaches via the branch.

monkeyx-net commented 6 months ago

Submitted PR with examples of using mingw on Windows and an arch based distro.

fawtytoo commented 6 months ago

I'd rather keep compiling as simple as possible. A Makefile for Linux should suffice. Something specific for Windows would be good. There also needs to be a release for Windows both 32 & 64 bit.

Linux users have less of a hard time compiling than Windows users.

fawtytoo commented 6 months ago

Is there a solution that would also work in Windows 7?

monkeyx-net commented 6 months ago

Hmm. It's possible to build 32 bit binaries. I can but try 😀

On Wed, 8 May 2024, 21:53 fawtytoo, @.***> wrote:

Is there a solution that would also work in Windows 7?

— Reply to this email directly, view it on GitHub https://github.com/fawtytoo/ManicMiner/issues/1#issuecomment-2101428429, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABONRNRN47F6XB3CWZXHZJDZBKGFNAVCNFSM6AAAAABHLF4DLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBRGQZDQNBSHE . You are receiving this because you were assigned.Message ID: @.***>

fawtytoo commented 6 months ago

I appreciate all your effort, but I think providing more and more compiling solutions to a game that is in final release is unfair to those who just want to play the game. It would be better to just simply provide a release for Windows, and if they want to play with the code then they can provide their own solution.

There should ideally be a 32 & 64 bit release with notes on which Window version it works on. I don't know if newer releases of SDL2 would restrict running on older versions of Windows such as 7 or XP (XP maybe a stretch).

fawtytoo commented 6 months ago

Incidentally, how does it play in Windows? I've compiled this today in VS 2015, and it's very jittery. Latest SDL2 2.30.3. Using 2.26.5 in Linux.

EDIT: Could just be a VM thing. I need to get my Windows machine back out.

monkeyx-net commented 6 months ago

It ran fine for me with 32 and 64 bits on Windows 10 running on a KVM/Qemu VM. Abut 36% CPU with 2 vcpu host.

Used the same version of SDL as you. But possibly the mingw compiler is better than VS 2015?

I have not managed to test it on Windows 7 or XP. In theory the 32 bit version should work but might need a different sdl version on xp or win 7? The 32 bit windows version does work on 64 bit machines .