Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Client/cefweb/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <core/CClientEntityBase.h>
#include <core/CCoreInterface.h>
#include <core/CLocalizationInterface.h>
#include "../version.h"
#include "version.h"

#include "CWebCore.h"
#include "CWebView.h"
Expand Down
4 changes: 2 additions & 2 deletions Client/core/CCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ void CCore::CreateNetwork()
ulong ulNetModuleVersion = 0;
pfnCheckCompatibility(1, &ulNetModuleVersion);
SString strMessage("Network module not compatible! (Expected 0x%x, got 0x%x)", MTA_DM_CLIENT_NET_MODULE_VERSION, ulNetModuleVersion);
#if !defined(MTA_DM_CONNECT_TO_PUBLIC)
#if !defined(MTA_DM_PUBLIC_CONNECTIONS)
strMessage += "\n\n(Devs: Update source and run win-install-data.bat)";
#endif
BrowseToSolution("netc-not-compatible", ASK_GO_ONLINE | TERMINATE_PROCESS, strMessage);
Expand Down Expand Up @@ -1322,7 +1322,7 @@ void CCore::RegisterCommands()
m_pCommands->Add("showframegraph", _("shows the frame timing graph"), CCommandFuncs::ShowFrameGraph);
m_pCommands->Add("jinglebells", "", CCommandFuncs::JingleBells);
m_pCommands->Add("fakelag", "", CCommandFuncs::FakeLag);

m_pCommands->Add("reloadnews", "for developers: reload news", CCommandFuncs::ReloadNews);
}

Expand Down
2 changes: 1 addition & 1 deletion Client/core/CCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CCore;

#pragma once

#include "../version.h"
#include "version.h"

#include "CClientVariables.h"
#include "CCommands.h"
Expand Down
2 changes: 1 addition & 1 deletion Client/game_sa/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <net/CNet.h>
#include <game/CGame.h>
#include <game/CWanted.h>
#include <../version.h>
#include <version.h>
#include <ijsify.h>

// Game includes
Expand Down
2 changes: 1 addition & 1 deletion Client/loader/MainFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ void CheckDataFiles()
if (!VerifyEmbeddedSignature(PathJoin(strMTASAPath, MTA_EXE_NAME)))
{
SString strMessage(_("Main file is unsigned. Possible virus activity.\n\nSee online help if MTA does not work correctly."));
#if MTASA_VERSION_BUILD > 0 && defined(MTA_DM_CONNECT_TO_PUBLIC) && !defined(MTA_DEBUG)
#if MTASA_VERSION_BUILD > 0 && defined(MTA_DM_PUBLIC_CONNECTIONS) && !defined(MTA_DEBUG)
DisplayErrorMessageBox(strMessage, _E("CL29"), "maybe-virus1");
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion Client/loader/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern CLocalizationInterface* g_pLocalization;
#include "Install.h"
#include "Utils.h"
#include "Dialogs.h"
#include "..\version.h"
#include "version.h"
#include "CInstallManager.h"
#include "D3DStuff.h"
#include "CExePatchedStatus.h"
Expand Down
2 changes: 1 addition & 1 deletion Client/mods/deathmatch/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@
#include "logic/CResource.h"
#include "logic/CStaticFunctionDefinitions.h"
#include "logic/CResourceFileDownloadManager.h"
#include "../../version.h"
#include "version.h"
1 change: 0 additions & 1 deletion Client/mods/deathmatch/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ project "Client Deathmatch"
"../../../Shared/mods/deathmatch/logic/**.h",
"../../../Shared/animation/CEasingCurve.cpp",
"../../../Shared/animation/CPositionRotationAnimation.cpp",
"../../version.h",
-- Todo: Replace these two by using the CryptoPP functions instead
"../../../vendor/bochs/bochs_internal/crc32.cpp"
}
Expand Down
2 changes: 1 addition & 1 deletion Client/multiplayer_sa/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <net/CNet.h>
#include <game/CGame.h>
#include <CMatrix_Pad.h>
#include <../version.h>
#include <version.h>
#include <hwbrk.h>

// Multiplayer includes
Expand Down
93 changes: 0 additions & 93 deletions Client/version.h

This file was deleted.

