Skip to content

Commit

Permalink
[ci] powershell can't download lua binaries from sourceforge anymore;…
Browse files Browse the repository at this point in the history
… build lua locally using https://github.com/walterschell/Lua
  • Loading branch information
vovkos committed May 17, 2024
1 parent 94a97f9 commit a94b8d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
set THIS_DIR_CMAKE=%THIS_DIR:\=/%
call ci\github-actions\set-env.bat msvc16 ${{matrix.TARGET_CPU}}
call axl\ci\github-actions\build-lua.bat
mkdir %DOWNLOAD_DIR%\expat\build
cd %DOWNLOAD_DIR%\expat\build
Expand Down
13 changes: 4 additions & 9 deletions ci/github-actions/install-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,14 @@ echo set (RAGEL_EXE %DOWNLOAD_DIR_CMAKE%/ragel.exe) >> paths.cmake

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

:: Lua (download from SourceForge, need PowerShell user agent to handle redirect)
:: Lua (CMake-based)

echo Downloading Lua...

mkdir %DOWNLOAD_DIR%\lua
powershell "Invoke-WebRequest -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox -Uri %LUA_DOWNLOAD_URL% -OutFile %DOWNLOAD_DIR%\lua\lua.zip"
7z x -y %DOWNLOAD_DIR%\lua\lua.zip -o%DOWNLOAD_DIR%\lua

echo set (LUA_INC_DIR %DOWNLOAD_DIR_CMAKE%/lua/include) >> paths.cmake
echo set (LUA_LIB_DIR %DOWNLOAD_DIR_CMAKE%/lua) >> paths.cmake
echo set (LUA_DLL_DIR %DOWNLOAD_DIR_CMAKE%/lua) >> paths.cmake
echo set (LUA_LIB_NAME %LUA_LIB_NAME%) >> paths.cmake
echo set (OPENSSL_INC_DIR DISABLED) >> paths.cmake
powershell "Invoke-WebRequest -Uri %LUA_DOWNLOAD_URL% -OutFile %DOWNLOAD_DIR%\lua\lua.zip"
7z x -y %DOWNLOAD_DIR%\lua\lua.zip
ren Lua-%LUA_VERSION% lua

:: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Expand Down
6 changes: 2 additions & 4 deletions ci/github-actions/set-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,8 @@ if "%CONFIGURATION%" == "" (set CONFIGURATION=Release)
if "%CMAKE_USE_ARCH_OPTIONS%" == "" (set CMAKE_GENERATOR=%CMAKE_GENERATOR%%CMAKE_ARCH_SUFFIX%)
if not "%CMAKE_USE_ARCH_OPTIONS%" == "" (set CMAKE_OPTIONS=%CMAKE_OPTIONS%%CMAKE_ARCH_OPTIONS%)

set LUA_VERSION=5.3.5
set LUA_LIB_NAME=lua53
set LUA_DOWNLOAD_URL=https://sourceforge.net/projects/luabinaries/files/%LUA_VERSION%/Windows%%20Libraries/Dynamic/lua-%LUA_VERSION%_%LUA_PLATFORM%_%LUA_TOOLCHAIN%_lib.zip/download
set LUA_VERSION=5.4.5
set LUA_DOWNLOAD_URL=https://github.com/walterschell/Lua/archive/refs/tags/v%LUA_VERSION%.zip

set EXPAT_VERSION=2.1.0
set EXPAT_VERSION_TAG=R_2_1_0
Expand All @@ -114,7 +113,6 @@ set CMAKE_BUILD_FLAGS= ^
/consoleloggerparameters:Summary

echo ---------------------------------------------------------------------------
echo LUA_LIB_NAME: %LUA_LIB_NAME%
echo LUA_DOWNLOAD_URL: %LUA_DOWNLOAD_URL%
echo EXPAT_DOWNLOAD_URL: %EXPAT_DOWNLOAD_URL%
echo RAGEL_DOWNLOAD_URL: %RAGEL_DOWNLOAD_URL%
Expand Down

0 comments on commit a94b8d5

Please sign in to comment.