HOWTO Build the eMule sources with Microsoftİ Visual C++ .NET 2002
The sourcecode of eMule is availible as seperate download at:
http://sourceforge.net/projects/emule
You need Microsoftİ Visual C++ .NET 2002 to compile eMule.
-Unzip the sources (with subdirs) into a new folder
Since eMule v0.29b the separate download and compilation of additional libraries is required. These libs are 3rd party and therefore - as usual - not within our distribution.
Note: You will only have to do all of this (the external libraries) once. Which is largely the reason it is worthwhile to do. This way, eMule doesn't have to distribute the source code for these libraries, source code which NEVER changes, with each distribution.
You need the following libs:
1. Crypto++ v5.1
http://www.eskimo.co...i/cryptlib.html
2. zlib v1.1.4
http://www.gzip.org/zlib/
3. id3lib v3.8.3
http://sourceforge.n...rojects/id3lib/
Download and save their sourcecode one level above the eMule source code folder and compile them (check the eMule-project file to learn about the required foldernames, or adapt them to your needs!).
Recommended directory structure
.\eMule\src
.\eMule\zlib
.\eMule\crypto51
.\eMule\id3lib
Building crypto51 library
Copy the crypto51.zip source package into .\eMule\crypto51 directory and extract all files in that directory.
From within Visual Studio use the File/Open/Project menu command to open the VC 6.0 workspace file .\eMule\crypto51\cryptest.dsw. Confirm each message box opened by VS concerning the project file conversion to the current format.
Build at least the cryptlib Debug and the cryptlib Release solution configurations.
If you get (at least) the following files, everything worked fine.
.\eMule\crypto51\debug\cryptlib.lib
.\eMule\crypto51\release\cryptlib.lib
Building the zlib library
Copy the zlib.zip source package into .\eMule\zlib directory and extract all files in that directory.
Create a VS project with the following properties:
Project location: .\eMule\zlib
Name of the project: libz
Type of project: Win32 Project/Static Library
"Precompiled Headers" No (selectable in the project wizard)
"MFC" No (selectable in the project wizard)
Change the "Runtime Library" option to "Multi-threaded Debug (/MTd)" for the Debug solution configuration and to "Multi-threaded (/MT)" for the Release solution configuration.
Add the following files to the project
adler32.c
compress.c
crc32.c
deflate.c
gzio.c
infblock.c
infcodes.c
inffast.c
inflate.c
inftrees.c
infutil.c
trees.c
uncompr.c
zutil.c
Build the libz Debug and libz Release solution configurations.
If you get (at least) the following two files, everything worked fine.
.\eMule\zlib\debug\libz.lib
.\eMule\zlib\release\libz.lib
Building the id3lib library
Copy the id3lib source package into .\eMule\id3lib directory and extract all files in that directory.
Rename .\eMule\id3lib\config.h.win32 to .\eMule\id3lib\config.h
From within Visual Studio use the File/Open/Project menu command to open the VC 6.0 workspace file .\eMule\id3lib\libprj\id3lib.dsw. Confirm each message box opened by VS concerning the project file conversion to the current format.
Make sure the project options for the id3lib project are:
General Settings:
- Configuration Type: Static Library (.lib)
- Use of MFC: Use Standard Windows Libraries
C/C++ / Code Generation:
- Runtime Library: Multi-threaded Debug (/MTd) ... for the Debug build configuration
- Runtime Library: Multi-threaded (/MT) ... for the Release build configuration
Build the id3lib Debug and id3lib Release solution configurations.
Building eMule
The distributed eMule project file expects to find the libraries and header files in the following sub directories of the .\eMule directory.
Header files
.\crypto51
.\zlib
.\id3lib\include
Library files
.\crypto51\debug\cryptlib.lib
.\crypto51\release\cryptlib.lib
.\zlib\debug\libz.lib
.\zlib\release\libz.lib
.\id3lib\libprj\id3lib.lib
.\id3lib\libprj\id3libD.lib
If you don't want to use the (above noted) recommended directory structure, you have to specify the according include directories and input libraries explicitly in the project settings for C/C++ and Linker in the eMule project properties.
-Open the emule.sln Visual Studio Solution
-If you get an error message like "wrong version of Visual C++", you have to open emule.sln and emule.vcroj with an editor and change some values:
emule.sln: "...Format Version 8.00" to 7.00 if you use Microsoftİ Visual C++ .NET 2002
emule.vcproj: Version="7.10" to 7.00 if you use Microsoftİ Visual C++ .NET 2002
-Select "Release" or "Debug" build in the solution configuration manager
-Build the solution.
-If the compile was successful, the emule.exe is either in the .\eMule\src\Debug or .\eMule\src\Release directory
-When you build a debug dump version, you need the latest dbghelp.dll from Microsoft to run the app
-IMPORTANT:
If you make modifications to eMule and you distribute the compiled version of your build, be sure to obey the GPL license. You have to include the sourcecode, or make it availible for download together with the binary version.
Warning: I will keep this thread open for discussion.. But most likely will update the main post periodically with the good information and corrections and delete the added posts to keep this thread clean. (cit. Unknown1)
This post has been edited by Some Support: 06 May 2005 - 02:17 PM