its more complivated,i didn't try it, but when i try to compare the emule source with mod source, i found that they
1-declare two cstring variables in emule.h
public:
CString m_strModVersion;
CString m_strModLongVersion;
2-create new headerfile "ModName.h" and define these variables: (those variables defines ur modname and version)
#define MOD_VERSION_MJR 1
#define MOD_VERSION_MIN 18
#define MOD_VERSION _T("Test")
#define MOD_LONG_VERSION _T("Test v")
3-Include this file in "emule.cpp"
4-now,in the file emule.cpp at CemuleApp::CemuleApp(LPCTSTR lpszAppName)
u will find a comment
// MOD Note: Do not change this part - Merkur
code
// MOD Note: end
of course u must not change this code, but after it write those lines
m_strModVersion = MOD_VERSION;
m_strModVersion.AppendFormat(_T(" %u.%u"), MOD_VERSION_MJR,MOD_VERSIaON_MIN);
m_strModLongVersion = MOD_LONG_VERSION;
m_strModLongVersion.AppendFormat(_T("%u.%u"), MOD_VERSION_MJR,MOD_VERSION_MIN);
5-now,u can neglect my first post and use this code: (in emuledlg.cpp)
//set title
CString buffer = _T("eMule v");
buffer += theApp.m_strCurVersionLong;
buffer += " " + theApp.m_strModLongVersion;
SetWindowText(buffer);
6-if u use the feature "Show transfer rates on title" u must change the line in "PPgDisplay.cpp":
Change
_stprintf(buffer,_T("eMule v%s"),theApp.m_strCurVersionLong);
to
_stprintf(buffer,_T("eMule v%s [%s]"),theApp.m_strCurVersionLong,theApp.m_strModLongVersion);
7-Last Step
Sorry But i didn't find the last step, which send ur emule mod version to other clients, I think its somewhere in "BaseClient.cpp", i'm still searching 4 it,i will tell u if i find it.
I think its only one line remaining.
President Birk, can u move this topic to developers forum
skolnick, on Dec 26 2004, 04:06 AM, said:
but maybe is easier to ask in the development forum.
and we can find more help there.
thanks