[SAMMELTHREAD] Metin2 Source Compile Tips/Tuts

01/05/2014 00:25 givesource#31
what? you mean i have to use vc90 project file?
or you mean i have to switch the platform?

vs10
01/05/2014 01:25 Sujino#32
[QUOTE=5203307a;26623579]Use v90 toolset for compile all project. Will compile without problem :)


clean solution and compile in "Release" on v90 toolset.[/QUOTE

Change Toolset from vs100 to vs90 # Done
Set to Release # Done
Clean the Solution # Done
Compile # Done

And still 25 Linker Error´s left...
01/05/2014 01:41 WildGamers-Metin2#33
[quote=Sujino;26624973]
Quote:
Originally Posted by 5203307a View Post
Use v90 toolset for compile all project. Will compile without problem :)


clean solution and compile in "Release" on v90 toolset.[/QUOTE

Change Toolset from vs100 to vs90 # Done
Set to Release # Done
Clean the Solution # Done
Compile # Done

And still 25 Linker Error´s left...
Use the python22 from WorldEditor :)
01/05/2014 02:01 TheTutMan#34
Has anyone compile the World Editor succesfully?
01/05/2014 02:03 Sujino#35
[quote=WildGamers-Metin2;26625118]
Quote:
Originally Posted by Sujino View Post
Use the python22 from WorldEditor :)
Still 25 Linker error´s left :)