Empty file removed Server/build_overrides_s.h
Empty file.
2 changes: 1 addition & 1 deletion Server/core/CDynamicLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ FuncPtr_t CDynamicLibrary::GetProcedureAddress(const char* szProcName)
bool CDynamicLibrary::CheckMtaVersion(const char* szLibName)
{
#if MTASA_VERSION_TYPE >= VERSION_TYPE_UNSTABLE
// define MTASA_SKIP_VERSION_CHECKS in "build_overrides_s.h" to skip version checks
// define MTASA_SKIP_VERSION_CHECKS in "Shared/build_overrides.h" to skip version checks
#ifndef MTASA_SKIP_VERSION_CHECKS

if (m_hModule == 0)
Expand Down
2 changes: 1 addition & 1 deletion Server/core/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define WITH_ALLOC_TRACKING 0
#endif
#include "SharedUtil.h"
#include "../version.h"
#include "version.h"

#ifdef WIN32
#include "CExceptionInformation_Impl.h"
Expand Down
2 changes: 1 addition & 1 deletion Server/mods/deathmatch/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ struct SAclRequest;
#include "CServer.h"
#include "Config.h"
#define SHOW_SELF_COMPILE_WARNING
#include "../../version.h"
#include "version.h"

extern CNetServer* g_pRealNetServer;
extern CGame* g_pGame;
1 change: 0 additions & 1 deletion Server/mods/deathmatch/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ project "Deathmatch"
"../../../Shared/mods/deathmatch/logic/**.h",
"../../../Shared/animation/CEasingCurve.cpp",
"../../../Shared/animation/CPositionRotationAnimation.cpp",
"../../version.h",
-- Todo: Replace these two by using the CryptoPP functions instead
"../../../vendor/bochs/bochs_internal/crc32.cpp",
}
Expand Down
2 changes: 1 addition & 1 deletion Shared/XML/StdInc.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "CXMLNodeImpl.h"
#include "CXMLImpl.h"
#include "CXMLArray.h"
#include "../../Server/version.h"
#include "version.h"

// XML includes
#include <xml/CXMLCommon.h>
File renamed without changes.
4 changes: 2 additions & 2 deletions Shared/sdk/SharedUtil.Misc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ CDuplicateLineFilter<SReportLine> ms_ReportLineFilter;
#define TROUBLE_URL1 "http://updatesa.multitheftauto.com/sa/trouble/?v=_VERSION_&id=_ID_&tr=_TROUBLE_"

#ifndef MTA_DM_ASE_VERSION
#include <../../Client/version.h>
#include <version.h>
#endif

//
Expand Down Expand Up @@ -1248,7 +1248,7 @@ DWORD SharedUtil::GetMainThreadId()
// Get the module information for the currently running process
DWORD processEntryPointAddress = 0;
MODULEINFO moduleInfo = {};

