Installing DeSmuME from source on Windows

From DeSmuME
(Difference between revisions)
Jump to: navigation, search
(Retrieving the sources)
(start updating to vs2015)
Line 1: Line 1:
 +
W-I-P
 +
 
== Supported Compilers ==
 
== Supported Compilers ==
Since all of the Windows developers make use of Microsoft Visual C++, only that compiler is supported on Windows.  
+
Since all of the Windows developers make use of Microsoft Visual Studio, only that compiler is supported on Windows.  
  
== Pre-requisites ==
+
== Prerequisites ==
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.
+
All 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 ==
+
== Install Microsoft Visual Studio Community 2015 ==
For a Windows build, you first have to download and install Microsoft Visual C++ Express Edition (which is free).
+
For a Windows build, you first have to download and install Microsoft Visual Studio Community 2015 (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
+
Download the installer from https://www.visualstudio.com/post-download-vs . This is small; the installer will download the files it needs.
  
 
== Retrieving the sources ==
 
== Retrieving the sources ==
 
There are 2 ways you can get the code.  
 
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”. Due to sourceforge sucking, this may take 1 million years and never finish successfully.
 
Go to https://sourceforge.net/p/desmume/code/HEAD/tree/ and select “Download Snapshot”. Due to sourceforge sucking, this may take 1 million years and never finish successfully.
 
[[Image: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/).  
 
Download it and open with your archive manager (if you haven’t one, I suggest 7zip at http://www.7-zip.org/).  
 
[[Image:Immagine3.png]]
 
  
 
Inside there is another one archive, open it and you’ll see the source code.  
 
Inside there is another one archive, open it and you’ll see the source code.  
 
[[Image:Immagine4.png]]
 
  
 
Extract into a folder of your choice. Now are you ready to compile.
 
Extract into a folder of your choice. Now are you ready to compile.
Line 36: Line 29:
 
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…”
 
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…”
  
[[Image:Immagine7.png]]
+
Add https://desmume.svn.sourceforge.net/svnroot/desmume/trunk/desmume/ to “Url of Repository”, then press OK.
 
+
Add https://desmume.svn.sourceforge.net/svnroot/desmume/trunk/desmume/ to “Url of Depository”, then press OK.
+
 
+
[[Image:Immagine8.png]]
+
 
+
  
 
Wait until TortoiseSVN has downloaded all the source files then press OK.
 
Wait until TortoiseSVN has downloaded all the source files then press OK.
 
[[Image:Immagine6.png]]
 
 
  
 
Now you’re ready to compile.
 
Now you’re ready to compile.
Line 54: Line 39:
 
== Compile your SVN ==
 
== Compile your SVN ==
  
In "…/desmume/src/windows" open Desmume2008.vcproj.
+
In "desmume/src/windows" open DeSmuME.sln
 
+
[[Image: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.
+
 
+
[[Image: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".
+
 
+
[[Image: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.  
+
Then Visual Studio should open up. Change "Debug" to "Release" where you can readily see it on the screen and then press CTRL+ALT+F7.
  
*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.
+
After the compile completes, the executable should be located in "…/desmume/src/windows \__bins\DeSmuME_VS2008_release.exe".

Revision as of 01:06, 13 July 2016

W-I-P

Contents

Supported Compilers

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

Prerequisites

All 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 Studio Community 2015

For a Windows build, you first have to download and install Microsoft Visual Studio Community 2015 (which is free). Download the installer from https://www.visualstudio.com/post-download-vs . This is small; the installer will download the files it needs.

Retrieving the sources

There are 2 ways you can get the code.

Go to https://sourceforge.net/p/desmume/code/HEAD/tree/ and select “Download Snapshot”. Due to sourceforge sucking, this may take 1 million years and never finish successfully.

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

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

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…”

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

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

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 DeSmuME.sln

Then Visual Studio should open up. Change "Debug" to "Release" where you can readily see it on the screen and then press CTRL+ALT+F7.

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

Personal tools