01/05/2014 05:00 5203307a#36
Anybody have working normal root like arkosia2 but for python22? I can help someone who have roots for compile game on any system or binary on windows.
01/05/2014 05:23 lollo_9_1#37
Two little tips:
  • Code:
    Character set 'euckr' is not a compiled character set and is not specified in the '/usr/local/share/mysql/charsets/Index.xml' file
    mysql_real_connect: Can't initialize character set euckr (path: /usr/local/share/mysql/charsets/)
       failed, retrying in 5 seconds
    Compile mysql-client51 (libs) with WITH_XCHARSET=all option
  • Code:
    root@jailbait64:/usr/game/db # ./db
    Real Server
    Log OffAsyncSQL: connected to localhost (reconnect 1)
    Success PLAYER
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    Success ACCOUNT
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    Success COMMON
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    Segmentation fault (core dumped)
    
    root@jailbait64:/usr/game/db # gdb
    (gdb) set gnutarget i386-marcel-freebsd
    (gdb) file db
    Reading symbols from db...done.
    (gdb) core db.core
    Core was generated by `db'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /usr/lib32/libstdc++.so.6...done.
    Loaded symbols for /usr/lib32/libstdc++.so.6
    Reading symbols from /usr/lib32/libm.so.5...done.
    Loaded symbols for /usr/lib32/libm.so.5
    Reading symbols from /usr/lib32/libgcc_s.so.1...done.
    Loaded symbols for /usr/lib32/libgcc_s.so.1
    Reading symbols from /usr/lib32/libthr.so.3...done.
    Loaded symbols for /usr/lib32/libthr.so.3
    Reading symbols from /usr/lib32/libc.so.7...done.
    Loaded symbols for /usr/lib32/libc.so.7
    Reading symbols from /usr/lib32/libsupc++.so.1...done.
    Loaded symbols for /usr/lib32/libsupc++.so.1
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0  0x28260d52 in std::string::assign () from /usr/lib32/libstdc++.so.6
    [New Thread 2880433428805800 (LWP 101557/dbmio3)]
    [New Thread 2831ff4028805500 (LWP 101556/dbmio3)]
    [New Thread 2880583428805200 (LWP 101552/dbmio3)]
    [New Thread 2880553428804f00 (LWP 101551/dbmio3)]
    [New Thread 2880523428804c00 (LWP 101547/dbmio3)]
    [New Thread 28804f3428804900 (LWP 101546/dbmio3)]
    [New Thread 28804c3428804300 (LWP 101382/dbmio3)]
    Cannot find new threads: generic error
    (gdb) bt
    #0  0x28260d52 in std::string::assign () from /usr/lib32/libstdc++.so.6
    #1  0x080dba9f in CAsyncSQL2::SetLocale ()
    #2  0x080511e2 in CDBManager::SetLocale (this=0xffffcab8,
        szLocale=0x2884d84c "latin1") at DBManager.cpp:172
    #3  0x0805db82 in CClientManager::InitializeLocalization (this=0xffffc2cc)
        at ClientManager.cpp:3705
    #4  0x0805e87d in CClientManager::Initialize (this=0xffffc2cc)
        at ClientManager.cpp:109
    #5  0x0804ff5e in Start () at Main.cpp:386
    #6  0x080501c5 in main () at Main.cpp:88
    (gdb) quit
    root@jailbait64:/usr/game/db #
    You're using `dev|novaline/Srcs/Server/db/src/Main.cpp`.
    In those branches Main.cpp is bugged because g_bHotBackup disable HotBackup.
    `mainline/Srcs/Server/db/src/Main.cpp` works very well.
01/05/2014 05:33 Jоe#38
Quote:
Originally Posted by lollo_9_1 View Post
Two little tips:
  • Code:
    Character set 'euckr' is not a compiled character set and is not specified in the '/usr/local/share/mysql/charsets/Index.xml' file
    mysql_real_connect: Can't initialize character set euckr (path: /usr/local/share/mysql/charsets/)
       failed, retrying in 5 seconds
    Compile mysql-client51 (libs) with WITH_XCHARSET=all option
  • Code:
    root@jailbait64:/usr/game/db # ./db
    Real Server
    Log OffAsyncSQL: connected to localhost (reconnect 1)
    Success PLAYER
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    Success ACCOUNT
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    Success COMMON
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    AsyncSQL: connected to localhost (reconnect 1)
    Segmentation fault (core dumped)
    
    root@jailbait64:/usr/game/db # gdb
    (gdb) set gnutarget i386-marcel-freebsd
    (gdb) file db
    Reading symbols from db...done.
    (gdb) core db.core
    Core was generated by `db'.
    Program terminated with signal 11, Segmentation fault.
    Reading symbols from /usr/lib32/libstdc++.so.6...done.
    Loaded symbols for /usr/lib32/libstdc++.so.6
    Reading symbols from /usr/lib32/libm.so.5...done.
    Loaded symbols for /usr/lib32/libm.so.5
    Reading symbols from /usr/lib32/libgcc_s.so.1...done.
    Loaded symbols for /usr/lib32/libgcc_s.so.1
    Reading symbols from /usr/lib32/libthr.so.3...done.
    Loaded symbols for /usr/lib32/libthr.so.3
    Reading symbols from /usr/lib32/libc.so.7...done.
    Loaded symbols for /usr/lib32/libc.so.7
    Reading symbols from /usr/lib32/libsupc++.so.1...done.
    Loaded symbols for /usr/lib32/libsupc++.so.1
    Reading symbols from /libexec/ld-elf.so.1...done.
    Loaded symbols for /libexec/ld-elf.so.1
    #0  0x28260d52 in std::string::assign () from /usr/lib32/libstdc++.so.6
    [New Thread 2880433428805800 (LWP 101557/dbmio3)]
    [New Thread 2831ff4028805500 (LWP 101556/dbmio3)]
    [New Thread 2880583428805200 (LWP 101552/dbmio3)]
    [New Thread 2880553428804f00 (LWP 101551/dbmio3)]
    [New Thread 2880523428804c00 (LWP 101547/dbmio3)]
    [New Thread 28804f3428804900 (LWP 101546/dbmio3)]
    [New Thread 28804c3428804300 (LWP 101382/dbmio3)]
    Cannot find new threads: generic error
    (gdb) bt
    #0  0x28260d52 in std::string::assign () from /usr/lib32/libstdc++.so.6
    #1  0x080dba9f in CAsyncSQL2::SetLocale ()
    #2  0x080511e2 in CDBManager::SetLocale (this=0xffffcab8,
        szLocale=0x2884d84c "latin1") at DBManager.cpp:172
    #3  0x0805db82 in CClientManager::InitializeLocalization (this=0xffffc2cc)
        at ClientManager.cpp:3705
    #4  0x0805e87d in CClientManager::Initialize (this=0xffffc2cc)
        at ClientManager.cpp:109
    #5  0x0804ff5e in Start () at Main.cpp:386
    #6  0x080501c5 in main () at Main.cpp:88
    (gdb) quit
    root@jailbait64:/usr/game/db #
    You're using `dev|novaline/Srcs/Server/db/src/Main.cpp`.
    In those branches Main.cpp is bugged because g_bHotBackup disable HotBackup.
    `mainline/Srcs/Server/db/src/Main.cpp` works very well.
