1

Hello i would like to change folder that luasocket is installing to how can i do that ? My plan is at the end i want to export my lua file as exe and use it to run my server. I want to put luasocket inside Project file so other windows computer wont have problems (I am using Windows computer too). Thanks for helping.

my code

Main.lua

lpackage.path = package.path..';./libs/lua/?.lua'
package.cpath = package.cpath..';./libs/socket/?.dll;'

This is my Project tree
Project
-libs
--lua

Quiloos39
  • 57
  • 1
  • 4

1 Answers1

0

Assuming you keep the name of the luasocket DLL the same (which is usually, core.dll), you need to use ./libs/?.dll instead of ./libs/socket/?.dll, as the question mark will be replaced with socket/core when socket.core module is required from socket.lua. You'll need to put core.dll in libs/socket folder.

You will also need to have lua.dll present (as the core.dll is usually compiled against it) or use a proxy dll if your executable statically compiles lua interpreter.

Paul Kulchenko
  • 25,884
  • 3
  • 38
  • 56