Menu

Simple Lua script builder

Requirements

This build script is design to work with Windows operating system with Lua 5.1 release.

Build Script

const
  //Setup the Lua compiler/interpreter path
  LUA_COMPILER = 'C:\Program Files\Lua\5.1\lua.exe';

  //Specify the source code file name 
  SRC_FILE = 'lua_demo.lua';

var
  SourceFile : String;

begin
  //Try to get full source code file path from nanoide editor
  SourceFile := GetFullFilePathFromEditor(SRC_FILE);

  if(SourceFile = '') then
    Print('File '+SRC_FILE+' is not available in editor tab(s)')
  else
  begin
    //Start compiling/executing process...
    SetDir(ExtractDirName(GetBuildFileName()));
    Exec(LUA_COMPILER + ' "'+SourceFile+'"');
  end;
end.

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.