Installing DeSmuME from source on Windows

From DeSmuME
Revision as of 18:22, 1 August 2014 by Zeromus (Talk | contribs)
Jump to: navigation, search

Contents

Supported Compilers

Since all of the Windows developers make use of Microsoft Visual C++, only that compiler is supported on Windows.

Pre-requisites

Since DeSmuME source code comes with the necessary DirectX files, installation of the DirectX SDK is unnecessary. Also, all of the other dependencies are included in the source code download. The only things you are required to install is a supported compiler, and (when checking out SVN), a SVN client.

Install Microsoft Visual C++ 2008 Express

For a Windows build, you first have to download and install Microsoft Visual C++ Express Edition (which is free). Go to http://www.microsoft.com/express/vc/ , choose your language and download it. Unfortunately this leads to 2010 express edition which is troublesome. If you click around there you can find 2008, but if your skills at clicking are handicapped for some reason, then you can use this link directly to the english version: http://download.microsoft.com/download/A/5/4/A54BADB6-9C3F-478D-8657-93B3FC9FE62D/vcsetup.exe

Retrieving the sources

There are 2 ways you can get the code.


Get code from source tarball

Go to https://sourceforge.net/p/desmume/code/HEAD/tree/ and select “Download Snapshot”.

Immagine 2.png

Download it and open with your archive manager (if you haven’t one, I suggest 7zip at http://www.7-zip.org/).

Immagine3.png

Inside there is another one archive, open it and you’ll see the source code.

Immagine4.png

Extract into a folder of your choice. Now are you ready to compile.

The main advantage here is you don’t need the SVN client, the disadvantage is that every time a new SVN is released you need to download again the entire source tarball.


Get code with SVN client

Go to http://tortoisesvn.net/downloads, download TortoiseSVN, install it then reboot.Now create a folder where the code will be downloaded (ex. D:\Desmume\source). Right click on it and select “TortoiseSVN->Checkout…”

Immagine7.png

Add https://desmume.svn.sourceforge.net/svnroot/desmume/trunk/desmume/ to “Url of Depository”, then press OK.

Immagine8.png


Wait until TortoiseSVN has downloaded all the source files then press OK.

Immagine6.png


Now you’re ready to compile.

The main advantage here is that TortoiseSVN will download only the modified files when you check for a new SVN version, the disadvantage is that the first time take a while to download all the code. When you want to update the source code you only need to do “TortoiseSVN->Update”.

Compile your SVN

In "…/desmume/src/windows" open Desmume2008.vcproj.

Immagine 5.png

Then Visual Studio should open up. Change from the menu to “Release” as showed in the picture then press CTRL+ALT+F7.

Immagine 9.png


You mighy have noticed two other options: Dev+ takes less time to build but lacks of some speed optimization on emulation and Debug that is useful for deeper debugging purpose, using breakpoints and variable watches but much more slower on emulation than Release.


After the compile completes, the executable should be located in "…/desmume/src/windows \__bins\DeSmuME_VS2008_release.exe".

Immagine 10.png

Useful Tips

  • As of SVN revision 1948, all builds are SSE2 enabled. SSE2 is one of the IA-32 SIMD (Single Instruction, Multiple Data) instruction sets. SSE2 was first introduced by Intel with the initial version of the Pentium 4 in 2001. Rival chip-maker AMD added support for SSE2 with the introduction of their Opteron and Athlon 64 ranges of AMD64 64-bit CPUs in 2003. If your computer does not support SSE2, then you can disable it by defining 'NOSSE2', and change it in the VC++ codegen options too.
  • If you have done a previous build, and updated the sources via SVN since then, you should first clean the solution by choosing 'Build / Clean Solution' from the menu.
Personal tools