pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.62k stars 518 forks source link

Lualibs not populated on `make install` #1047

Closed alerque closed 3 years ago

alerque commented 4 years ago

Thanks to another user with use cases different than mine I've realized there is another problem with the Arch Linux packaging for ZBS.

When running make install (with a DESTDIR set of course) I get a /usr/share/zbstudio/lualibs directory that has a handful of the things from the source directory but not all of them. In my case I don't want all of them anyway — anything that can be made available on the system via Luarocks I would rather get pulled from there anyway. But some stuff in there seems to be written specifically for this project and is not available anywhere else. Not all of those bits are getting copied over using make install.

pkulchenko commented 4 years ago

Yes, some of the changes to the libraries have not been propagated to the CMakeList.txt script. Based on the feedback you got, is it enough to add lexlpeg and lfs libraries or is something else needed?

Wouldn't this copy all 'lualibs/' files: install_from_manifest(FILES ${TOPDIR}/zbstudio/MANIFEST ${DATADIR} "^(CHANGELOG.md|LICENSE|README.md)$|^lualibs/")? Are some of the lualibs files missing as well?

pkulchenko commented 4 years ago

@alerque, I misinterpreted the regex; it actually skips everything from lualibs/, as it's either explicitly copied or used from the system. It seems like there are a couple of libraries and lexers/ folder that is not likely to be present, so I updated the script to copy those. Does this work for you with this diff?

diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt
index 68271535..e80d1d5d 100644
--- a/build/CMakeLists.txt
+++ b/build/CMakeLists.txt
@@ -106,12 +106,10 @@ else()
   check_lua_module(socket TRUE)
   check_lua_module(copas ${USE_SYSTEM_COPAS})
   check_lua_module(luainspect ${USE_SYSTEM_LUAINSPECT})
-  #check_lua_module(mobdebug ${USE_SYSTEM_MOBDEBUG})

   # add user options to select between system-wide and bundled Lua modules
   add_system_lua_module_option(copas)
   add_system_lua_module_option(luainspect)
-  #add_system_lua_module_option(mobdebug)

   # setup the data directory
   set(DATADIR share/zbstudio)
@@ -128,9 +126,10 @@ else()
   if(NOT USE_SYSTEM_LUAINSPECT)
     install(DIRECTORY ${TOPDIR}/lualibs/luainspect ${TOPDIR}/lualibs/metalua DESTINATION ${DATADIR}/lualibs)
   endif()
-  if(NOT USE_SYSTEM_MOBDEBUG)
-    install(DIRECTORY ${TOPDIR}/lualibs/mobdebug DESTINATION ${DATADIR}/lualibs)
-  endif()
+  install(DIRECTORY ${TOPDIR}/lualibs/mobdebug DESTINATION ${DATADIR}/lualibs)
+  install(DIRECTORY ${TOPDIR}/lualibs/lexers DESTINATION ${DATADIR}/lualibs)
+  install(FILES ${TOPDIR}/lualibs/lua_lexer_loose.lua DESTINATION ${DATADIR}/lualibs)
+  install(FILES ${TOPDIR}/lualibs/lua_parser_loose.lua DESTINATION ${DATADIR}/lualibs)

   # install .desktop file and hicolor icon theme
   install(DIRECTORY ${TOPDIR}/zbstudio/res/icons/ DESTINATION share/icons/hicolor)
alerque commented 4 years ago

The current way I had zerobanestudio-git being built it was dependent on wxlua-git. I was going to try building with this patch, but I got hung up updating because of the dependency and https://github.com/pkulchenko/wxlua/issues/78. I'm unsure whether that's actually a requirement and the stable tag of that might do, this is just a reminder to myself to come back and try when that is worked out.

pkulchenko commented 4 years ago

Yes, I'd be interested in the feedback; the issue in the wxlua ticket should be fixed.

pkulchenko commented 4 years ago

@alerque, let me know if you had a chance to try it, as I'm ready to merge.

pkulchenko commented 3 years ago

@alerque, I'm going to merge the earlier patch, but if you get a chance to try it, please update the ticket. Thanks!