Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build lua-winreg? #3

Open
rustyx opened this issue May 15, 2018 · 2 comments
Open

How to build lua-winreg? #3

rustyx opened this issue May 15, 2018 · 2 comments

Comments

@rustyx
Copy link

rustyx commented May 15, 2018

It is unclear how to build this module on Windows.

Can someone please clarify?

@moteus
Copy link
Owner

moteus commented May 15, 2018

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 :)

@hlizard
Copy link

hlizard commented Mar 11, 2021

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants