Commit Graph
75 Commits
Author SHA1 Message Date
David Anderson 4688783baf Revert "Introduce a pbproxy library to solve macOS linker issues."
This reverts commit e5ddbd9886.
2023-08-30 22:08:45 +02:00
Nick Hastings 633298b6a9 Fix attempting to link win32 libprotobuf on win64. 2023-08-30 22:08:45 +02:00
David Anderson 6e2c5a66b3 Remove use of the Dep API.
This is going away.
2020-08-24 20:48:57 -07:00
David Anderson 785c6aa1cf Update to AMBuild 2.2.
This is a pretty big diff because SourceMod had lots of multi-arch
workarounds that can now go away. I've also changed 'x64' to 'x86_64' in
many places since this is how AMBuild normalizes it, and it's far too
late to pick the shorter string, so we might as well suck it up.

The --target-archs parameter has been replaced with --targets. It works
the same way.

The default behavior for SDK inclusion is now "present" instead of
"all" since this lowers the burden of storing many SDKs. Official builds
will still be made with --sdks=all.
2020-08-18 23:09:43 -07:00
David Anderson e5ddbd9886 Introduce a pbproxy library to solve macOS linker issues.
On SDKs which use protobufs, the engine has objects compiled against a specific
version of protobuf. Normally this is fine, we take care on Linux to use the
same C++ ABI. On macOS however, we use libc++ to enable C++11 functionality,
whereas the protobuf library has been compiled with libstc++. These ABIs are
not compatible.

To address the problem, we introduce PbHandle. PbHandle is a wrapper around
protobuf::Message with two added pieces of state: whether or not the handle
"owns" the message (and can free it in its destructor), and whether or not
the handle was created by the engine (private) or created by SourceMod
(local).

Whenever we transfer a protobuf::Message pointer to SourceMod, we must take
care to convert it to a Local version first. Whenever we transfer a protobuf
pointer to the engine, we must convert it to a Private handle.

For platforms with no ABI differences (almost all of them), the handle is a
no-op. The private and local localities are compatible and no translation
takes place.

On macOS, CS:GO does require translation. SourceMod loads a tiny shim
library that contains a copy of the protobuf sources compiled against the
game's ABI. It then provides serialization and deserialization methods.
SourceMod must not interact with the game's protobuf objects without first
going through this proxy library.

