"Couldn't open file lang/english.txt!" error.
z3n01d opened this issue · comments
I'm trying to run a *.lua file using LuaConsole on Windows by doing luaw main.lua
but only thing I get every time is :
Couldn't open file lang/english.txt! Failed to load lang file!
This is because lang/english.txt can't be found. It needs to be within the installation directory. Perhaps cwd.
You should use the development branch, as some oddities are repaired.
git clone --branch development https://github.com/tilkinsc/LuaConsole
This library has a problem with how I want to parse command line arguments and how I want to add translations. It's almost finished but forever ago I got burnt out. I will revisit this code and implement it fully.
Here is a prebuilt for windows. It should be directory independent now as long as lang/* is next to the exe. I included luajit as the primary, and lua-5.1.5, lua-5.2.4, lua-5.3.6, and lua-5.4.4
Please note you can switch versions with the -w switch, i.e. for lua 5.3.6 you'd do luaw -w lua-5.3.6
LuaConsole | Version: 2/10/2021
Lua 5.1 | Copyright (C) 1994-2008 Lua.org, PUC-Rio
LuaConsole Copyright (C) 2017-2021, Cody Tilkins
LuaJIT 2.0.5 Copyright (C) 2005-2022 Mike Pall https://luajit.org/
Supports Lua5.4, Lua5.3, Lua5.2, Lua5.1, LuaJIT5.1
Usage: luaw.exe [-c] [FILES] [-w] [-v] [-q] [-r] [-R] [-s PATH] [-p] [-Dvar=val]
[-Dtb.var=val] [-Lfile.lua] [-Llualib.dll] [-t{a,b}] [-e "string"]
[-E "string"] [-] [--] [-j{cmd,cmd=arg},...] [-O{level,+flag,-flag,cmd=arg}]
[-b{l,s,g,n,t,a,o,e,-} {IN,OUT}] [-?] [-n {arg1 ...}]
-w With Lua version x.x.x
-v Prints the Lua version in use
-q Remove copyright/luajit message
-r Prevents lua core libraries from loading
-R Prevents lua environment variables from loading
-s Issues a new current directory
-p Activates REPL mode after all or no supplied scripts
-d Defines a global variable as value after '='
-l Executes a module before specified script or post-exist
-t[a,b] Loads parameters after -l's and -e
[a]=delay arg table for file. [b]=no tuples
-e Executes a string as Lua Code BEFORE -l's
-E Executes a string as Lua Code AFTER -l's
- Processes input from stdin
-- Stops processing parameters
-j [LuaJIT] Performs a control command/loads an extension module
-O [LuaJIT] Sets an optimization level/parameters
-b [LuaJIT] Saves or lists bytecode
-? --help Displays this help message
-n Start of parameter section
If you are in need of any more subversions, use build.mingw package lua-x.x.x
I pushed some updates which fixes the build system and this problem. So it should compile normally now again on the development branch.