Considering nova branch, you should also replace mainline/Srcs/Server/db/src/DBManager.cpp as well as *.h for proper dbcache functionality/work.
01/05/2014 08:28 lollo_9_1#39
Quote:
Originally Posted by Jоe View Post
Considering nova branch, you should also replace mainline/Srcs/Server/db/src/DBManager.cpp as well as *.h for proper dbcache functionality/work.
Yeah, only nova branch. (it's a simple CAsyncSQL to CAsyncSQL2)

How to compile some tools: (release mode with vs2008sp1)
Code:
libserverkey (from Srcs\Server\m2server.2008.sln)
//base64_ssl.cpp
change
#include <openssl/sha.h>
#include <openssl/hmac.h>
#include <openssl/evp.h>
#include <openssl/bio.h>
#include <openssl/buffer.h>
#include <base64_ssl.h>
to
#include "openssl/sha.h"
#include "openssl/hmac.h"
#include "openssl/evp.h"
#include "openssl/bio.h"
#include "openssl/buffer.h"
#include "base64_ssl.h"

//RSACrypto.cpp
change
#include <openssl/aes.h>
#include <openssl/rsa.h>
#include <openssl/rand.h>
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/engine.h>
#include <openssl/sha.h>
#include <openssl/pem.h>
to
#include "openssl/aes.h"
#include "openssl/rsa.h"
#include "openssl/rand.h"
#include "openssl/crypto.h"
#include "openssl/err.h"
#include "openssl/engine.h"
#include "openssl/sha.h"
#include "openssl/pem.h"
libserverkey -> Properties -> Configuration Properties:
@C/C++ -> General -> Additional Include Directories: ../../Extern/openssl/include;
(quick workaround regarding global includes on vs2008)

Code:
ServerKeyGenerator (from Srcs\Tools\ServerKeyGenerator\ServerKeyGenerator.sln)
ServerKeyGenerator -> Properties -> Configuration Properties:
@C/C++ -> Precompiled Headers -> Create/Use Precompiled Header: Not Using Precompiled Headers
@C/C++ -> General -> Additional Include Directories: ../../Server/libserverkey
@Linker -> General -> Additional Library Directories: ../../Extern/OpenSSL/lib
@Linker -> Input -> Additional Dependencies: ..\..\Server\Release\libserverkey.lib
Code:
DumpProto (from Srcs\Tools\DumpProto\Importer.sln)
@already time to build
Code:
Metin2MSAMaker (from Srcs\Tools\Metin2MSAMaker\Metin2MSAMaker.sln)
@already time to build
01/05/2014 10:59 -TÜRK-#40
[Only registered and activated users can see links. Click Here To Register...]

After lot of tryings I did it finally. And also I found one tip.

One tip from me:

FreeBSD needs minimum 2gb Swap space for compiling. Add swap space for linking processes! If you do not do that you will can not compile game.

[Only registered and activated users can see links. Click Here To Register...]
01/05/2014 11:11 Jоe#41
Quote:
Originally Posted by -TÜRK- View Post
[Only registered and activated users can see links. Click Here To Register...]

After lot of tryings I did it finally. And also I found one tip.

One tip from me:

FreeBSD needs minimum 2gb Swap space for compiling. Add swap space for linking processes! If you do not do that you will can not compile game.

[Only registered and activated users can see links. Click Here To Register...]
I compile it local without any swap space ;)
01/05/2014 11:13 Pawelmol#42
Quote:
/usr/bin/ld: cannot find -lgtest
Im installed mnc, tiff, cms and now im still getting that error. I dont know what package should i install, but if you know please tell me the name.
01/05/2014 11:19 -TÜRK-#43
Quote:
Originally Posted by Jоe View Post
I compile it local without any swap space ;)
If you give 2gb ram you do not need to do that ;)

I gave 512mb ram always.. ;)
01/05/2014 11:22 [uLow]NTX?!#44
Whats about gtest?

use google.
01/05/2014 11:25 Pawelmol#45
Cant find anything about it :(

[Only registered and activated users can see links. Click Here To Register...]

#edit:
Maybe it is it:
[Only registered and activated users can see links. Click Here To Register...]