Skip to content

Commit 36d76cd

Browse files
Merge pull request #393 from ladislav-zezula/LZ_BlizzardCompatibleNames
* Replaced GetLastError with SErrGetLastError * Members of TMPQHash have now the same names like in Blizzard sources * Fixed bug in SFileRenameFile that falsely reported an existing file if it had different locale.
2 parents b41cda4 + db410fd commit 36d76cd

27 files changed

+442
-299
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,32 @@ jobs:
8484
working-directory: ./build/Release
8585
run: |
8686
file "stormlib.dll"
87-
file "stormlib.dll" |grep "x86-64"
87+
file "stormlib.dll" |grep "x86-64"
88+
89+
windows-latest-x86:
90+
if: true
91+
runs-on: windows-latest
92+
93+
steps:
94+
- uses: actions/checkout@v4
95+
96+
- uses: TheMrMilchmann/setup-msvc-dev@v3
97+
with:
98+
arch: x86
99+
100+
- name: Cmake
101+
run: cmake -B build -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D BUILD_SHARED_LIBS=ON
102+
103+
- name: Build
104+
run: cmake --build build --config Release
105+
106+
- name: Debug
107+
shell: bash
108+
run: ls -la build
109+
110+
- name: Check PE
111+
shell: bash
112+
working-directory: ./build/Release
113+
run: |
114+
file "stormlib.dll"
115+
file "stormlib.dll" |grep "x86-64"

make-msvc.bat

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ if exist "%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Enterprise\VC\Auxilia
2525
if exist "%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat" set VCVARS_20xx=%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvarsall.bat
2626
if exist "%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" set VCVARS_20xx=%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
2727

28-
:: Build all libraries using Visual Studio 2008 and 202x
28+
:: Build all libraries using Visual Studio 2008
29+
rmdir /S /Q .\bin\%LIB_NAME%
2930
if not "x%VCVARS_2008%" == "x" call :BuildLibs "%VCVARS_2008%" x86 %LIB_NAME%_vs08.sln vs2008
3031
if not "x%VCVARS_2008%" == "x" call :BuildLibs "%VCVARS_2008%" x64 %LIB_NAME%_vs08.sln vs2008
32+
33+
:: Build all libraries using Visual Studio 2017+
34+
rmdir /S /Q .\bin\%LIB_NAME%
3135
if not "x%VCVARS_20xx%" == "x" call :BuildLibs "%VCVARS_20xx%" x86 %LIB_NAME%.sln
3236
if not "x%VCVARS_20xx%" == "x" call :BuildLibs "%VCVARS_20xx%" x64 %LIB_NAME%.sln
3337
goto:eof
@@ -92,7 +96,7 @@ devenv.com %1 /project "%LIB_NAME%" /rebuild "%5|%2"
9296
if not exist ..\aaa goto:eof
9397
if not exist ..\aaa\inc md ..\aaa\inc
9498
if not exist ..\aaa\%3 md ..\aaa\%3
95-
copy /Y /D .\src\StormLib.h ..\aaa\inc >nul
96-
copy /Y /D .\src\StormPort.h ..\aaa\inc >nul
97-
copy /Y /D .\bin\StormLib\%2\%5\%4.lib ..\aaa\%3\%4.lib >nul
98-
copy /Y /D .\bin\StormLib\%2\%5\%4.pdb ..\aaa\%3\%4.pdb >nul
99+
copy /Y .\src\StormLib.h ..\aaa\inc >nul
100+
copy /Y .\src\StormPort.h ..\aaa\inc >nul
101+
copy /Y .\bin\%LIB_NAME%\%2\%5\%4.lib ..\aaa\%3\%4.lib >nul
102+
copy /Y .\bin\%LIB_NAME%\%2\%5\%4.pdb ..\aaa\%3\%4.pdb >nul

make.bat

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
@echo off
2-
if not "x%WDKDIR%" == "x" goto SELECT_LIB
2+
if not "x%WDKDIR%" == "x" goto SELECT_BINARY
33
echo The WDKDIR environment variable is not set
44
echo Set this variable to your WDK directory (without ending backslash)
55
echo Example: set WDKDIR C:\WinDDK\6001
66
pause
77
goto:eof
88

9-
:SELECT_LIB
9+
:SELECT_BINARY
1010
set PROJECT_DIR=%~dp0
11-
set LIBRARY_NAME=StormLibWDK
1211
set SAVE_PATH=%PATH%
12+
set BINARY_NAME=StormLibWDK
1313

1414
:PREPARE_SOURCES
1515
echo Preparing sources ...
1616
copy .\src\wdk\sources-cpp.cpp . >nul
1717
copy .\src\wdk\sources-wdk-* . >nul
1818
echo.
1919

20-
:BUILD_LIB_32
21-
echo Building %LIBRARY_NAME%.lib (32-bit) ...
20+
:BUILD_BINARY_64
21+
echo Building %BINARY_NAME%.lib (64-bit) ...
2222
set DDKBUILDENV=
23-
call %WDKDIR%\bin\setenv.bat %WDKDIR%\ fre w2k
24-
cd %PROJECT_DIR%
23+
call %WDKDIR%\bin\setenv.bat %WDKDIR%\ fre x64 wnet
24+
cd /d %PROJECT_DIR%
2525
build.exe -czgw
26-
del buildfre_w2k_x86.log
26+
del buildfre_wnet_amd64.log
2727
echo.
2828

29-
:BUILD_LIB_64
30-
echo Building %LIBRARY_NAME%.lib (64-bit) ...
29+
:BUILD_BINARY_32
30+
echo Building %BINARY_NAME%.lib (32-bit) ...
3131
set DDKBUILDENV=
32-
call %WDKDIR%\bin\setenv.bat %WDKDIR%\ fre x64 WLH
33-
cd %PROJECT_DIR%
32+
call %WDKDIR%\bin\setenv.bat %WDKDIR%\ fre w2k
33+
cd /d %PROJECT_DIR%
3434
build.exe -czgw
35-
del buildfre_wlh_amd64.log
35+
del buildfre_w2k_x86.log
3636
echo.
3737

3838
:COPY_OUTPUT
@@ -42,12 +42,11 @@ if not exist ..\aaa\lib32 md ..\aaa\lib32
4242
if not exist ..\aaa\lib64 md ..\aaa\lib64
4343
copy /Y .\src\StormLib.h ..\aaa\inc >nul
4444
copy /Y .\src\StormPort.h ..\aaa\inc >nul
45-
copy /Y .\objfre_wlh_amd64\amd64\%LIBRARY_NAME%.lib ..\aaa\lib64\%LIBRARY_NAME%.lib >nul
46-
copy /Y .\objfre_w2k_x86\i386\%LIBRARY_NAME%.lib ..\aaa\lib32\%LIBRARY_NAME%.lib >nul
45+
copy /Y .\objfre_wnet_amd64\amd64\%BINARY_NAME%.lib ..\aaa\lib64\%BINARY_NAME%.lib >nul
46+
copy /Y .\objfre_w2k_x86\i386\%BINARY_NAME%.lib ..\aaa\lib32\%BINARY_NAME%.lib >nul
4747

4848
:CLEANUP
4949
if exist sources-cpp.cpp del sources-cpp.cpp
5050
if exist sources-wdk-* del sources-wdk-*
5151
if exist build.bat del build.bat
5252
set PATH=%SAVE_PATH%
53-
set SAVE_PATH=

0 commit comments

Comments
 (0)