Editing Building RetroArch
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | |||
=Building on Windows= | =Building on Windows= | ||
− | + | Note - the following is for 64-bit Windows only. 32-bit Windows will need to get 32-bit MinGW instead and use 32-bit headers and libs for RetroArch. | |
− | + | Download the prepackaged toolchain from [https://www.dropbox.com/sh/91sakv0qdyxjx9f/0jhM7OoWBP/dev_tools/RetroArch_MinGW64_gcc-4.8.2.7z here]. | |
− | + | Extract it somewhere, for example C:\MinGW. | |
− | + | Run Git Bash.vbs. Then do the following commands: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
git clone https://github.com/libretro/libretro-super.git | git clone https://github.com/libretro/libretro-super.git | ||
cd libretro-super | cd libretro-super | ||
− | + | sh libretro-fetch.sh | |
− | + | You should now have all the libretro organization repositories cloned in the libretro-super folder within your MinGW folder. You can use libretro-fetch.sh again to update all repositories. | |
+ | |||
+ | Just as a tip, always do a "git pull" to update the repository and "make clean" to clean up old build files before building anything. -j sets the number of jobs to do simultaneously, if you have a quad-core CPU, use -j4. | ||
If you change a file in one of the cloned repositories and git won't let you update, do: | If you change a file in one of the cloned repositories and git won't let you update, do: | ||
Line 59: | Line 21: | ||
git pull | git pull | ||
− | It should update after that. If not, delete the whole repository and run | + | It should update after that. If not, delete the whole repository and run libretro-fetch.sh again. |
To change directories/folders do: | To change directories/folders do: | ||
Line 75: | Line 37: | ||
Other basic UNIX shell commands like "ls" can be useful as well. | Other basic UNIX shell commands like "ls" can be useful as well. | ||
− | == | + | ==To build RetroArch:== |
− | + | Download the [http://themaister.net/retroarch-dl/RetroArch-win64-headers.zip headers] and [http://themaister.net/retroarch-dl/RetroArch-win64-libs.zip libs] and extract them to the folder where the RetroArch repository was cloned (in \libretro-super\retroarch if you used the fetch script). Then execute these commands from the Git Bash shell: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | cd libretro-super | ||
cd retroarch | cd retroarch | ||
− | + | git pull | |
− | make clean | + | make -f Makefile.win clean |
− | make | + | make -f Makefile.win -j4 |
− | + | You should see a list of files being compiled, ending with "LD RetroArch.exe". You can then copy the newly compiled retroarch.exe and \tools\retroarch-joyconfig.exe from libretro-super\retroarch to wherever you keep your RetroArch installation. | |
− | == | + | ==To build libretro cores:== |
− | After running the fetch script, you should have a folder for each libretro core in your libretro-super folder | + | After running the fetch script, you should have a folder for each libretro core in your libretro-super folder. For most cores all you need to do is do: |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
git pull | git pull | ||
Line 130: | Line 56: | ||
make -f Makefile.libretro -j4 | make -f Makefile.libretro -j4 | ||
− | If there isn't a | + | If there isn't a Makefile.libretro in the top level, try to find a "libretro" folder within the repository and there should be a makefile in there. After the core is built, it will be in the same folder as the makefile used to compile it. |
− | + | Refer to the [https://github.com/libretro/libretro-super/blob/master/libretro-build-common.sh libretro-build-common.sh] for exact commands for each core. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | You can do to build all cores at once: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | cd libretro-super | |
− | + | sh libretro-build.sh | |
− | |||
− | |||
− | |||
− | + | You may need to open the script in text editor and add the following to the script around line 84 to make it work if you're using the prepackaged toolchain: | |
− | === | + | MAKE=make |
+ | CC=gcc | ||
+ | CXX=g++ | ||
− | + | Cores that build successfully are put in /dist/win in your libretro-super folder. | |
− | |||
− | + | Some cores need special commands for building: | |
− | === | + | ===bSNES Performance=== |
− | + | cd libretro-bsnes/perf | |
+ | make ui='target-libretro' profile='performance' clean | ||
+ | make ui='target-libretro' profile='performance' -j4 | ||
− | === | + | ===bSNES Balanced=== |
− | cd libretro | + | cd libretro-bsnes/balanced |
− | make - | + | make ui='target-libretro' profile='balanced' clean |
+ | make ui='target-libretro' profile='balanced' -j4 | ||
− | + | ===bSNES Accuracy=== | |
− | |||
− | === | + | cd libretro-bsnes |
− | + | make ui='target-libretro' profile='accuracy' clean | |
+ | make ui='target-libretro' profile='accuracy' -j4 | ||
− | + | ===Mednafen=== | |
− | |||
− | |||
− | + | make core=[CORE] clean | |
+ | make core=[CORE] -j4 | ||
− | + | Replace [CORE] with psx for PlayStation, pce-fast for PC-Engine, wswan for WonderSwan, ngp for Neo-Geo Pocket, or vb for Virtual Boy. | |
− | + | Do not bother with snes or gba, those cores do not function correctly on Windows and are based on old versions of bSNES and VBA-M. | |
− | === | + | ===Mupen64plus=== |
− | |||
− | + | To make a build with the dynarec available: | |
− | |||
− | + | make WITH_DYNAREC=x86_64 clean | |
+ | make WITH_DYNAREC=x86_64 -j4 | ||
− | + | ===MAME 2013=== | |
− | ... | + | Download and install [http://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi Python 2.7.5] to the default location. |
− | + | Then do: | |
+ | make -f Makefile.libretro PTR64=1 PYTHON="C:/Python27/pythonw.exe" clean | ||
+ | make -f Makefile.libretro PTR64=1 PYTHON="C:/Python27/pythonw.exe" -j4 | ||
− | + | This core will take a while to build, depending on how fast your CPU is, how many jobs you specify, and how many cores your CPU has. | |
− | + | ==Libretro Super== | |
− | |||
− | |||
− | |||
− | |||
− | + | Libretro-super is a series of scripts used to ease the compilation and installation of each and every libretro emulation core and RetroArch itself. Thus this is the simplest route to a fully functional installation. If you need or want to build each core individually then you can refer to the [https://github.com/libretro/libretro-super/blob/master/libretro-build-common.sh build-common.sh] script for direction. | |
− | + | git clone git://github.com/libretro/libretro-super.git | |
− | + | cd libretro-super | |
− | + | sh libretro-fetch.sh | |
− | + | sh libretro-build.sh | |
− | + | sh libretro-install.sh <path where you'd like RetroArch installed> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |