[Development environment] Lua environment configuration

foreword

Game projects are mostly developed using Lua. I use it for the first time and need to configure the lua environment

Refer to the existing articles on the Internet, choose this as an example, and record your own installation process.

Equipment environment

insert image description here

vscode

Although C# was written on rider and vs before, vscode, as the first editor in the universe, supports almost all languages, thanks to the rich extension plugins of vscode.

This installation process is carried out on vscode.

Lua plugin

You need to download Lua's code service plugin and debugging plugin. as follows
insert image description here

Lua compiler

Go to Lua official website to download
http://www.lua.org/start.html#installing

insert image description here
The above prompts the LuaDist project, which is no longer taken seriously, please use LuaRocks (is Lua's package manager, similar to Node.js?).

Then I went to see and found that LuaRocks is not particularly friendly to windows, it seems to have win32
insert image description here

After downloading here, just unzip it directly to the directory where you want to put it.

Environment variable configuration

An essential step in the development environment configuration isAdding environment variables

Willbin directoryAdd to user (valid for current user) or system (valid for all users).
insert image description here

test

After configuration, run cmd test. output is success
insert image description here

Then test the lua code in vscode.

insert image description here
insert image description here

lua language reference documentation
https://www.runoob.com/lua/lua-tutorial.html

Guess you like

Origin blog.csdn.net/weixin_44394801/article/details/123200893