When more than one version of Lua is used, the interpreter that is used in DOS or Powershell is dependent on the order of the entries in PATH.
There are multiple ways to handle this. The logic should be something like this:
Possible solution
Find all WinLua paths and order them by arch/version:
x86/5.3; x64/5.3; x86/5.1; x64/5.1;
I think 32 bit first because the casual command line use of "lua" doesn't really require 64 bits?
This should be done as a custom WIX event that uses whatever newly installed instance of lua we have.
Outstanding
The proposed solution does not help with calling the correct version of Lua from the command line that you'd expect. I propose adding a new folder to the WinLua directory that contains links named like in FreeBSD (modified):
lua53 = Lua 5.3 32 Bit
lua53_64 = Lua 5.3 64 Bit
lua51 = Lua 5.1 32 Bit
lua51_64 = Lua 5.3 64 Bit
If this folder were added before all the others, then users could select their version from the command line, edit the links to their preference, or simply call "lua and fall back to the PATH, which is ordered by version
Issue
When more than one version of Lua is used, the interpreter that is used in DOS or Powershell is dependent on the order of the entries in PATH. There are multiple ways to handle this. The logic should be something like this:
Possible solution
Find all WinLua paths and order them by arch/version: x86/5.3; x64/5.3; x86/5.1; x64/5.1;
I think 32 bit first because the casual command line use of "lua" doesn't really require 64 bits?
This should be done as a custom WIX event that uses whatever newly installed instance of lua we have.
Outstanding
The proposed solution does not help with calling the correct version of Lua from the command line that you'd expect. I propose adding a new folder to the WinLua directory that contains links named like in FreeBSD (modified):
If this folder were added before all the others, then users could select their version from the command line, edit the links to their preference, or simply call "lua and fall back to the PATH, which is ordered by version