Skip to content

Commit

Permalink
Infrastructure: simplify Luarocks setup on Windows (Mudlet#7376)
Browse files Browse the repository at this point in the history
<!-- Keep the title short & concise so anyone non-technical can
understand it,
     the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
Simplify Luarocks setup on Windows
#### Motivation for adding to Mudlet
Less is more and msys2/MINGW-packages#12002 is
fixed
#### Other info (issues closed, discussion etc)
To be tested if Windows setup still works after this
  • Loading branch information
vadi2 authored Dec 11, 2024
1 parent 6664f4c commit 5cd19c6
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions CI/setup-windows-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,27 +215,6 @@ echo "- Use '--tree \"user\"' (literally) instead of '--local'"
echo "- Adjust LUA_PATH and LUA_CPATH to find per-user modules"
echo "- See 'luarocks path --help' for details"

# Need to overcome a problem with luarock 3.9.0 which uses Windows CMD MKDIR
# but which cannot make any missing intermediate directories if the
# luafilesystem module for Lua 5.4 is not present, see:
# https://github.com/msys2/MINGW-packages/pull/12002
if [ "$(luarocks --lua-version 5.4 list | grep -c "luafilesystem")" -eq 0 ]; then
# Need to install the 5.4 luafilesystem rock
echo " Improving the luarocks operation by installing the 5.4 luafilesystem rock."
neededPath=$(${MINGW_INTERNAL_BASE_DIR}/bin/luarocks --lua-version 5.4 install luafilesystem 2>&1 | grep "failed making directory" | cut -c 32-)
until [ -z "${neededPath}" ]; do
echo " Inserting a needed directory: ${neededPath} ..."
mkdir -p "${neededPath}"
neededPath=$(${MINGW_INTERNAL_BASE_DIR}/bin/luarocks --lua-version 5.4 install luafilesystem 2>&1 | grep "failed making directory" | cut -c 32-)
echo ""
done
echo " Completed"
echo ""
fi

# Doing the above fixes things for 5.1 luarocks subsequently (as luarocks
# itself runs in a Lua 5.4 environment) - otherwise one has to do the same thing
# for EVERY luarock!

ROCKCOMMAND="${MINGW_INTERNAL_BASE_DIR}/bin/luarocks --lua-version 5.1"
echo ""
Expand Down

0 comments on commit 5cd19c6

Please sign in to comment.