nillerusr / source-engine

Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
Other
1.13k stars 174 forks source link

[Windows] Fix dedicated server build #322

Closed dimhotepus closed 6 months ago

dimhotepus commented 7 months ago

Dedicated server is not build on Windows, see CI log:

https://github.com/nillerusr/source-engine/actions/runs/7013944669/job/19080884554

sys_ded.cpp.5.o : error LNK2001: unresolved external symbol "public: virtual int __cdecl CTextConsoleWin32::GetWidth(void)" (?GetWidth@CTextConsoleWin32@@UEAAHXZ)

sys_ded.cpp.5.o : error LNK2001: unresolved external symbol "public: virtual void __cdecl CTextConsoleWin32::SetVisible(bool)" (?SetVisible@CTextConsoleWin32@@UEAAX_N@Z)

sys_ded.cpp.5.o : error LNK2001: unresolved external symbol "char * gpszCvars" (?gpszCvars@@3PEADEA)

basefilesystem.cpp.5.o : error LNK2019: unresolved external symbol __imp_SHGetFileInfoW referenced in function "public: virtual bool __cdecl CBaseFileSystem::GetFileTypeForFullPath(char const *,wchar_t *,unsigned __int64)" (?GetFileTypeForFullPath@CBaseFileSystem@@UEAA_NPEBDPEA_W_K@Z)

sys_windows.cpp.5.o : error LNK2019: unresolved external symbol __imp_PostQuitMessage referenced in function "public: virtual void __cdecl CSys::ErrorMessage(int,char const *)" (?ErrorMessage@CSys@@UEAAXHPEBD@Z)

sys_windows.cpp.5.o : error LNK2019: unresolved external symbol __imp_CommandLineToArgvW referenced in function DedicatedMain

sys_windows.cpp.5.o : error LNK2019: unresolved external symbol "void __cdecl VGUIPrintf(char const *)" (?VGUIPrintf@@YAXPEBD@Z) referenced in function "public: virtual void __cdecl CSys::ConsoleOutput(char *)" (?ConsoleOutput@CSys@@UEAAXPEAD@Z)

D:\a\source-engine\source-engine\build\dedicated\dedicated.dll : warning LNK4088: image being generated due to /FORCE option; image may not run

/FORCE option hides linker errors and result image is not runnable.

Now it should be fixed.

Closes https://github.com/nillerusr/source-engine/issues/310

nillerusr commented 6 months ago
  File "/home/runner/work/source-engine/source-engine/dedicated/wscript", line 63
    if bld.env.DEST_OS == 'win32':
                                 ^
TabError: inconsistent use of tabs and spaces in indentation

Cool, you(or your IDE) used spaces instead of tabs.