moteus/lua-winreg

How to build lua-winreg?

Opened this issue · 2 comments

It is unclear how to build this module on Windows.

Can someone please clarify?

I think the easy way is to use luarocks.
There exists original build.mak file.
But I did not use it at all.
Also, you can just create a project in MSVC for
dynamic library and add to it all C files
You can find the list of difines in rockspec file
And as a total hack. You can copy commands from AppVeyour console Put them in to bat file and run it :)

remove line:
libraries = {"advapi32", "kernel32", "user32"},
from rockspecs\winreg-scm-0.rockspec, then run luarocks make:

\Downloads\lua-winreg-master\lua-winreg-master>luarocks make

winreg scm-0 depends on lua >= 5.1, < 5.4 (5.1-1 provided by VM)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/l52util.o -Ic:\users\public\lua\LuaRocks\include src/l52util.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lua_int64.o -Ic:\users\public\lua\LuaRocks\include src/lua_int64.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lua_mtutil.o -Ic:\users\public\lua\LuaRocks\include src/lua_mtutil.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/lua_tstring.o -Ic:\users\public\lua\LuaRocks\include src/lua_tstring.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/luawin_dllerror.o -Ic:\users\public\lua\LuaRocks\include src/luawin_dllerror.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/win_privileges.o -Ic:\users\public\lua\LuaRocks\include src/win_privileges.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/win_registry.o -Ic:\users\public\lua\LuaRocks\include src/win_registry.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/win_trace.o -Ic:\users\public\lua\LuaRocks\include src/win_trace.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O2 -c -o src/winreg.o -Ic:\users\public\lua\LuaRocks\include src/winreg.c -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINDLL -DUSRDLL -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -DWINREG_EXPORTS -DWINREG_API=__declspec(dllexport)
F:\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -shared -o winreg.dll src/l52util.o src/lua_int64.o src/lua_mtutil.o src/lua_tstring.o src/luawin_dllerror.o src/win_privileges.o src/win_registry.o src/win_trace.o src/winreg.o c:\users\public\lua\LuaRocks/lua5.1.dll -lMSVCR80
winreg scm-0 is now installed in c:\users\public\lua\LuaRocks\systree (license: MIT/X11)