Last active
March 2, 2024 03:57
-
-
Save mackal/c41229f4a5ee2f2dcb7f51042a09d52c to your computer and use it in GitHub Desktop.
luasql-mysql specifically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Download https://luarocks.org/releases/luarocks-3.9.1-windows-64.zip | |
2. Extract to server root (Ex. C:\server, where zone.exe is) | |
3. Download and install https://dev.mysql.com/downloads/installer/ you only need MySQL Server installed (don't need to configure, but only way to get C Connector AFAIK) | |
4. Open x64 Native Tools Command Prompt For VS whatever version | |
5. Navitage to server root (where zone.exe is) | |
6. run luarocks.exe unpack luasql-mysql | |
7. Edit luasql-mysql-2.6.0-1\luasql\rockspec\luasql-mysql-2.6.0-1.rockspec | |
8. Add "Advapi32" to the libaries line (ex. `libraries = { "mysqlclient", "Advapi32" },`) | |
9. Now run luarocks.exe --lua-version 5.1 --tree lua_modules install luasql-mysql-2.6.0-1\luasql\rockspec\luasql-mysql-2.6.0-1.rockspec MYSQL_DIR="C:\Program Files\MySQL\MySQL Server 8.0" LUA_INCDIR=C:\src\Server\vcpkg\vcpkg-export-x64\installed\x64-windows\include\luajit LUA_LIBDIR=C:\src\Server\vcpkg\vcpkg-export-x64\installed\x64-windows\lib MYSQL_LIBDIR="C:\Program Files\MySQL\MySQL Server 8.0\lib" | |
MYSQL_DIR and MYSQL_LIBDIR should match if you didn't change the location and there hasn't been a new release since I wrote this. | |
LUA_INCDIR and LUA_LIBDIR should match if your server source is at C:\src\Server and you let cmake run the vcpkg stuff. | |
Editing the libraries line to mariadbclient may allow us to just use the libs we ship with vcpkg and avoid MySQL server. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment