diff --git a/.github/workflows/buildAndTest-FreeBSD.yml b/.github/workflows/buildAndTest-FreeBSD.yml index 8266ca1..8f7f35a 100644 --- a/.github/workflows/buildAndTest-FreeBSD.yml +++ b/.github/workflows/buildAndTest-FreeBSD.yml @@ -33,6 +33,9 @@ jobs: sudo pkg install -y cmake git ${{ matrix.lua }} "$C_COMPILER_PACKAGE" export LUA_BIN_NAME=${{ matrix.lua }} case ${{ matrix.lua }} in + *lua55*) + bash -x scripts/buildLuaRocks.sh "5.5" + ;; *lua54*) bash -x scripts/buildLuaRocks.sh "5.4" ;; diff --git a/.github/workflows/buildAndTest-MacOS.yml b/.github/workflows/buildAndTest-MacOS.yml index 67d4a24..4372bcb 100644 --- a/.github/workflows/buildAndTest-MacOS.yml +++ b/.github/workflows/buildAndTest-MacOS.yml @@ -21,16 +21,16 @@ jobs: if [[ "${{ matrix.compiler }}" = "gcc" ]]; then brew install gcc - luarocks config "variables.CMAKE_C_COMPILER" "$(brew --prefix)/bin/gcc-13" - luarocks config "variables.CMAKE_CXX_COMPILER" "$(brew --prefix)/bin/g++-13" + luarocks config "variables.CMAKE_C_COMPILER" "$(brew --prefix)/bin/gcc-15" + luarocks config "variables.CMAKE_CXX_COMPILER" "$(brew --prefix)/bin/g++-15" fi luarocks install luaunit - name: "Build Project" run: | if [[ "${{ matrix.compiler }}" = "gcc" ]]; then - export CXX_COMPILER="$(brew --prefix)/bin/g++-13" - export C_COMPILER="$(brew --prefix)/bin/gcc-13" + export CXX_COMPILER="$(brew --prefix)/bin/g++-15" + export C_COMPILER="$(brew --prefix)/bin/gcc-15" else export CXX_COMPILER="$(which clang++)" export C_COMPILER="$(which clang)" diff --git a/CMakeLists.txt b/CMakeLists.txt index dd51fd6..1dc7062 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ # Adapted from https://github.com/xpol/lua-rapidjson/blob/master/CMakeLists.txt -cmake_minimum_required(VERSION 3.14 FATAL_ERROR) +cmake_minimum_required(VERSION 3.6.0 FATAL_ERROR) set(FALLBACK_VERSION 0.0.1) set(TOML++ toml++) @@ -46,10 +46,10 @@ FetchContent_Declare( FetchContent_Declare( ${SOL2} - GIT_REPOSITORY "https://github.com/ThePhD/sol2.git" + GIT_REPOSITORY "https://github.com/halx99/sol2.git" GIT_SHALLOW ON GIT_SUBMODULES "" - GIT_TAG "v3.5.0" + GIT_TAG "16a9fabb7ae525d644d3343f15b1de39c8865ecd" ) FetchContent_Declare( @@ -57,7 +57,7 @@ FetchContent_Declare( GIT_REPOSITORY "https://github.com/Neargye/magic_enum.git" GIT_SHALLOW ON GIT_SUBMODULES "" - GIT_TAG "v0.9.7" + GIT_TAG "v0.9.8" ) FetchContent_GetProperties(${TOML++}) diff --git a/cmake/Modules/FindLua.cmake b/cmake/Modules/FindLua.cmake index 1380529..92e6fe9 100644 --- a/cmake/Modules/FindLua.cmake +++ b/cmake/Modules/FindLua.cmake @@ -1,138 +1,347 @@ -#.rst: -# FindLua -# ------- -# -# -# -# Locate Lua library This module defines -# -# :: -# -# LUA_FOUND - if false, do not try to link to Lua -# LUA_EXECUTABLE - path to lua executable -# LUA_LIBRARIES - both lua and lualib -# LUA_INCLUDE_DIR - where to find lua.h -# LUA_VERSION_STRING - the version of Lua found -# LUA_VERSION_MAJOR - the major version of Lua -# LUA_VERSION_MINOR - the minor version of Lua -# LUA_VERSION_PATCH - the patch version of Lua -# -# -# -# Note that the expected include convention is -# -# :: -# -# #include "lua.h" -# -# and not -# -# :: -# -# #include -# -# This is because, the lua location is not standardized and may exist in -# locations other than lua/ - -#============================================================================ -# Copyright 2007-2009 Kitware, Inc. -# Copyright 2013 Rolf Eike Beer -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -find_program(LUA_EXECUTABLE NAMES lua luajit lua51 lua5.1 lua52 lua5.2 lua53 lua5.3 luajit21 luajit20 DOC "lua executable") -if (APPLE AND LUA_EXECUTABLE MATCHES "\\.luaenv/shims") - execute_process(COMMAND luaenv which lua RESULT_VARIABLE STATUS OUTPUT_VARIABLE LUA_EXECUTABLE ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) -endif() - -if (LUA_EXECUTABLE) - get_filename_component(LUAENV_ROOT ${LUA_EXECUTABLE} DIRECTORY) - get_filename_component(LUAENV_ROOT ${LUAENV_ROOT} DIRECTORY) -endif() - -find_path(LUA_INCLUDE_DIR lua.h - HINTS - ENV LUA_DIR - PATH_SUFFIXES - include/lua51 include/lua5.1 include/lua-5.1 - include/lua52 include/lua5.2 include/lua-5.2 - include/lua53 include/lua5.3 include/lua-5.3 - include/luajit-2.1 include/luajit-2.0 - include/lua include - PATHS - ${LUAENV_ROOT} - ~/Library/Frameworks - /Library/Frameworks - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt -) +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file LICENSE.rst or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindLua +------- + +Finds the Lua library: + +.. code-block:: cmake + + find_package(Lua [] [...]) + +Lua is a embeddable scripting language. + +.. versionadded:: 3.18 + Support for Lua 5.4. + +.. versionadded:: 4.3 + Support for Lua 5.5. + +When working with Lua, its library headers are intended to be included in +project source code as: + +.. code-block:: c + + #include + +and not: + +.. code-block:: c + + #include + +This is because, the location of Lua headers may differ across platforms and may +exist in locations other than ``lua/``. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``Lua_FOUND`` + .. versionadded:: 3.3 + + Boolean indicating whether (the requested version of) Lua was found. + +``Lua_VERSION`` + .. versionadded:: 4.2 + + The version of Lua found. + +``Lua_VERSION_MAJOR`` + .. versionadded:: 4.2 + + The major version of Lua found. + +``Lua_VERSION_MINOR`` + .. versionadded:: 4.2 + + The minor version of Lua found. + +``Lua_VERSION_PATCH`` + .. versionadded:: 4.2 + + The patch version of Lua found. + +``LUA_LIBRARIES`` + Libraries needed to link against to use Lua. This list includes both ``lua`` + and ``lualib`` libraries. + +Cache Variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: + +``LUA_INCLUDE_DIR`` + The directory containing the Lua header files, such as ``lua.h``, + ``lualib.h``, and ``lauxlib.h``, needed to use Lua. + +Deprecated Variables +^^^^^^^^^^^^^^^^^^^^ + +The following variables are provided for backward compatibility: + +``LUA_FOUND`` + .. deprecated:: 4.2 + Use ``Lua_FOUND``, which has the same value. + + Boolean indicating whether (the requested version of) Lua was found. + +``LUA_VERSION_STRING`` + .. deprecated:: 4.2 + Superseded by the ``Lua_VERSION``. + + The version of Lua found. + +``LUA_VERSION_MAJOR`` + .. deprecated:: 4.2 + Superseded by the ``Lua_VERSION_MAJOR``. + + The major version of Lua found. + +``LUA_VERSION_MINOR`` + .. deprecated:: 4.2 + Superseded by the ``Lua_VERSION_MINOR``. + + The minor version of Lua found. + +``LUA_VERSION_PATCH`` + .. deprecated:: 4.2 + Superseded by the ``Lua_VERSION_PATCH``. + + The patch version of Lua found. + +Examples +^^^^^^^^ + +Finding the Lua library and creating an interface :ref:`imported target +` that encapsulates its usage requirements for linking to a +project target: + +.. code-block:: cmake + + find_package(Lua) + + if(Lua_FOUND AND NOT TARGET Lua::Lua) + add_library(Lua::Lua INTERFACE IMPORTED) + set_target_properties( + Lua::Lua + PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LUA_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "${LUA_LIBRARIES}" + ) + endif() + + target_link_libraries(project_target PRIVATE Lua::Lua) +#]=======================================================================] + +cmake_policy(PUSH) # Policies apply to functions at definition-time +cmake_policy(SET CMP0140 NEW) +cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_ + +unset(_lua_include_subdirs) +unset(_lua_library_names) +unset(_lua_append_versions) + +# this is a function only to have all the variables inside go away automatically +function(_lua_get_versions) + set(LUA_VERSIONS5 5.5 5.4 5.3 5.2 5.1 5.0) + + if (Lua_FIND_VERSION_EXACT) + if (Lua_FIND_VERSION_COUNT GREATER 1) + set(_lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}) + endif () + elseif (Lua_FIND_VERSION) + # once there is a different major version supported this should become a loop + if (NOT Lua_FIND_VERSION_MAJOR GREATER 5) + if (Lua_FIND_VERSION_COUNT EQUAL 1) + set(_lua_append_versions ${LUA_VERSIONS5}) + else () + foreach (subver IN LISTS LUA_VERSIONS5) + if (NOT subver VERSION_LESS ${Lua_FIND_VERSION}) + list(APPEND _lua_append_versions ${subver}) + endif () + endforeach () + # New version -> Search for it (heuristic only! Defines in include might have changed) + if (NOT _lua_append_versions) + set(_lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}) + endif() + endif () + endif () + else () + # once there is a different major version supported this should become a loop + set(_lua_append_versions ${LUA_VERSIONS5}) + endif () + + if (LUA_Debug) + message(STATUS "Considering following Lua versions: ${_lua_append_versions}") + endif() + + set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE) +endfunction() + +function(_lua_set_version_vars) + set(_lua_include_subdirs_raw "lua") + + foreach (ver IN LISTS _lua_append_versions) + string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}") + list(APPEND _lua_include_subdirs_raw + lua${CMAKE_MATCH_1}${CMAKE_MATCH_2} + lua${CMAKE_MATCH_1}.${CMAKE_MATCH_2} + lua-${CMAKE_MATCH_1}.${CMAKE_MATCH_2} + ) + endforeach () + + # Prepend "include/" to each path directly after the path + set(_lua_include_subdirs "include") + foreach (dir IN LISTS _lua_include_subdirs_raw) + list(APPEND _lua_include_subdirs "${dir}" "include/${dir}") + endforeach () + + set(_lua_include_subdirs "${_lua_include_subdirs}" PARENT_SCOPE) +endfunction() + +function(_lua_get_header_version) + unset(Lua_VERSION PARENT_SCOPE) + set(_hdr_file "${LUA_INCLUDE_DIR}/lua.h") + + if (NOT EXISTS "${_hdr_file}") + return() + endif () + + # At least 5.[012] have different ways to express the version + # so all of them need to be tested. Lua 5.2 defines LUA_VERSION + # and LUA_RELEASE as joined by the C preprocessor, so avoid those. + file(STRINGS "${_hdr_file}" lua_version_strings + REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*") + + string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR(_N)?[ \t]+\"?([0-9])\"?[ \t]*;.*" "\\2" Lua_VERSION_MAJOR ";${lua_version_strings};") + + if (Lua_VERSION_MAJOR MATCHES "^[0-9]+$") + string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR(_N)?[ \t]+\"?([0-9])\"?[ \t]*;.*" "\\2" Lua_VERSION_MINOR ";${lua_version_strings};") + string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE(_N)?[ \t]+\"?([0-9])\"?[ \t]*;.*" "\\2" Lua_VERSION_PATCH ";${lua_version_strings};") + set(Lua_VERSION "${Lua_VERSION_MAJOR}.${Lua_VERSION_MINOR}.${Lua_VERSION_PATCH}") + else () + string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" Lua_VERSION ";${lua_version_strings};") + if (NOT Lua_VERSION MATCHES "^[0-9.]+$") + string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" Lua_VERSION ";${lua_version_strings};") + endif () + string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" Lua_VERSION_MAJOR "${Lua_VERSION}") + string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" Lua_VERSION_MINOR "${Lua_VERSION}") + string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" Lua_VERSION_PATCH "${Lua_VERSION}") + endif () + foreach (ver IN LISTS _lua_append_versions) + if (ver STREQUAL "${Lua_VERSION_MAJOR}.${Lua_VERSION_MINOR}") + set(LUA_VERSION_STRING "${Lua_VERSION}") + set(LUA_VERSION_MAJOR "${Lua_VERSION_MAJOR}") + set(LUA_VERSION_MINOR "${Lua_VERSION_MINOR}") + set(LUA_VERSION_PATCH "${Lua_VERSION_PATCH}") + + return( + PROPAGATE + Lua_VERSION + Lua_VERSION_MAJOR + Lua_VERSION_MINOR + Lua_VERSION_PATCH + LUA_VERSION_STRING + LUA_VERSION_MAJOR + LUA_VERSION_MINOR + LUA_VERSION_PATCH + ) + endif () + endforeach () +endfunction() + +function(_lua_find_header) + _lua_set_version_vars() + + # Initialize as local variable + set(CMAKE_IGNORE_PATH ${CMAKE_IGNORE_PATH}) + while (TRUE) + # Find the next header to test. Check each possible subdir in order + # This prefers e.g. higher versions as they are earlier in the list + # It is also consistent with previous versions of FindLua + foreach (subdir IN LISTS _lua_include_subdirs) + find_path(LUA_INCLUDE_DIR lua.h + HINTS ENV LUA_DIR + PATH_SUFFIXES ${subdir} + ) + if (LUA_INCLUDE_DIR) + break() + endif() + endforeach() + # Did not found header -> Fail + if (NOT LUA_INCLUDE_DIR) + return() + endif() + _lua_get_header_version() + # Found accepted version -> Ok + if (Lua_VERSION) + if (LUA_Debug) + message(STATUS "Found suitable version ${Lua_VERSION} in ${LUA_INCLUDE_DIR}/lua.h") + endif() + return() + endif() + # Found wrong version -> Ignore this path and retry + if (LUA_Debug) + message(STATUS "Ignoring unsuitable version in ${LUA_INCLUDE_DIR}") + endif() + list(APPEND CMAKE_IGNORE_PATH "${LUA_INCLUDE_DIR}") + unset(LUA_INCLUDE_DIR CACHE) + unset(LUA_INCLUDE_DIR) + unset(LUA_INCLUDE_DIR PARENT_SCOPE) + endwhile () +endfunction() + +_lua_get_versions() +_lua_find_header() +_lua_get_header_version() +unset(_lua_append_versions) + +if (Lua_VERSION) + set(_lua_library_names + lua${Lua_VERSION_MAJOR}${Lua_VERSION_MINOR} + lua${Lua_VERSION_MAJOR}.${Lua_VERSION_MINOR} + lua-${Lua_VERSION_MAJOR}.${Lua_VERSION_MINOR} + lua.${Lua_VERSION_MAJOR}.${Lua_VERSION_MINOR} + ) +endif () find_library(LUA_LIBRARY - NAMES lua5.1 lua51 lua5.2 lua52 lua5.3 lua53 luajit-5.1 lua + NAMES ${_lua_library_names} lua + NAMES_PER_DIR HINTS ENV LUA_DIR PATH_SUFFIXES lib - PATHS - ${LUAENV_ROOT} - ~/Library/Frameworks - /Library/Frameworks - /sw - /opt/local - /opt/csw - /opt ) +unset(_lua_library_names) if (LUA_LIBRARY) - # include the math library for Unix - if (UNIX AND NOT APPLE AND NOT BEOS) - find_library(LUA_MATH_LIBRARY m) - set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}") - # For Windows and Mac, don't need to explicitly include the math library - else () - set(LUA_LIBRARIES "${LUA_LIBRARY}") - endif () -endif() - -if (LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h") - # At least 5.[012] have different ways to express the version - # so all of them need to be tested. Lua 5.2 defines LUA_VERSION - # and LUA_RELEASE as joined by the C preprocessor, so avoid those. - file(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_strings - REGEX "^#define[ \t]+LUA_(RELEASE[ \t]+\"Lua [0-9]|VERSION([ \t]+\"Lua [0-9]|_[MR])).*") - - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MAJOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MAJOR ";${lua_version_strings};") - if (LUA_VERSION_MAJOR MATCHES "^[0-9]+$") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_MINOR[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_MINOR ";${lua_version_strings};") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION_RELEASE[ \t]+\"([0-9])\"[ \t]*;.*" "\\1" LUA_VERSION_PATCH ";${lua_version_strings};") - set(LUA_VERSION_STRING "${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}.${LUA_VERSION_PATCH}") - else () - string(REGEX REPLACE ".*;#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") - if (NOT LUA_VERSION_STRING MATCHES "^[0-9.]+$") - string(REGEX REPLACE ".*;#define[ \t]+LUA_VERSION[ \t]+\"Lua ([0-9.]+)\"[ \t]*;.*" "\\1" LUA_VERSION_STRING ";${lua_version_strings};") - endif () - string(REGEX REPLACE "^([0-9]+)\\.[0-9.]*$" "\\1" LUA_VERSION_MAJOR "${LUA_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.([0-9]+)[0-9.]*$" "\\1" LUA_VERSION_MINOR "${LUA_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]).*" "\\1" LUA_VERSION_PATCH "${LUA_VERSION_STRING}") - endif () + # include the math library for Unix + if (UNIX AND NOT APPLE AND NOT BEOS) + find_library(LUA_MATH_LIBRARY m) + mark_as_advanced(LUA_MATH_LIBRARY) + set(LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}") - unset(lua_version_strings) -endif() + # include dl library for statically-linked Lua library + get_filename_component(LUA_LIB_EXT ${LUA_LIBRARY} EXT) + if(LUA_LIB_EXT STREQUAL CMAKE_STATIC_LIBRARY_SUFFIX) + list(APPEND LUA_LIBRARIES ${CMAKE_DL_LIBS}) + endif() + + # For Windows and Mac, don't need to explicitly include the math library + else () + set(LUA_LIBRARIES "${LUA_LIBRARY}") + endif () +endif () include(FindPackageHandleStandardArgs) -# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if -# all listed variables are TRUE find_package_handle_standard_args(Lua REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR - VERSION_VAR LUA_VERSION_STRING) + VERSION_VAR Lua_VERSION) + +mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY) -mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY) +cmake_policy(POP) \ No newline at end of file diff --git a/scripts/buildLuaRocks.sh b/scripts/buildLuaRocks.sh index d8ae004..2db72f0 100755 --- a/scripts/buildLuaRocks.sh +++ b/scripts/buildLuaRocks.sh @@ -1,4 +1,4 @@ -# First argument is the Lua version Luarocks should use: 5.4, 5.3, 5.2, 5.1 +# First argument is the Lua version Luarocks should use: 5.5, 5.4, 5.3, 5.2, 5.1 case $(uname -v) in *FreeBSD*) @@ -9,12 +9,15 @@ case $(uname -v) in ;; esac -wget "https://luarocks.org/releases/luarocks-3.12.2.tar.gz" -tar -zxpf luarocks-3.12.2.tar.gz -rm luarocks-3.12.2.tar.gz -cd luarocks-3.12.2 +wget "https://luarocks.org/releases/luarocks-3.13.0.tar.gz" +tar -zxpf luarocks-3.13.0.tar.gz +rm luarocks-3.13.0.tar.gz +cd luarocks-3.13.0 case $1 in + *5.5*) + ./configure --lua-version="5.5" + ;; *5.4*) ./configure --lua-version="5.4" ;; diff --git a/scripts/installLuaRocks.ps1 b/scripts/installLuaRocks.ps1 index fe212ea..ca65480 100644 --- a/scripts/installLuaRocks.ps1 +++ b/scripts/installLuaRocks.ps1 @@ -9,10 +9,10 @@ if (-not (Test-Path -Path $installDir)) { $installDir = Resolve-Path $installDir -Invoke-WebRequest -Uri "http://luarocks.github.io/luarocks/releases/luarocks-3.12.2-windows-32.zip" -OutFile "luarocks.zip" +Invoke-WebRequest -Uri "http://luarocks.github.io/luarocks/releases/luarocks-3.13.0-windows-32.zip" -OutFile "luarocks.zip" Expand-Archive -Path "luarocks.zip" -DestinationPath "." -Move-Item -Path "luarocks-3.12.2-windows-32\luarocks.exe" -Destination "$($installDir)" -Move-Item -Path "luarocks-3.12.2-windows-32\luarocks-admin.exe" -Destination "$($installDir)" +Move-Item -Path "luarocks-3.13.0-windows-32\luarocks.exe" -Destination "$($installDir)" +Move-Item -Path "luarocks-3.13.0-windows-32\luarocks-admin.exe" -Destination "$($installDir)" Remove-Item "luarocks.zip" Remove-Item -Recurse -Force "luarocks-3.12.2-windows-32" \ No newline at end of file