Installing DeSmuME from source on Windows

From DeSmuME
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
== 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 C++, only that compiler is supported on Windows.  
 
+
  
 
== Pre-requisites ==
 
== Pre-requisites ==
Since desmume source code comes with the necessary directx files, installation of the directx sdk is unnecessary. Also, all 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.
+
Since DesMuMe source code comes with the necessary DirectX files, installation of the Directx SDK is unnecessary. Also, all 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++ 2008 Express Editon (which is free).
 +
Go to  http://www.microsoft.com/express/vc/ , choose your language and download it.
 +
 
 +
[[Image:Immagine1.png]]
 +
 
 +
It takes 1,0 Gb amount of space on your Hard Disk. The installation is straightforward and after that you need to reboot your PC.
 +
 
 +
== Retriving the sources ==
 +
There are 2 ways you can get the code.
 +
 
 +
 
 +
''Get code from souce tarball''
 +
 
 +
Go to http://desmume.svn.sourceforge.net/viewvc/desmume/trunk/ and select “Download GNU Tarball”.
 +
 
 +
[[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/).
 +
 
 +
[[Image:Immagine3.png]]
 +
 
 +
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.
 +
 
 +
'''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…”
 +
 
 +
[[Image:Immagine7.png]]
 +
 
 +
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.
 +
 
 +
[[Image: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 ==
  
== Install desmume from source tarball ==
+
In "…/desmume/src/windows" open Desmume2008.vcproj.
  
For a Windows build, you first have to download and install Microsoft Visual C++ 2008 Express Editon at http://www.microsoft.com/express/vc/. Next, you need to unzip/extract the zip file. Then, in desmume/src/windows, open Desmume2008.sln.  
+
[[Image:Immagine_5.png]]
  
Then visual studio should open up. Go to build > configuration manager and change it to Release. Back in the main window, press f7 to compile. After the compile completes, the executable should be located in windows\__bins\DeSmuME_VS2008_sse2.exe or somesuch.
+
Then Visual Studio should open up. Change from the menu to “Release” as showed in the picture then press CTRL+ALT+F7.
  
== Install desmume from svn ==
+
[[Image:Immagine_9.png]]
  
For a Windows build, you first have to download and install Microsoft Visual C++ 2008 Express Editon at http://www.microsoft.com/express/vc/ and TortoiseSVN at http://tortoisesvn.tigris.org. But first, a warning: don't try this unless you know what you are doing, because odds are you will run into trouble or make a non-functioning build that will run slow.  
+
After the compile completes, the executable should be located in "…/desmume/src/windows \__bins\DeSmuME_VS2008_release.exe".  
  
Next, make a folder that you want the desmume src to be in. Then right-click it and do svn checkout. Fill in: https://desmume.svn.sourceforge.net/svnroot/desmume/trunk . Then hit ok, and it should download the current src.  
+
[[Image:Immagine_10.png]]
  
Then, in desmume/src/windows, open Desmume2008.sln. Then visual studio should open up. Go to build > configuration manager and change it to Release.
 
  
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.
+
== Useful Tips ==
  
Back in the main window, press f7 to compile. After the compile completes, the executable should be located in windows\__bins\DeSmuME_VS2008_sse2.exe or somesuch.
+
-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.
+
- 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.

Revision as of 23:14, 27 November 2009

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 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++ 2008 Express Editon (which is free). Go to http://www.microsoft.com/express/vc/ , choose your language and download it.

File:Immagine1.png

It takes 1,0 Gb amount of space on your Hard Disk. The installation is straightforward and after that you need to reboot your PC.

Retriving the sources

There are 2 ways you can get the code.


Get code from souce tarball

Go to http://desmume.svn.sourceforge.net/viewvc/desmume/trunk/ and select “Download GNU Tarball”.

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

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