You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-The environmental variable `%APPDATA%` is now set to `%APPDATA%\LJ4W` to ensure LuaRocks isolation and prevent conflicts with pre-existing LuaRocks trees
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ LuaJIT for Windows is designed with portability and flexibility in mind. Once th
25
25
The `LuaJIT-For-Windows.cmd` acts as both a Lua script launcher and development environment all in one and allows you to seamlessly run different implementations of Lua all from the same script. In fact, you can even set `LuaJIT-For-Windows.cmd` as the default application to open any file with a `.lua`, `.luac`, or other Lua file extension and it will automatically launch it using your pre-configured settings. At the same time, because of the ability `LuaJIT-For-Windows.cmd` has to read file headers, there is also no longer any need to have multiple file extensions to maintain Lua scripts for specific Lua implementations, which can oftentimes just cause problems when sharing Lua scripts with others who have different file associations from you on their system.
26
26
27
27
**`LuaJIT-For-Windows.cmd` as a Lua Script Launcher**
28
-
When you first run `LuaJIT-For-Windows.cmd`, the `lj4w.txt` will be created with some default preferences located in the LuaRocks tree in the `%APPDATA%\LuaRocks` directory (i.e. `C:\Users\YourName\AppData\Roaming\LuaRocks`). The three pre-configured keys defined are `default.all.interpreter`, `default.lua.interpreter`, and `default.luajit.interpreter`.
28
+
When you first run `LuaJIT-For-Windows.cmd`, the `lj4w.txt` will be created with some default preferences in the `%APPDATA%\LJ4W` directory (i.e. `C:\Users\YourName\AppData\Roaming\LJ4W`). The three pre-configured keys defined are `default.all.interpreter`, `default.lua.interpreter`, and `default.luajit.interpreter`.
29
29
30
30
While their values can be changed, and further custom key-value pairs entered, these three default keys must always be present. The `default.all.interpreter` is used to determine which Lua implementation to use by default for any script without a header designating which implementation to use. The `default.lua.interpreter` is used to determine which Lua implementation to use when executing Lua bytecode generated from Luac. And `default.luajit.interpreter` is used to determine which LuaJIT implementation to use when executing LuaJIT bytecode. While both the `default.all.interpreter` and `default.luajit.interpreter` start off with the `lj4w` value and associated `lj4w.interpreter` key defining the full path to the `LuaJIT-For-Windows.cmd`, `default.lua.interpreter` is pre-configured with the `lua` value but no associated `lua.interpreter` defining its path. Therefore, you must add the full path of your `lua.exe` to the `lua.interpreter` value, as an example, in order to use this feature. Otherwise, if `lua.interpreter` is left undefined, or whatever value you choose to associate with `default.lua.interpreter` (i.e. `foo` value and associated `foo.interpreter` key), you will encounter an error when attempting to execute Luac bytecode.
31
31
@@ -38,6 +38,8 @@ For maximum flexibility, the `LJ4W_INTERPRETER` and/or `LJ4W_INTERPRETER_PATH` e
38
38
**`LuaJIT-For-Windows.cmd` as a Development Environment**
39
39
When launching `LuaJIT-For-Windows.cmd` as a stand-alone script without any arguments, it will open a development environment where you will have access to all of the tools available within the LuaJIT For Windows package. So, whether you want to access LuaRocks to manage packages, access LuaJIT's REPL interface, access gcc or any of the other tools within the LLVM MinGW suite, you can do so immediately all from the same environment.
40
40
41
+
An important note for the development environment is that the `APPDATA` environmental variable is changed to `%APPDATA%\LJ4W` during a session in order to ensure that LuaRocks and all of its components remain isolated from any pre-existing LuaRocks trees which may be present. This change is only in effect while using the development environment and does not affect scripts which are directly launched via the script launcher functionality.
42
+
41
43
For more ScriptTiger scripts and goodies, check out ScriptTiger's GitHub Pages website:
0 commit comments