if (GetModuleInformation(GetCurrentProcess(), GetModuleHandle(nullptr), &moduleInfo, sizeof(MODULEINFO)) != 0)
{
processEntryPointAddress = reinterpret_cast<DWORD>(moduleInfo.EntryPoint);
Expand Down
32 changes: 22 additions & 10 deletions Server/version.h → Shared/sdk/version.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
//
// MTA10_Server/version.h
//
// Server version file
// Shared/version.h
//
#pragma once

//
// To compile a client:
// 1. set MTASA_VERSION_TYPE to VERSION_TYPE_CUSTOM
// 2. Use netc.dll from the latest unstable build (nightly.mtasa.com)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment looks wrong.. the netc.dll made for custom builds (from install-data.bat), which is located at https://mirror.mtasa.com/bdata/netc.dll, should be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the current comment on master (https://github.com/multitheftauto/mtasa-blue/blob/master/Client/version.h#L10)

What would be an accurate fix?

Suggested change
// 2. Use netc.dll from the latest unstable build (nightly.mtasa.com)
// 2. Run install-data for netc.dll

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dutchman101 Any comment on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To correct the existing comment(s) that are incorrect.. either in this PR or a new one. Like just refer to the existing build instructions or install-data without specific mention of netc. I would suggest to just refer to the build instructions readme.

//
//
// To compile a public server:
// 1. set MTASA_VERSION_TYPE to VERSION_TYPE_RELEASE
Expand All @@ -21,7 +24,7 @@
#define MTASA_VERSION_TYPE VERSION_TYPE_CUSTOM
#define MTASA_VERSION_BUILD 0

#include "build_overrides_s.h"
#include "../build_overrides.h"

// Old version info
#define MTA_DM_VERSION ( ( ( MTASA_VERSION_MAJOR ) << 8 ) | ( ( MTASA_VERSION_MINOR ) << 4 ) | ( ( MTASA_VERSION_MAINTENANCE ) << 0 ) )
Expand All @@ -30,7 +33,12 @@
#else
#define MTA_DM_VERSIONSTRING QUOTE_DEFINE ( MTASA_VERSION_MAJOR ) "." QUOTE_DEFINE ( MTASA_VERSION_MINOR ) "." QUOTE_DEFINE ( MTASA_VERSION_MAINTENANCE )
#endif
#define MTA_DM_FULL_STRING "MTA:SA Server"

#ifdef MTA_CLIENT
#define MTA_DM_FULL_STRING "MTA:SA Client"
#else
#define MTA_DM_FULL_STRING "MTA:SA Server"
#endif

// Compile types
#define VERSION_TYPE_CUSTOM 0x01
Expand Down Expand Up @@ -60,44 +68,48 @@
#define MTA_DM_BUILDTYPE "untested"
#define MTA_DM_BUILDTAG_SHORT MTA_DM_VERSIONSTRING "-" MTA_DM_BUILDTYPE "-" QUOTE_DEFINE ( MTASA_VERSION_BUILD )
#define MTA_DM_BUILDTAG_LONG MTA_DM_VERSIONSTRING "-" MTA_DM_BUILDTYPE "-" QUOTE_DEFINE ( MTASA_VERSION_BUILD )
#define MTA_DM_CONNECT_FROM_PUBLIC
#define MTA_DM_PUBLIC_CONNECTIONS
#define MTA_DM_EXPIRE_DAYS 60

#elif MTASA_VERSION_TYPE == VERSION_TYPE_RELEASE

#define MTA_DM_BUILDTYPE "release"
#define MTA_DM_BUILDTAG_SHORT MTA_DM_VERSIONSTRING
#define MTA_DM_BUILDTAG_LONG MTA_DM_VERSIONSTRING "-" MTA_DM_BUILDTYPE "-" QUOTE_DEFINE ( MTASA_VERSION_BUILD )
#define MTA_DM_CONNECT_FROM_PUBLIC
#define MTA_DM_PUBLIC_CONNECTIONS

#else
#error "Incorrect MTASA_VERSION_TYPE"
#endif

#define _ASE_VERSION QUOTE_DEFINE(MTASA_VERSION_MAJOR) "." QUOTE_DEFINE(MTASA_VERSION_MINOR)
#define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk)
#define _CLIENT_NET_MODULE_VERSION 0x0AB // (0x000 - 0xfff) Lvl9 wizards only
#define _SERVER_NET_MODULE_VERSION 0x0AB // (0x000 - 0xfff) Lvl9 wizards only
#define _NETCODE_VERSION 0x1DA // (0x000 - 0xfff) Increment when net messages change (pre-release)

// (0x000 - 0xfff) Update bitstream.h when net messages change (post-release). (Changing will also require additional backward compatibility code).
#define MTA_DM_BITSTREAM_VERSION eBitStreamVersion::Latest

// To avoid user confusion, make sure the ASE version matches only if communication is possible
#if defined(MTA_DM_CONNECT_FROM_PUBLIC)
#if defined(MTA_DM_PUBLIC_CONNECTIONS)
#define MTA_DM_ASE_VERSION _ASE_VERSION
#define MTA_DM_NETCODE_VERSION _NETCODE_VERSION
#define MTA_DM_CLIENT_NET_MODULE_VERSION _CLIENT_NET_MODULE_VERSION
#define MTA_DM_SERVER_NET_MODULE_VERSION _SERVER_NET_MODULE_VERSION
#else
#if _NETCODE_VERSION_BRANCH_ID < 1 || _NETCODE_VERSION_BRANCH_ID > 15
#error "_NETCODE_VERSION_BRANCH_ID wrong"
#endif
#define MTA_DM_ASE_VERSION _ASE_VERSION "n"
#define MTA_DM_NETCODE_VERSION ( _NETCODE_VERSION + ( _NETCODE_VERSION_BRANCH_ID << 12 ) )
#define MTA_DM_CLIENT_NET_MODULE_VERSION ( _CLIENT_NET_MODULE_VERSION + ( 4 << 12 ) )
#define MTA_DM_SERVER_NET_MODULE_VERSION _SERVER_NET_MODULE_VERSION
#endif

// Handy self compile message
#ifndef MTA_DM_CONNECT_FROM_PUBLIC
#if defined(SHOW_SELF_COMPILE_WARNING) && !defined(CI_BUILD)
#ifndef MTA_DM_PUBLIC_CONNECTIONS
#if defined(SHOW_SELF_COMPILE_WARNING) && !defined(CI_BUILD) && !defined(MTA_CLIENT)
#pragma message("\n\
----------------------------------------------------------------------\n\
MTASA_VERSION_TYPE is not set to VERSION_TYPE_RELEASE\n\
Expand Down