Giter Club home page Giter Club logo

luawinmulti's Introduction

Multi-lua for Windows script

This batchfile will download, compile and configure a Lua installation with versions 5.1, 5.2, and 5.3 in parallel. Including the accompanying LuaRocks package manager for each version.

Prerequisites

Make sure you have a compiler in your path;

  • MinGW in your system path (msys is not required)
  • for MS compilers, call make.bat from the Visual Studio (or Win SDK) commandshell

Command

Command:
  MAKE [--clean] [--cleantarget] [--nocompat] [--51] [--52] [--53] [install [<location>]]

  --51, --52, --53   : specify the versions to install, default is to install
                       all versions. Applies only to installing, all versions will be
                       build independent of this option.
                       The first version listed will be set as the unversioned default.
  --clean            : removes downloaded and build artifacts, forcing a rebuild
  --cleantarget      : removes the target directory before installing. NOTE: the LuaRocks
                       installation will ALWAYS be removed, independent of this option!
  --nocompat         : build Lua without compatibility options. NOTE: this option
                       will not automatically clean. So clean when switching compatibility.
  install <location> : will install (and build if necessary) the Lua versions. Default
                       location is 'C:\Lua'

  --help             : Display this help text

Example: the following commands, executed after each other will;
  make install
                 Will download, build and install 3 Lua versions in 'C:\Lua', 5.1 will
                 be set as the default.

  make --51 --52 install C:\lua2
                 Will only install (no rebuild, binaries allready exist) 5.1 and 5.2 in
                 'C:\Lua2'. 5.1 will be set as the default.

  make --clean --53 --nocompat install C:\Lua_NoCompat
                 Will download and build all versions again, without compatibility options,
                 and then install only 5.3 in 'C:\Lua_NoCompat'. 5.3 will be set as the
                 default.

What it does

  • Downloads and unpacks sources of LuaRocks, LuaWinmake (used for building), and Lua
  • Compiles the Lua versions from source (using LuaWinMake)
  • Installs the Lua versions (versioned; using the LuaWinMake command installv)
  • Installs LuaRocks for each version
  • default Lua version will be set to Lua 5.1 (see setlua below)

Usage

Each Lua version will have its own executable; lua51.exe, lua52.exe, and lua53.exe. And for LuaRocks 3 batchfiles will be generated; luarocks51.bat, luarocks52.bat, and luarocks53.bat.

The luarocks batch files will be in the same directory as the lua executables, so only the Lua path has to be added to the system path.

The utility setlua.bat will setup default versions for Lua and LuaRocks unversioned commands. eg. setlua 53 will create a copy of lua53.exe as lua.exe, and will create a batch file luarocks.bat that will invoke luarocks53.bat. Besides that it will add the Lua location to the system path and install all LuaRocks system rocktrees into the respective Lua path environment variables.

Calling setlua.bat without a parameter will only set the paths and not change the unversioned lua and luarocks commands. This can be used as a Lua commandshell specific for this environment. For example; create a shortcut with target C:\Windows\System32\cmd.exe /k c:\lua\bin\setlua.bat (assuming the default Lua location c:\lua).

License

Copyright 2015 - Thijs Schreijer. MIT license for this project. Please note that other components are included which are covered by different licenses. See COPYING file for details.

luawinmulti's People

Contributors

tieske avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.