Note that PbHandle is not quite like unique_ptr. It can be converted into a
PbHandle that does not destroy the underlying object. This is mainly because
UserMessages.cpp has rather complex state, so it is useful to track locality
without destroying an object. An unowned PbHandle must not outlive the
owning PbHandle.
2020-05-30 22:13:07 -07:00
Asher Baker 6465bd83a4 Update for latest Blade Symphony SDK 2020-03-11 22:36:25 +00:00
Nicholas Hastings 1000d419fc Throw configuration error on unsupported compilers (#1029) 2019-11-15 16:40:39 -08:00
Nick Hastings cbcda61135 Swap _XKEYCHECK_H for _ALLOW_KEYWORD_MACROS, in case it moves to a
different header.
2018-05-21 19:54:12 -04:00
Nick Hastings 467d57059a Out with the old ConVar accessibility hacks, in with the new. 2018-05-06 12:59:33 -04:00
Michael Flaherty e57dce76e1 Add support for msvc 1912 (Fixes #761) (#764)
* Add support for msvc 1912

* Default new msvc versions to VS 2017

* Use 2015 lib with 2017
2018-02-04 17:06:22 -05:00
thewavelength 55b8371fa8 Add VS Preview 2017 as valid compiler (msvc-1911) (#678) 2018-01-28 11:39:23 +00:00
Scott Ehlert ce1a4dcac0 64-bit support for CSGO on Linux and macOS (#705) 2017-12-20 01:56:23 -06:00
Nicholas Hastings 4007ec8cf8 Temp fix for load issues on Linux. 2017-12-05 20:44:53 -05:00
Scott Ehlert bbdecceb4b Switch to AMBuild 2.1 API. (#694) 2017-10-02 07:18:57 -05:00
Nicholas Hastings 1135f9024a Fix error when configuring for csgo SDK build on VS 2017. 2017-03-11 09:28:24 -05:00
Nicholas Hastings f668b3fe6c 🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍 2016-06-11 12:43:04 -04:00
Nicholas Hastings f12924458f Merge branch 'vs2015' 2016-06-11 12:14:12 -04:00
Nicholas Hastings 40f2512317 Remove support for Source 1 Dota 2. (#496) 2016-04-26 23:18:47 -04:00
Nicholas Hastings 416abd81a1 Add support for compiling with VS2015. 2016-03-30 08:56:27 -04:00
David Anderson 8a7dfdbc11 Move the "sm" command to core/logic. 2015-09-20 14:33:17 -07:00
David Anderson 67c8ee4ce3 Move CDataPack from core to logic. 2015-09-06 11:02:52 -07:00
David Anderson 4e275eea97 Split intercom.h into separate headers and reduce shared header inclusion. 2015-08-31 10:00:49 -07:00
David Anderson 2ed044804d Move OnConVarChanged into a global hook. 2015-08-31 09:18:29 -07:00
David Anderson 28346c99f2 Move RootConsoleMenu into core/logic. 2015-08-30 21:01:46 -07:00
David Anderson 2c886943a0 Move RootConsoleMenu into its own header and .cpp file. 2015-08-30 21:01:10 -07:00
David Anderson 6503e92d66 Move LibrarySys from core to logic. 2015-08-30 20:11:22 -07:00
Nicholas Hastings d49c72cf8b Fix typo in core AMBuilder file triggering exception when triggering exception. 2015-03-31 17:39:04 -04:00
Nicholas Hastings aff2551942 Remove conditionals in ambuild scripts for using msvc <2013 (not supported). 2015-01-21 11:04:52 -05:00
Nicholas Hastings 18b54b9064 Update protobuf include path for Dota build. 2015-01-21 11:04:03 -05:00
Ryan Stecker f2a80e33fd Expose some of ICommandLine to plugins. 2014-10-07 16:16:02 -05:00
Nicholas Hastings ad7d920ce0 Move menu natives from core to logic 2014-09-05 08:24:40 -07:00
Nicholas Hastings e9e35979a4 Update core AMBuild script for hl2sdk-csgo and hl2sdk-dota protobuf changes. 2014-09-01 11:25:55 -04:00
Nicholas Hastings 17d5af0e2f Move Logger and Core natives to Logic 2014-08-13 14:24:35 -07:00
David Anderson ec61d4d188 Add a general profiling abstraction layer. 2014-06-24 01:04:13 -07:00
David Anderson abdf7d5b07 Port build scripts to the new project API. 2014-05-31 19:56:42 -07:00
David Anderson 859be35b34 Fix build. 2014-05-30 19:49:54 -07:00
David Anderson 1e6843f8db Add support for the preliminary IDE project file generator. 2014-05-30 19:07:56 -07:00
Nicholas Hastings 35784c018d Move adminsys and more natives from core to logic. 2014-05-29 13:31:12 -04:00
Nicholas Hastings 3c6dd2cb79 Choose correct libprotobuf build for current msvc version on Windows. 2014-02-28 20:44:10 -05:00
Scott Ehlert e00e879af5 Use == instead of is operator for checking string equality in AMBuild scripts (bug 6043, r=dvander). 2014-02-09 22:50:20 -06:00
David Anderson e1a820dcf9 Port simple C++ build scripts to AMBuild 2 (bug 5997 part 1, r=ds). 2013-12-30 17:50:56 -05:00
Nicholas Hastings 1ba6b2653a Move ForwardSys from core to logic (bug 5953, r=fyren).
--HG--
rename : core/ForwardSys.cpp => core/logic/ForwardSys.cpp
rename : core/ForwardSys.h => core/logic/ForwardSys.h
2013-10-09 08:43:08 -04:00
Nicholas Hastings 1d1b5d1c6d Move DBManager and DB natives from core to logic (bug 5953, r=fyren).
--HG--
rename : core/Database.cpp => core/logic/Database.cpp
rename : core/Database.h => core/logic/Database.h
rename : core/sm_simple_prioqueue.h => core/logic/sm_simple_prioqueue.h
rename : core/smn_database.cpp => core/logic/smn_database.cpp
rename : core/sm_queue.h => public/sm_queue.h
2013-10-09 08:43:08 -04:00
Nicholas Hastings 9027d15211 Move ADTFactory from core to logic (bug 5953, r=fyren).
--HG--
rename : core/ADTFactory.cpp => core/logic/ADTFactory.cpp
rename : core/ADTFactory.h => core/logic/ADTFactory.h
2013-10-09 08:43:08 -04:00
David Anderson 754a6e1177 Rewrite DBManager to use the new synchronization primitives (bug 5870, r=fyren). 2013-08-21 00:01:28 -07:00
Nicholas Hastings d0e18ed0ba Debug build fixes.
--HG--
extra : rebase_source : 772710f29b5aca5e0e4b7276fcb19b3702450e3f
2013-08-10 12:22:09 -04:00
Nicholas Hastings 0533b5cefc Fixed Dota build. 2013-06-18 12:16:48 -04:00
David Anderson ea441b3d70 Fix build. 2013-03-29 11:47:40 -07:00
David Anderson 045ee262a8 Move scared guts of core into logic (bug 5680, r=fyren).
--HG--
rename : core/ExtensionSys.cpp => core/logic/ExtensionSys.cpp
rename : core/ExtensionSys.h => core/logic/ExtensionSys.h
rename : core/HandleSys.cpp => core/logic/HandleSys.cpp
rename : core/HandleSys.h => core/logic/HandleSys.h
rename : core/NativeInvoker.cpp => core/logic/NativeInvoker.cpp
rename : core/NativeInvoker.h => core/logic/NativeInvoker.h
rename : core/NativeOwner.cpp => core/logic/NativeOwner.cpp
rename : core/NativeOwner.h => core/logic/NativeOwner.h
rename : core/PluginSys.cpp => core/logic/PluginSys.cpp
rename : core/PluginSys.h => core/logic/PluginSys.h
rename : core/ShareSys.cpp => core/logic/ShareSys.cpp
rename : core/ShareSys.h => core/logic/ShareSys.h
rename : core/smn_fakenatives.cpp => core/logic/smn_fakenatives.cpp
rename : core/logic/AutoHandleRooter.h => public/AutoHandleRooter.h
2013-03-29 11:37:29 -07:00
Nicholas Hastings 2c7537b4cd Dota 2 support in Ambuild scripts (bug 5656, r=asherkin). 2013-03-19 11:22:31 -04:00