Newbie Spellweaver
- Joined
- Jan 19, 2013
- Messages
- 41
- Reaction score
- 20
Yeah, yeah no poop guys ..
You finally going to build your sexy source code in visual studio 2012 ..
It took me few hours to figure it out.
But finally I did it
Ok, the best part of this tutorial is that I'm going to teach you how to compile it in VS12.
that's mean that you can just use your current source code, and just move to VS12.
Ok that's enough !! ;D
Let's build this motherlover in VS12 <3
Note: What source code we are going to build ?
I only tested it with the jur13n's source code. (Thread's Link)
But this tutorial will help you with every source code.
Step 1: Open up the project file
I'm going to unrar it from the jur12n's source code.
So we are going to do everything from scratch.
First thing you going to do is to backup your project, if you just downloaded the source code of jur12n's then you don't really have to, but if you using your own source. it may fucked up your source code.
I'm sure in 100% that it won't happen, but who know ;D
Ok, let's get started.
I'm now going to folder Source > Gunz > Gunz.sln (Project file, dah)
Note: The compiler will tell you that he updated the project to VS12, just press OK.
and ofc will open crappy url .. just igonre it ..
Step 2: Setting up the projects
First thing you wanna do is to change the debug mode, or whatever it called to _Encrypt_KOR_Realse_public then will setup everything in the project's propeties. in each project.
So let's make our life a lot easier, and just disable the whole warnnings that we gonna get during the build.
So, you are going to do it in every single project (all the 10)
Tip: You can just click on the next project and it will replace the current 'Propeties window'.
So, right click on the 'project' > Propeties.
In the window that popped up go to C/C++ > Advenced
under Disable Specific Warnnings
Paste it:
Remember! in every single project!
Okay, we done with this stupid warnnings.
Let's go now to CSCommon > Propeties > C/C++ > Command Line
and paste it:
DO THE SAME FOR Gunz project!
After you did the same for Gunz prject, we still need to change things there ..
so ..
go to Build Events > Pre-Build Event > Command Line
You see this poop ?
Good, now DELETE THIS FAG!
One more thing to do in Gunz's project.
go to Linker > Advenced > Image Has Safe Exception Handlers (the last one)
and change the Yes (/SAFESEH) to No (/SAFESEH:NO)
That's all guys, we done with the projects propeties xD
Step 3: Fix all the errors!
oke, let's do it project by project.
Project 'cml':
First thing you wanna do is to know what errors we got ..
Right click on the project > Build.
First error:
go to this line.
and we got that:
We don't care about it, we gonna go to the loop that we got there.
I'm talking about this one (the only one ;D):
You see the 'int' ? delete it, and on the top of this loop we will write:
So we got:
Next error:
Relax, I know you got ton of errors under it, don't worry we will fix them all with few little changes.
double click on that error.
now all we need to scoll a little untill we see:
Under it add:
Oke, let's build cml project and see what we got now ..
So again, right click > Build.
This one looks easy ;D
the only thing we need to do is just add '(PENUMLOADED_MODULES_CALLBACK)' before the EnumLoadedModulesCallback.
I marked the changes:
Final error:
Easy, I marked the changes:
Ok let's build the project again ! and guess what ? Our first succeeded project in VS12 ;D
Project 'CSCommon':
Like the first project, Let's build it and see what we got.
Same as we did with cml, in this line:
we will delete the 'int' and add it again above the loop.
Nah, took me few mins to fix it ;D
What can I say ? I'm good with errors ;D
Oke so you see that the error is on MMatchDebug.cpp right ?
Right click on the and choose Open Containing Folder
Sweet, now download my header <3
Download:
Now, put it in the folder that you opened .. (CSCommon\Source)
Go back to MMatchDebug.cpp and add it on top:
BAM, we fixed this badass.
We got teh codz <3
Build this sexy project and guess wut ! another succeeded project ;D
Project 'Gunz':
Build this project, it will take a few mins ..
EASY:
Delete the 'int' from the loop, and add it on top.
Just add 'int'
Delete the 'int' from the loop above and add it ..
Same thing, delete 'int' and add above.
Delete 'int' and add above ..
You see that loop with the 'int j' ? delete it and add above.
add 'int'
You have to do that also for the second one ..
Scroll up until you see:
Yes, you right we are going to delete the int and add it above.
Again for the loop above ..
Same thing ..
add size_t ..
Add '//' before every line.
Again .. comment it ..
Same thing for all those errors ..
Fix:
Do the same for the next one ..
add 'int' ..
Yesh you guess right .. add (char*) before every strstr func ..
Build the project ..
we got this:
Ok .. easy error
In the Gunz project .. click the arrow next to it ..
Now you see 'Gunz.exe.manifest' ? Delete it !
You gonna get an error .. ignore it ..
Build the project and ... BOOM ! You got it ;D
You welcome
Now do me a favor and delete Visual Studio 2003 :0
Credits: ME! and google <3
Yo admin .. stick this sexy thread.
You finally going to build your sexy source code in visual studio 2012 ..
It took me few hours to figure it out.
But finally I did it
Ok, the best part of this tutorial is that I'm going to teach you how to compile it in VS12.
that's mean that you can just use your current source code, and just move to VS12.
Ok that's enough !! ;D
Let's build this motherlover in VS12 <3
Note: What source code we are going to build ?
I only tested it with the jur13n's source code. (Thread's Link)
But this tutorial will help you with every source code.
Step 1: Open up the project file
I'm going to unrar it from the jur12n's source code.
So we are going to do everything from scratch.
First thing you going to do is to backup your project, if you just downloaded the source code of jur12n's then you don't really have to, but if you using your own source. it may fucked up your source code.
I'm sure in 100% that it won't happen, but who know ;D
Ok, let's get started.
I'm now going to folder Source > Gunz > Gunz.sln (Project file, dah)
Note: The compiler will tell you that he updated the project to VS12, just press OK.
and ofc will open crappy url .. just igonre it ..
Step 2: Setting up the projects
First thing you wanna do is to change the debug mode, or whatever it called to _Encrypt_KOR_Realse_public then will setup everything in the project's propeties. in each project.
So let's make our life a lot easier, and just disable the whole warnnings that we gonna get during the build.
So, you are going to do it in every single project (all the 10)
Tip: You can just click on the next project and it will replace the current 'Propeties window'.
So, right click on the 'project' > Propeties.
In the window that popped up go to C/C++ > Advenced
under Disable Specific Warnnings
Paste it:
Code:
4244;4996;4819;4005;4800;4293;4627;4018;4172;4509;4065;4101
Remember! in every single project!
Okay, we done with this stupid warnnings.
Let's go now to CSCommon > Propeties > C/C++ > Command Line
and paste it:
Code:
/Zm200
DO THE SAME FOR Gunz project!
After you did the same for Gunz prject, we still need to change things there ..
so ..
go to Build Events > Pre-Build Event > Command Line
You see this poop ?
Code:
SVNRevision/UpdateRevisionCPP.bat
Good, now DELETE THIS FAG!
One more thing to do in Gunz's project.
go to Linker > Advenced > Image Has Safe Exception Handlers (the last one)
and change the Yes (/SAFESEH) to No (/SAFESEH:NO)
That's all guys, we done with the projects propeties xD
Step 3: Fix all the errors!
oke, let's do it project by project.
Project 'cml':
First thing you wanna do is to know what errors we got ..
Right click on the project > Build.
First error:
Code:
1>Source\FileInfo.cpp(350): error C2065: 'i' : undeclared identifier
go to this line.
and we got that:
Code:
if (i<0)
pszFileName[0] = NULL;
We don't care about it, we gonna go to the loop that we got there.
I'm talking about this one (the only one ;D):
Code:
for([COLOR=#ff0000]int[/COLOR] i=nLen; i>=0; i--) {
if ( (pszFileName[i-1] == '/') ||
(pszFileName[i-1] == '\\') ) {
pszFileName[i-1] = NULL;
return;
}
}
You see the 'int' ? delete it, and on the top of this loop we will write:
Code:
int i = 0;
So we got:
Code:
void GetParentDirectory(char* pszFileName)
{
// Remove Slash
int nLen = (int)strlen(pszFileName);
if ( (pszFileName[nLen-1] == '/') ||
(pszFileName[nLen-1] == '\\') ) {
pszFileName[nLen-1] = NULL;
}
nLen = (int)strlen(pszFileName);
// Get Parent Directory
int i = 0;
for(i=nLen; i>=0; i--) {
if ( (pszFileName[i-1] == '/') ||
(pszFileName[i-1] == '\\') ) {
pszFileName[i-1] = NULL;
return;
}
}
if (i<0)
pszFileName[0] = NULL;
}
Next error:
Code:
Source\cml\Include\MPageArray.h(33): error C2065: 'greater' : undeclared identifier
Relax, I know you got ton of errors under it, don't worry we will fix them all with few little changes.
double click on that error.
now all we need to scoll a little untill we see:
Code:
#include <crtdbg.h>
Under it add:
Code:
#include <functional>
Oke, let's build cml project and see what we got now ..
So again, right click > Build.
Code:
1>Source\MPdb.cpp(436): error C2664: 'BOOL (HANDLE,PENUMLOADED_MODULES_CALLBACK,PVOID)' : cannot convert parameter 2 from 'overloaded-function' to 'PENUMLOADED_MODULES_CALLBACK'
1> None of the functions with this name in scope match the target type
This one looks easy ;D
the only thing we need to do is just add '(PENUMLOADED_MODULES_CALLBACK)' before the EnumLoadedModulesCallback.
I marked the changes:
Code:
if (!g_pfnEnumerateLoadedModules(hProcess, [COLOR=#ff0000](PENUMLOADED_MODULES_CALLBACK)[/COLOR]EnumLoadedModulesCallback, (PVOID)hProcess))
Final error:
Code:
1>Source\MProfiler.cpp(103): error C2065: 'i' : undeclared identifier
Easy, I marked the changes:
Code:
for([COLOR=#ff0000]MProfileLoop::iterator[/COLOR] i=begin(); i!=end(); i++){
MPROFILELOG* pLog = *i;
if(pLog->nDepth==nMinDepth){
if(pLog->nTotalTime==-1){
nMinDepth++;
nTotalTime = 0;
continue;
}
nTotalTime += pLog->nTotalTime;
}
}
Ok let's build the project again ! and guess what ? Our first succeeded project in VS12 ;D
Project 'CSCommon':
Like the first project, Let's build it and see what we got.
Code:
Source\CML\Include\MPageArray.h(63): error C2065: 'i' : undeclared identifier
Same as we did with cml, in this line:
Code:
for (int i=0; i<nTotalSize; i++)
we will delete the 'int' and add it again above the loop.
Code:
[COLOR=#ff0000]int i = 0;[/COLOR]
for [COLOR=#ff0000](i=0[/COLOR]; i<nTotalSize; i++) {
m_Array[i] = 0;
m_UnusedQueue.push(i);
}
Code:
1>Source\MMatchDebug.cpp(5): error C2065: '_secerr_handler_func' : undeclared identifier
Nah, took me few mins to fix it ;D
What can I say ? I'm good with errors ;D
Oke so you see that the error is on MMatchDebug.cpp right ?
Right click on the and choose Open Containing Folder
Sweet, now download my header <3
Download:
You must be registered to see links
/
You must be registered to see links
/
You must be registered to see links
Now, put it in the folder that you opened .. (CSCommon\Source)
Go back to MMatchDebug.cpp and add it on top:
Code:
#include "stdafx.h"
#include "MMatchDebug.h"
#include "MPdb.h"
[COLOR=#ff0000]#include "ToVS12.h"[/COLOR]
BAM, we fixed this badass.
We got teh codz <3
Build this sexy project and guess wut ! another succeeded project ;D
Project 'Gunz':
Build this project, it will take a few mins ..
Code:
2>Source\MBButtonLook.cpp(14): error C2065: 'i' : undeclared identifier
EASY:
Code:
for([COLOR=#ff0000]int [/COLOR]i=0; i<4; i++){
m_pFocusBitmaps[i] = NULL;
}
Code:
2>Source\MEdit.cpp(603): error C2065: 'i' : undeclared identifier
Delete the 'int' from the loop, and add it on top.
Code:
[COLOR=#ff0000]int i = 0;[/COLOR]
for[COLOR=#ff0000](i[/COLOR]=nLen; i>0; i=PrevPos(m_pBuffer+GetStartPos(), i)){
int nWidth = MMGetWidth(pFont, m_pBuffer+GetStartPos(),i);
if(x>r.x+nWidth){
return i+GetStartPos();
}
}
Code:
2>Source\RAnimationFile.cpp(236): error C2065: 'i' : undeclared identifier
Just add 'int'
Code:
for([COLOR=#ff0000]int [/COLOR]i=0;i<m_ani_node_cnt;i++) {
cnt = m_ani_node[i]->m_mat_cnt;
if(cnt) {
max_frame = m_ani_node[i]->m_mat[cnt-1].frame;
break;
}
}
Code:
2>Source\RAnimationNode.cpp(99): error C2065: 'p' : undeclared identifier
Delete the 'int' from the loop above and add it ..
Code:
[COLOR=#ff0000]int p = 0;[/COLOR]
for [COLOR=#ff0000](p[/COLOR]=0;p<key_max;p++) {
if ( pKey[p].frame > frame) {
break;
}
}
if(p) p--;
Code:
2>Source\RAnimationNode.cpp(132): error C2065: 'p' : undeclared identifier
Same thing, delete 'int' and add above.
Code:
[COLOR=#ff0000]int p = 0;[/COLOR]
for [COLOR=#ff0000](p[/COLOR]=0;p<m_rot_cnt;p++) {
if ( m_quat[p].frame > frame) {
break;
}
}
Code:
2>Source\RAnimationNode.cpp(164): error C2065: 'p' : undeclared identifier
Delete 'int' and add above ..
Code:
[COLOR=#ff0000]int p = 0;[/COLOR]
for [COLOR=#ff0000](p[/COLOR]=0;p<m_pos_cnt;p++) {
if ( m_pos[p].frame > frame ) {
break;
}
}
Code:
2>Source\RAnimationNode.cpp(194): error C2065: 'j' : undeclared identifier
You see that loop with the 'int j' ? delete it and add above.
Code:
[COLOR=#ff0000]int j = 0;[/COLOR]
for [COLOR=#ff0000](j[/COLOR]=0;j<m_vertex_cnt;j++) {
if ( m_vertex_frame[j] > dwFrame)
break;
}
Code:
1>Source\MPopupMenu.cpp(230): error C2065: 'i' : undeclared identifier
add 'int'
Code:
for([COLOR=#ff0000]int[/COLOR] i=0; i<m_Children.GetCount(); i++){
MMenuItem* pMenuItem = (MMenuItem *)m_Children.Get(i);
pMenuItem->SetSize(nWidth, pMenuItem->GetHeight());
}
SetSize(nWidth+ir.w-cr.w-1, y+ir.h-cr.h-1);
You have to do that also for the second one ..
Code:
2>Source\ROcclusionList.cpp(66): error C2065: 'j' : undeclared identifier
Code:
for([COLOR=#ff0000]int[/COLOR] j=0;j<poc->nCount;j++)
{
poc->pVertices[j]=*k;
k++;
}
Code:
1>Source\MDrawContext.cpp(653): error C2065: 'i' : undeclared identifier
Scroll up until you see:
Code:
for(int i=0; i<nStrLen; i++)
Yes, you right we are going to delete the int and add it above.
Code:
[COLOR=#ff0000]int i = 0;[/COLOR]
for[COLOR=#ff0000](i[/COLOR]=0; i<nStrLen; i++)
{
Code:
2>Source\RPVS.cpp(90): error C2065: 'i' : undeclared identifier
Again for the loop above ..
Code:
[COLOR=#ff0000]int i = 0;[/COLOR]
for[COLOR=#ff0000](i[/COLOR]=0;i<pWinding->nCount;i++)
Code:
2>Source\RPVS.cpp(366): error C2065: 'i' : undeclared identifier
Same thing ..
Code:
[COLOR=#ff0000]int i = 0;[/COLOR]
for[COLOR=#ff0000](i[/COLOR]=0;i<pWinding->nCount;i++)
Code:
2>Source\RShaderMgr.cpp(106): error C2065: 'i' : undeclared identifier
add size_t ..
Code:
for([COLOR=#ff0000]size_t[/COLOR] i = 0 ; i < m_ShaderDeclVec.size(); ++i )
{
SAFE_RELEASE(m_ShaderDeclVec[i]);
}
Code:
4>Source\RealSoundEffect.cpp(90): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(91): error C3861: 'OutputDebugStr': identifier not found
Add '//' before every line.
Code:
if( hr != DS_OK )
{
[COLOR=#ff0000]//[/COLOR]OutputDebugStr( DXGetErrorString8( hr ));
[COLOR=#ff0000]//[/COLOR]OutputDebugStr( "\n" );
Code:
4>Source\RealSoundEffect.cpp(102): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(103): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(104): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(105): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(106): error C3861: 'OutputDebugStr': identifier not found
Again .. comment it ..
Code:
if( FAILED ( pDS->CreateSoundBuffer( &dsbd, &(m_pDSSet->m_pDSB), NULL ) ) )
{
[COLOR=#ff0000]//[/COLOR]OutputDebugStr( DXGetErrorString8( hr ));
[COLOR=#ff0000]//[/COLOR]OutputDebugStr( "\n" );
[COLOR=#ff0000]//[/COLOR]OutputDebugStr( "Fail to Create Sound Buffer :" );
[COLOR=#ff0000]//[/COLOR]OutputDebugStr( DXGetErrorString8( hr ) );
[COLOR=#ff0000]//[/COLOR]OutputDebugStr( "\n" );
m_pDSSet->m_pDSB = NULL;
return false;
}
Code:
4>Source\RealSoundEffect.cpp(733): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(737): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(741): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(745): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(749): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(753): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(761): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(762): error C3861: 'OutputDebugStr': identifier not found
4>Source\RealSoundEffect.cpp(763): error C3861: 'OutputDebugStr': identifier not found
Same thing for all those errors ..
Code:
1>Source\MIDLResource.cpp(2860): error C2440: '=' : cannot convert from 'const char *' to 'char *'
1> Conversion loses qualifiers
Fix:
Code:
pdest = [COLOR=#ff0000](char*)[/COLOR]strrchr(szFileName, '\\');
Do the same for the next one ..
Code:
1>Source\MResourceManager.cpp(46): error C2065: 'i' : undeclared identifier
add 'int' ..
Code:
for([COLOR=#ff0000]int[/COLOR] i=0; i<m_AniBitmaps.GetCount(); i++){
Code:
>ZApplication.cpp(929): error C2440: '=' : cannot convert from 'const char *' to 'char *'
5> Conversion loses qualifiers
5>ZApplication.cpp(943): error C2440: '=' : cannot convert from 'const char *' to 'char *'
5> Conversion loses qualifiers
5>ZApplication.cpp(951): error C2440: '=' : cannot convert from 'const char *' to 'char *'
Yesh you guess right .. add (char*) before every strstr func ..
Build the project ..
we got this:
Code:
2>Runtime\Gunz.exe.manifest : general error c1010070: Failed to load and parse the manifest. ???????? ??? ?????? ???? ?? ????? ?????.
Ok .. easy error
In the Gunz project .. click the arrow next to it ..
Now you see 'Gunz.exe.manifest' ? Delete it !
You gonna get an error .. ignore it ..
Build the project and ... BOOM ! You got it ;D
You welcome
Now do me a favor and delete Visual Studio 2003 :0
Credits: ME! and google <3
Yo admin .. stick this sexy thread.