Skip to content

Commit 13492ea

Browse files
committed
First part of Win update
1 parent 949abfa commit 13492ea

File tree

10,909 files changed

+1509233
-456287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

10,909 files changed

+1509233
-456287
lines changed

src/Build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ goto CloneRepo
127127
if not exist %BUILDDIR% mkdir %BUILDDIR%
128128

129129
:: Create the build files
130-
cmake . -B%BUILDDIR% -G"Visual Studio 10" -DBRANCH=%branch%
130+
cmake . -B%BUILDDIR% -G"Visual Studio 17" -A Win32 -DBRANCH=%branch%
131131

132132
if %use_msbuild% == 1 (
133133
msbuild %BUILDDIR%\source-python.sln /p:Configuration="Release" /p:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0"

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ Add_Definitions(
677677
-DSOURCE_ENGINE=${SOURCE_ENGINE}
678678
-DSOURCE_ENGINE_BRANCH=${BRANCH}
679679
-DBOOST_PYTHON_MAX_ARITY=32
680+
-DASMJIT_STATIC=1
680681
)
681682

682683
# ------------------------------------------------------------------

src/core/modules/entities/entities_datamaps.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#include "entities_datamaps.h"
3737
#include ENGINE_INCLUDE_PATH(entities_datamaps_wrap.h)
3838

39+
using namespace boost::placeholders;
40+
3941

4042
// ============================================================================
4143
// >> TYPEDEFS

src/core/sp_python.cpp

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,32 @@ bool CPythonManager::Initialize( void )
113113
wchar_t wszProgramName[MAX_PATH_LENGTH];
114114
V_strtowcs(szProgramName, -1, wszProgramName, MAX_PATH_LENGTH);
115115

116+
PyStatus status;
117+
118+
PyConfig config;
119+
PyConfig_InitPythonConfig(&config);
120+
121+
status = PyConfig_SetString(&config, &config.program_name, wszProgramName);
122+
if (PyStatus_Exception(status)) {
123+
Msg(MSG_PREFIX "Failed to set Python program name.\n");
124+
PyConfig_Clear(&config);
125+
Py_ExitStatusException(status);
126+
return false;
127+
}
128+
129+
status = PyConfig_SetString(&config, &config.home, wszPythonHome);
130+
if (PyStatus_Exception(status)) {
131+
Msg(MSG_PREFIX "Failed to set Python home.\n");
132+
PyConfig_Clear(&config);
133+
Py_ExitStatusException(status);
134+
return false;
135+
}
136+
116137
// Set that as the python home directory.
117-
Py_SetPythonHome(wszPythonHome);
118-
Py_SetProgramName(wszProgramName);
119-
Py_SetPath(wszPythonHome);
138+
//Py_SetPath(wszPythonHome);
120139

121-
// Initialize python and its namespaces.
122-
Py_Initialize();
140+
status = Py_InitializeFromConfig(&config);
141+
PyConfig_Clear(&config);
123142

124143
// Print some information
125144
DevMsg(1, MSG_PREFIX "Python version %s initialized!\n", Py_GetVersion());

src/loader/definitions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
//---------------------------------------------------------------------------------
3030
// Definitions
3131
//---------------------------------------------------------------------------------
32-
#define PYLIB_NAME_WIN32 "Python3/plat-win/python36.dll"
32+
#define PYLIB_NAME_WIN32 "Python3/plat-win/python313.dll"
3333
#define PYLIB_NAME_LINUX "Python3/plat-linux/libpython3.6m.so.1.0"
3434

3535
#define CORE_NAME_WIN32 "bin/core.dll"

src/makefiles/win32/win32.base.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Set(CMAKE_CXX_FLAGS_RELEASE "/D_NDEBUG /MD /wd4005 /MP")
4141
# For the debug config we need to specify the release flag and vice versa.
4242
target_compile_options(source-python PRIVATE "/MT$<$<CONFIG:Debug>:d>")
4343
target_compile_options(source-python PRIVATE "/MTd$<$<CONFIG:Release>:d>")
44+
target_compile_options(core PRIVATE "/MT$<$<CONFIG:Debug>:d>")
45+
target_compile_options(core PRIVATE "/MTd$<$<CONFIG:Release>:d>")
4446

4547
Set_Target_Properties(core PROPERTIES
4648
LINK_FLAGS_RELEASE "/NODEFAULTLIB:LIBC.lib /NODEFAULTLIB:LIBCMT.lib /NODEFAULTLIB:LIBCPMT.lib"
@@ -61,8 +63,8 @@ Set(SOURCEPYTHON_LINK_LIBRARIES
6163
${DYNCALLSDK_LIB}/libdynload_s.lib
6264
${ASMJITSDK_LIB}/AsmJit.lib
6365
${DYNAMICHOOKSSDK_LIB}/DynamicHooks.lib
64-
${BOOSTSDK_LIB}/libboost_filesystem-vc100-mt-s-1_64.lib
65-
${BOOSTSDK_LIB}/libboost_system-vc100-mt-s-1_64.lib
66+
${BOOSTSDK_LIB}/libboost_filesystem-vc143-mt-s-x32-1_87.lib
67+
${BOOSTSDK_LIB}/libboost_system-vc143-mt-s-x32-1_87.lib
6668
)
6769

6870
# CSGO Engine adds in interfaces.lib
@@ -76,16 +78,16 @@ Endif()
7678
If( SOURCE_ENGINE MATCHES "csgo" OR SOURCE_ENGINE MATCHES "blade")
7779
Set(SOURCEPYTHON_LINK_LIBRARIES
7880
${SOURCEPYTHON_LINK_LIBRARIES}
79-
${SOURCESDK_LIB}/win32/release/vs2010/libprotobuf.lib
81+
${SOURCESDK_LIB}/win32/release/vs2017/libprotobuf.lib
8082
)
8183
Endif()
8284

8385
# ------------------------------------------------------------------
8486
# Release link libraries
8587
# ------------------------------------------------------------------
8688
Set(SOURCEPYTHON_LINK_LIBRARIES_RELEASE
87-
optimized ${PYTHONSDK_LIB}/python36.lib
88-
optimized ${BOOSTSDK_LIB}/libboost_python3-vc100-mt-1_64.lib
89+
optimized ${PYTHONSDK_LIB}/python313.lib
90+
optimized ${BOOSTSDK_LIB}/libboost_python313-vc143-mt-s-x32-1_87.lib
8991
)
9092

9193
If( SOURCE_ENGINE MATCHES "csgo" )

src/patches/csgo/lib/public/tier1.lib

-2.25 MB
Binary file not shown.
Binary file not shown.

src/thirdparty/AsmJit/include/ApiBegin.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/thirdparty/AsmJit/include/ApiEnd.h

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)