Skip to content

Commit 71d8343

Browse files
authored
Merge branch 'nillerusr:master' into win32
2 parents 9426857 + 0235b1e commit 71d8343

File tree

9 files changed

+241
-433
lines changed

9 files changed

+241
-433
lines changed

filesystem/filesystem_stdio.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ int CFileSystem_Stdio::FS_stat( const char *pathT, struct _stat *buf, bool *pbLo
696696
int rt = _stat( path, buf );
697697

698698
// Workaround bug wherein stat() randomly fails on Windows XP. See comment on function.
699+
/*
699700
#if defined(_WIN32) && defined(FILESYSTEM_MSVC2015_STAT_BUG_WORKAROUND)
700701
if ( rt == -1 )
701702
{
@@ -706,6 +707,7 @@ int CFileSystem_Stdio::FS_stat( const char *pathT, struct _stat *buf, bool *pbLo
706707
}
707708
}
708709
#endif // defined(_WIN32) && defined(FILESYSTEM_MSVC2015_STAT_BUG_WORKAROUND)
710+
*/
709711

710712
#if defined(LINUX) || defined(PLATFORM_BSD)
711713
if ( rt == -1 )

scripts/waifulib/vpc_parser.py

+3
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ def fix_dos_path( path ):
9090
if find_path == '': find_path = './'
9191
else: find_path += '/'
9292

93+
if not os.path.exists(find_path):
94+
return find_path+filename
95+
9396
dirlist = os.listdir(find_path)
9497
for file in dirlist:
9598
if file == filename:

stub_steam/steam_api.cpp

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
#define _CRT_SECURE_NO_WARNINGS
2+
#define STEAM_API_EXPORTS
3+
4+
#if defined __GNUC__
5+
#define S_API extern "C" __attribute__ ((visibility("default")))
6+
#elif defined _MSC_VER
7+
#define S_API extern "C" __declspec(dllexport)
8+
#endif
9+
#define NULL 0
10+
11+
S_API void *g_pSteamClientGameServer;
12+
void *g_pSteamClientGameServer = NULL;
13+
14+
//steam_api.h
15+
S_API bool SteamAPI_Init() {
16+
return true;
17+
}
18+
19+
S_API bool SteamAPI_InitSafe() {
20+
return true;
21+
}
22+
23+
S_API void SteamAPI_Shutdown() {
24+
25+
}
26+
27+
S_API bool SteamAPI_RestartAppIfNecessary() {
28+
return false;
29+
}
30+
31+
S_API void SteamAPI_ReleaseCurrentThreadMemory() {
32+
33+
}
34+
35+
S_API void SteamAPI_WriteMiniDump() {
36+
37+
}
38+
39+
S_API void SteamAPI_SetMiniDumpComment() {
40+
41+
}
42+
43+
S_API void SteamAPI_RunCallbacks() {
44+
}
45+
46+
S_API void SteamAPI_RegisterCallback() {
47+
48+
}
49+
50+
S_API void SteamAPI_UnregisterCallback() {
51+
52+
}
53+
54+
S_API void SteamAPI_RegisterCallResult() {
55+
56+
}
57+
58+
S_API void SteamAPI_UnregisterCallResult() {
59+
60+
}
61+
62+
S_API bool SteamAPI_IsSteamRunning() {
63+
return false;
64+
}
65+
66+
S_API void Steam_RunCallbacks() {
67+
68+
}
69+
70+
S_API void Steam_RegisterInterfaceFuncs() {
71+
}
72+
73+
S_API int Steam_GetHSteamUserCurrent() {
74+
return 0;
75+
}
76+
77+
S_API const char *SteamAPI_GetSteamInstallPath() {
78+
return NULL;
79+
}
80+
81+
S_API int SteamAPI_GetHSteamPipe() {
82+
return 0;
83+
}
84+
85+
S_API void SteamAPI_SetTryCatchCallbacks() {
86+
87+
}
88+
89+
S_API void SteamAPI_SetBreakpadAppID() {
90+
91+
}
92+
93+
S_API void SteamAPI_UseBreakpadCrashHandler() {
94+
95+
}
96+
97+
S_API int GetHSteamPipe() {
98+
return 0;
99+
}
100+
101+
S_API int GetHSteamUser() {
102+
return 0;
103+
}
104+
105+
S_API int SteamAPI_GetHSteamUser() {
106+
return 0;
107+
}
108+
109+
S_API void *SteamInternal_ContextInit() {
110+
return NULL;
111+
}
112+
113+
S_API void *SteamInternal_CreateInterface() {
114+
return NULL;
115+
}
116+
117+
S_API void *SteamApps() {
118+
return NULL;
119+
}
120+
121+
S_API void *SteamClient() {
122+
return NULL;
123+
}
124+
125+
S_API void *SteamFriends() {
126+
return NULL;
127+
}
128+
129+
S_API void *SteamHTTP() {
130+
return NULL;
131+
}
132+
133+
S_API void *SteamMatchmaking() {
134+
return NULL;
135+
}
136+
137+
S_API void *SteamMatchmakingServers() {
138+
return NULL;
139+
}
140+
141+
S_API void *SteamNetworking() {
142+
return NULL;
143+
}
144+
145+
S_API void *SteamRemoteStorage() {
146+
return NULL;
147+
}
148+
149+
S_API void *SteamScreenshots() {
150+
return NULL;
151+
}
152+
153+
S_API void *SteamUser() {
154+
return NULL;
155+
}
156+
157+
S_API void *SteamUserStats() {
158+
return NULL;
159+
}
160+
161+
S_API void *SteamUtils() {
162+
return NULL;
163+
}
164+
165+
S_API int SteamGameServer_GetHSteamPipe() {
166+
return 0;
167+
}
168+
169+
S_API int SteamGameServer_GetHSteamUser() {
170+
return 0;
171+
}
172+
173+
S_API int SteamGameServer_GetIPCCallCount() {
174+
return 0;
175+
}
176+
177+
S_API int SteamGameServer_InitSafe() {
178+
return 0;
179+
}
180+
181+
S_API void SteamGameServer_RunCallbacks() {
182+
}
183+
184+
S_API void SteamGameServer_Shutdown() {
185+
}

stub_steam/wscript

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#! /usr/bin/env python
2+
# encoding: utf-8
3+
4+
from waflib import Utils
5+
import os
6+
7+
top = '.'
8+
PROJECT_NAME = 'steam_api'
9+
10+
def options(opt):
11+
# stub
12+
return
13+
14+
def configure(conf):
15+
return
16+
17+
def build(bld):
18+
source = [
19+
'steam_api.cpp'
20+
]
21+
22+
includes = [
23+
'.',
24+
'../public',
25+
'../public/tier0',
26+
] + bld.env.INCLUDES_SDL2
27+
28+
defines = []
29+
30+
libs = []
31+
32+
install_path = None if bld.env.BUILD_SDK else bld.env.LIBDIR
33+
34+
bld.shlib(
35+
source = source,
36+
target = PROJECT_NAME,
37+
name = PROJECT_NAME,
38+
features = 'c cxx',
39+
includes = includes,
40+
defines = defines,
41+
install_path = install_path,
42+
use = libs,
43+
subsystem = bld.env.MSVC_SUBSYSTEM,
44+
idx = bld.get_taskgen_count()
45+
)
46+

tier0/wscript

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def build(bld):
8787
else:
8888
libs = ['DL', 'M', 'LOG']
8989

90-
install_path = bld.env.LIBDIR
90+
install_path = None if bld.env.BUILD_SDK else bld.env.LIBDIR
9191

9292
bld.shlib(
9393
source = source,

0 commit comments

Comments
 (0)