samyeyo / LuaRT

Open source Windows programming framework for Lua
https://www.luart.org
Other
285 stars 17 forks source link

Feature Suggestion? #109

Closed Dismalitie closed 8 months ago

Dismalitie commented 11 months ago

Would there be a way to use LuaRT in the command line? Kind of like your rtc compiler, it has command line parameters that maybe you could implement into LuaRT and/or the studio. The reason for this request is that I'm trying to make a VSCode extension to run LuaRT code with the libraries and DLL's with the click of a button. I don't know how difficult it could be, but please consider this. Here is a base syntax you can work of if you want:

luart.exe -c main.lua -i icon.ico -n "App" -s -desktop
[-c] The file or folder to compile
[-i] The icon to use for the executable
[-n] The name of the executable
[-s] Static executable type
[-d] Dynamic executable type
[-desktop] Desktop executable
[-cmd] Command line executable

Thanks for reading! 👍

samyeyo commented 11 months ago

Hi Dismalitie,

(w)luart.exe is the Lua interpreter for executing code. rtc.exe is an executable compiler.

The two programs have different objectives, so it is not possible to merge them.

You could call rtc directly from the vscode IDE like you would call LuaRT, right?

Dismalitie commented 11 months ago

But i dont think rtc compiles the code with the libs (ui, sql etc) do they?

samyeyo commented 11 months ago

Yes rtc can do it 😉

Use the -l switch followed by the needed module name, for example -lsqlite or -lnet

For desktop applications use the -w switch to make ui module available.

See https://luart.org/doc/toolchain/rtc.html