Installing DeSmuME from source on Windows

From DeSmuME
(Difference between revisions)
Jump to: navigation, search
(Retrieving the sources)
 
(28 intermediate revisions by 6 users not shown)
Line 1: Line 1:
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.
+
== Supported Compilers ==
 +
Since all of the Windows developers make use of Microsoft Visual Studio, only that compiler is supported on Windows.  
  
<b>Dev-C++ is not supported!</b>
+
== 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 desmume from source tarball ==
+
== 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 web or ISO installer from the links at https://stackoverflow.com/questions/44290672/how-to-download-visual-studio-community-edition-2015-not-2017#answer-44290942
  
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.vcproj.  
+
Change the installation type to Custom and next. Now make sure you select open up Programming Languages > Visual C++ and select "Common Tools for Visual C++ 2015" and "Windows XP Support for C++". The latter option adds significant size, but it's what desmume is using. Now you can unclick "Windows and Web Development".  
  
Then visual studio should open up. Go to build > configuration manager and change it to Interim SSE2 (if you have an older computer just try interim). 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.  
+
To be clear, this should leave only the two items mentioned above being installed.
  
 +
From there you can proceed with the installation and you'll have what you need.
  
 +
== Retrieving the sources ==
 +
There are 2 ways you can get the code.
  
== Install desmume from svn ==
+
Download it here https://github.com/TASVideos/desmume/archive/master.zip.
  
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.  
+
Open with your archive manager (if you haven’t one, I suggest 7zip at http://www.7-zip.org/).  
  
But for those of you that are gluttons for punishment: 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. Then hit ok, and it should download the current src.  
+
Extract into a folder of your choice. Now are you ready to compile.
  
Then, in desmume/src/windows, open Desmume2008.vcproj. Then visual studio should open up. Go to build > configuration manager and change it to Interim SSE2 (if you have a ghetto computer just try interim). 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.
+
'''The main advantage here is you don’t need the Git client, the disadvantage is that every time a new Git is released you need to redownload the entire source.'''
 +
 
 +
 
 +
''Get code with Git client''
 +
 
 +
You can follow guides which you can find anywhere online for how to clone a git repository. But for some reason we chose to write another guide here. This one may not be great.
 +
 
 +
Go to http://tortoisesvn.net/downloads, download TortoiseGIT, install it then reboot. Now create a folder where the code will be downloaded (ex. D:\Desmume\source). Right click on it and select “TortoiseGit->Clone...”
 +
 
 +
Enter https://github.com/TASVideos/desmume.git for the URL, then press OK
 +
 
 +
Wait until TortoiseGit has downloaded all the source files then press OK.
 +
 
 +
Now you’re ready to compile.
 +
 
 +
'''The main advantage here is that TortoiseGit will download only the modified files when you check for a new Git 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 “TortoiseGit->Pull and click OK”.'''
 +
 
 +
== Compile your SVN ==
 +
 
 +
In "desmume/src/frontend/windows" open DeSmuME.sln
 +
 
 +
Then Visual Studio should open up. Change "Debug" to "Release" where you can readily see it on the screen. If you see x86 nearby, change it to x64. Now press CTRL+ALT+F7.
 +
 
 +
After the compile completes, the executable should be located in "desmume/src/frontend/windows/__bins/DeSmuME-VS2015-x64-Release.exe".
 +
 
 +
== Useful Tips ==
 +
 
 +
If your system can't support Visual Studio 2015, you can use Visual C++ Express 2010 instead. Microsoft has hidden it so you can use this direct URL:
 +
http://download.microsoft.com/download/1/D/9/1D9A6C0E-FC89-43EE-9658-B9F0E3A76983/vc_web.exe . From there, you'll have to improvise. The steps are very similar to what's above. Use DeSmuME_2010.bat instead of DeSmuME.sln, however.

Latest revision as of 06:25, 1 July 2018

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 web or ISO installer from the links at https://stackoverflow.com/questions/44290672/how-to-download-visual-studio-community-edition-2015-not-2017#answer-44290942

Change the installation type to Custom and next. Now make sure you select open up Programming Languages > Visual C++ and select "Common Tools for Visual C++ 2015" and "Windows XP Support for C++". The latter option adds significant size, but it's what desmume is using. Now you can unclick "Windows and Web Development".

To be clear, this should leave only the two items mentioned above being installed.

From there you can proceed with the installation and you'll have what you need.

Retrieving the sources

There are 2 ways you can get the code.

Download it here https://github.com/TASVideos/desmume/archive/master.zip.

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

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

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


Get code with Git client

You can follow guides which you can find anywhere online for how to clone a git repository. But for some reason we chose to write another guide here. This one may not be great.

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

Enter https://github.com/TASVideos/desmume.git for the URL, then press OK

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

Now you’re ready to compile.

The main advantage here is that TortoiseGit will download only the modified files when you check for a new Git 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 “TortoiseGit->Pull and click OK”.

Compile your SVN

In "desmume/src/frontend/windows" open DeSmuME.sln

Then Visual Studio should open up. Change "Debug" to "Release" where you can readily see it on the screen. If you see x86 nearby, change it to x64. Now press CTRL+ALT+F7.

After the compile completes, the executable should be located in "desmume/src/frontend/windows/__bins/DeSmuME-VS2015-x64-Release.exe".

Useful Tips

If your system can't support Visual Studio 2015, you can use Visual C++ Express 2010 instead. Microsoft has hidden it so you can use this direct URL: http://download.microsoft.com/download/1/D/9/1D9A6C0E-FC89-43EE-9658-B9F0E3A76983/vc_web.exe . From there, you'll have to improvise. The steps are very similar to what's above. Use DeSmuME_2010.bat instead of DeSmuME.sln, however.

Personal tools