Closed simias closed 8 years ago
I managed to build rustation on Windows 7, here's the procedure I followed:
I used the 32bit version but the 64bit version should work as well.
By default the setup doesn't add rustc and cargo to PATH but there's an option in the setup to do it, I enabled it.
https://github.com/alexcrichton/gcc-rs#compile-time-requirements
I installed MinGW 32bits (it must match rust's architecture). You can find an installer here:
http://sourceforge.net/projects/mingw/files/MinGW/
Yes, people still use sourceforge in 2015. Try to avoid the malware.
I used the custom package manager because apparently Windows developpers are still stuck in the dark ages.
For 64bit builds you might need http://mingw-w64.org/doku.php but I haven't tried it.
Don't forget to add the path to gcc.exe
to the PATH
in your
environment variables.
It's possible to use Visual Studio's compiler instead by using a
different target triple. I haven't tried it myself because the less I
use VS the better. Look at gcc-rs
' README above for more info.
cd
to the rustation directory.cargo build --release
to build the emulator.You should end up with a linking error since cargo won't find SDL2.dll
Download the 32 or 64bit version depending on the rust/MinGW architecture you chose.
SDL2.dll
in the target/release/
directory inside the rustation
project. It's a bit crappy and there's supposedly a better way by
putting the path to the DLL in .cargo/config
file but I haven't
managed to get it to work.cargo build --release
once again, this time it should make it to the end.Finally you should be able to run the emulator using cargo run --release path\to\bios [path\to\game.bin]
. If you don't provide the
game binary image it'll just boot to the BIOS menu.
The result:
It's not great though, the image flickers a lot and the performance is much worse than on my linux box (even though it has both a weaker CPU and GPU...), probably an OpenGL issue?
Hopefully this is not relevant anymore since we moved to libretro.
Make sure the emulator works on Windows, write a guide on how to build it there.