Read a MU source package before you open Visual Studio
Safe checks to make first: is it source or server files, what the solution and project files ask for, what else the code needs, build events, and the settings folders. Real examples from the kayito MuEmu 0.97k package.
Covers: General method. Examples from kayito MuEmu 0.97k (README changelog up to Update 27).
1. Why read the package first
A MU source package is usually one big .zip or .rar. Before you open Visual Studio, a few minutes of reading tell you what the package is, what it needs and whether it is source code at all. This lesson shows the checks, with the real files of the kayito MuEmu 0.97k package as the example (MuEmu-0.97k-kayito-master.zip; the full walk through is the lesson kayito MuEmu 0.97k: the source package, built step by step).
Nothing here runs a program from the package. Reading file names and text files is safe; running an .exe, a .bat or a .reg file you have not checked is not.
2. Unpack safely
- Unpack each package into its own new, empty folder, never onto your Desktop or into a Windows folder.
- Some archives are password protected. The password is on the release page you downloaded from. Never guess one.
- You can list an archive without unpacking it. For a
.zipin PowerShell:
Add-Type -AssemblyName System.IO.Compression.FileSystem
$z = [System.IO.Compression.ZipFile]::OpenRead("C:\path\to\package.zip"); $z.Entries.FullName; $z.Dispose()- Read the
READMEfirst. In the kayito packageREADME.mdnames the emulator (MuEmu), the main base (0.97k, 0.97.11 KOR), what is inside and a changelog. It is written in Spanish, and a translation tool is enough to read it.
3. Is it source code or server files?
| File type | What it is |
|---|---|
.sln | A Visual Studio solution: the list of projects that belong together. You open this one. |
.vcxproj | A C++ project (Visual Studio 2010 and newer) |
.csproj | A C# project |
.cpp, .h, .cs | The source files |
.ini, .dat, .txt | Settings and data files |
.exe, .dll | Programs somebody already built |
These meanings are general Microsoft naming, not something the package tells you. If an archive has .exe files and settings but no .sln and no project files, it is a server files release, not source code.
The kayito package has four solutions: Source\Client\Client.sln, Source\MuServer\MuServer_Ex097.sln, Source\Tools\kayitoTools\kayitoTools.sln and Source\Tools\kayitoEditor\kayitoEditor.sln. It also has ready-made .exe files, so one package can hold both source and a built copy.
4. What the project files ask for
Open a .vcxproj in a text editor and look for these lines. In all six C++ projects of the kayito package they read:
<PlatformToolset>v141</PlatformToolset>
<WindowsTargetPlatformVersion>10.0.22621.0</WindowsTargetPlatformVersion>
<CharacterSet>MultiByte</CharacterSet>The top of the .sln shows # Visual Studio 15 and VisualStudioVersion = 15.0.33919.361.
In Microsoft's naming, the number after v is the toolset (compiler version) the project asks for:
| PlatformToolset | Visual Studio |
|---|---|
| v100 | 2010 |
| v110 | 2012 |
| v120 | 2013 |
| v140 | 2015 |
| v141 | 2017 |
| v142 | 2019 |
| v143 | 2022 |
This is what the project asks for. It is not proof of which Visual Studio the author used. A newer Visual Studio can offer to "retarget" the project to its own toolset; whether the code still compiles then is something you have to test.
Also note in the same files:
ConfigurationType(Applicationis a program,DynamicLibraryis a.dll). In the kayito packageMainis aDynamicLibraryand the servers areApplication.- The platform: the kayito package builds Win32 (32 bit) only.
- The configuration names: Debug and Release, and in
JoinServerandDataServeralsoDebug_MySQLandRelease_MySQL. OutDir: where the finished program is written. In the kayito package it is$(SolutionDir)bin\$(Configuration)\$(ProjectName)\for most projects.
5. What else the code needs
A dependency is anything the code needs that is not in the project itself. Look in four places:
- The linker input in the project file (
AdditionalDependencies).ConnectServerof the kayito package listsUser32.libandGdi32.lib. - Library lines inside the source. Search the source folder for
#pragma comment(lib. InConnectServer\stdafx.hlines 24 and 25 adddbghelp.libandws2_32.lib. - Headers that do not come with the Windows SDK. Search for
#include <atl.GameServer\stdafx.h, line 23, includes<atltime.h>, which comes with the Visual Studio C++ components, soGameServerneeds ATL installed. - Include and library folders in the project, and
packages.configorPackageReferencefor C#. The kayitokayitoEditor.csprojlists 16 package references and itspackages\folder is not in the zip.
Then check for build steps that run commands. Search every project file for PreBuildEvent, PreLinkEvent, PostBuildEvent, CustomBuild and Exec. The projects of the kayito package have none. A project that has one can copy or delete files, so read the command before you build.
Finally, look at the .vcxproj.user files. In the kayito package Main.vcxproj.user and GameServer.vcxproj.user hold the author's debugger path ($(SolutionDir)..\..\..\Test\Client\main.exe and ...\Test\MuServer\GameServer\GameServer.exe). It only matters when you press F5, and that Test folder is not in the zip.
6. Settings and data
Look at the folders that are not source: in the kayito package MuServer\ has the server settings and the start scripts, Encoder\ has the client settings (MainInfo.ini) and Client\ has the client data. Which settings must agree with each other is the second half of the kayito lesson.
7. Write down what you found
Before you build, write one note per package: the name and version on the README, the solutions, the toolset and SDK the projects ask for, the extra dependencies, any build events, and the settings files. When a build fails later, this note is the first thing to compare against.
Related video tutorials
Found a mistake or a missing step?
Send a correction. A moderator checks it first; an approved correction earns Community Points under the rules on the Contribute page.



