Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,32 @@ jobs:
working-directory: ./build/Release
run: |
file "stormlib.dll"
file "stormlib.dll" |grep "x86-64"
file "stormlib.dll" |grep "x86-64"

windows-latest-x86:
if: true
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x86

- name: Cmake
run: cmake -B build -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D BUILD_SHARED_LIBS=ON

- name: Build
run: cmake --build build --config Release

- name: Debug
shell: bash
run: ls -la build

- name: Check PE
shell: bash
working-directory: ./build/Release
run: |
file "stormlib.dll"
file "stormlib.dll" |grep "x86-64"
14 changes: 9 additions & 5 deletions make-msvc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ if exist "%PROGRAM_FILES_X64%\Microsoft Visual Studio\2022\Enterprise\VC\Auxilia
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
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

:: Build all libraries using Visual Studio 2008 and 202x
:: Build all libraries using Visual Studio 2008
rmdir /S /Q .\bin\%LIB_NAME%
if not "x%VCVARS_2008%" == "x" call :BuildLibs "%VCVARS_2008%" x86 %LIB_NAME%_vs08.sln vs2008
if not "x%VCVARS_2008%" == "x" call :BuildLibs "%VCVARS_2008%" x64 %LIB_NAME%_vs08.sln vs2008

:: Build all libraries using Visual Studio 2017+
rmdir /S /Q .\bin\%LIB_NAME%
if not "x%VCVARS_20xx%" == "x" call :BuildLibs "%VCVARS_20xx%" x86 %LIB_NAME%.sln
if not "x%VCVARS_20xx%" == "x" call :BuildLibs "%VCVARS_20xx%" x64 %LIB_NAME%.sln
goto:eof
Expand Down Expand Up @@ -92,7 +96,7 @@ devenv.com %1 /project "%LIB_NAME%" /rebuild "%5|%2"
if not exist ..\aaa goto:eof
if not exist ..\aaa\inc md ..\aaa\inc
if not exist ..\aaa\%3 md ..\aaa\%3
copy /Y /D .\src\StormLib.h ..\aaa\inc >nul
copy /Y /D .\src\StormPort.h ..\aaa\inc >nul
copy /Y /D .\bin\StormLib\%2\%5\%4.lib ..\aaa\%3\%4.lib >nul
copy /Y /D .\bin\StormLib\%2\%5\%4.pdb ..\aaa\%3\%4.pdb >nul
copy /Y .\src\StormLib.h ..\aaa\inc >nul
copy /Y .\src\StormPort.h ..\aaa\inc >nul
copy /Y .\bin\%LIB_NAME%\%2\%5\%4.lib ..\aaa\%3\%4.lib >nul
copy /Y .\bin\%LIB_NAME%\%2\%5\%4.pdb ..\aaa\%3\%4.pdb >nul
31 changes: 15 additions & 16 deletions make.bat
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
@echo off
if not "x%WDKDIR%" == "x" goto SELECT_LIB
if not "x%WDKDIR%" == "x" goto SELECT_BINARY
echo The WDKDIR environment variable is not set
echo Set this variable to your WDK directory (without ending backslash)
echo Example: set WDKDIR C:\WinDDK\6001
pause
goto:eof

:SELECT_LIB
:SELECT_BINARY
set PROJECT_DIR=%~dp0
set LIBRARY_NAME=StormLibWDK
set SAVE_PATH=%PATH%
set BINARY_NAME=StormLibWDK

:PREPARE_SOURCES
echo Preparing sources ...
copy .\src\wdk\sources-cpp.cpp . >nul
copy .\src\wdk\sources-wdk-* . >nul
echo.

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

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

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

:CLEANUP
if exist sources-cpp.cpp del sources-cpp.cpp
if exist sources-wdk-* del sources-wdk-*
if exist build.bat del build.bat
set PATH=%SAVE_PATH%
set SAVE_PATH=
Loading
Loading