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 516 forks source link

Build a release version of ZeroBraneStudio using wxLua/wxWidgets 3.2 #1154

Closed KeyWorksRW closed 1 year ago

KeyWorksRW commented 1 year ago

Officially, there are no pre-built libraries for wxLua. That means if a Lua programmer wants to use it, they must first install a C++ toolchain, then download and extract the wxLua source code, download and extract the matching sources for wxWidgets, and finally figure out how to configure and build a C++ shared library. For a Lua programmer, that's a lot to ask.

The second option is to install ZeroBraneStudio which includes a pre-built version of the wxLua shared library. The problem is that the last released version of ZeroBraneStudio (1.90) is built with a 10-year old version of wxLua/wxWidgets -- so none of the enhancements to wxWidgets over the last 10 years are available.

I'm in the process of extending the wxUiEditor designer to generate wxLua code. However, the minimum version of wxWidgets I support is 3.1, with 3.2 preferred. That means that in many cases the code I generate will not run in the ZeroBraneStudio editor, nor can I tell potential users to install it to get a version of the wxLua shared library that they can use.

My request is for a newer build of ZeroBraneStudio built on wxLua 3.2 (and of course wxWidgets 3.2). That gives me something I can point potential users to that works with the code I generate via wxUiEditor. Having a far superior editor for verifying wxUiEditor code generation would of course be a really nice bonus. :-).

I do realize that in theory I could just build ZeroBraneStudio myself to get a newer version, but that doesn't give me anything to point users to. I'd rather have an official build that I can point users to.

pkulchenko commented 1 year ago

The problem is that the last released version of ZeroBraneStudio (1.90) is built with a 10-year old version of wxLua/wxWidgets -- so none of the enhancements to wxWidgets over the last 10 years are available.

@KeyWorksRW, the current version of the IDE is using wxwidgets v3.1.4, which is only a bit over 2 years old (you can see the exact version of wxwidgets and wxlua used in the Help | About screen). You can definitely build your own version to point users to, but even the current version should work if 3.1 is a dependency. I do plan to release a newer version of wxwidgets at some point, but I don't have immediate plans for this, as there is nothing in the IDE that would use the new functionality and in fact I found several regressions with wxwidgets 3.3 comparing to the current version (for example, displaying generated images in tab labels doesn't work for me).

KeyWorksRW commented 1 year ago

The about box states that the version of wxLua is 3.0.0 -- which if correct, means that I cannot generate any code which uses properties or controls introduced in 3.1 using a version of wxLua which was presumably built on wxWidgets 3.0. Am I missing something in my understanding of what your editor provides in regards to wxLua code?

pkulchenko commented 1 year ago

What does it say about the version of the IDE itself? Can you include a screenshot?

This is a bit strange, as you seem not be using the last release (1.90). This is the commit that added binaries for pre-release version of wxwidgets 3.1.4 and it should show Built with wxWidgets 3.1.4, wxLua 3.0.0.8, Scintilla 3.7.2.

KeyWorksRW commented 1 year ago

The wx shared library will be wxLua -- which means if you set LUA_CPATH to point to it, and run the code outside of the editor using Lua, then you will be using wxLua 3.0.0.8. Which means if I generate code for Lua devs to use with the library that's part of your toolset, then I must generate assuming wxLua 3.0.0.8. The reason I would even suggest devs do that is for those that don't want to take all the steps necessary to build their own copy of the library.

In any event, not to worry -- since you do not have plans to release an updated version of your editor, nor are there any official binaries of wxLua 3.2, I need to find another alternative if I'm going to be generating wxLua code in my designer. I appreciate your taking the time to respond!

pkulchenko commented 1 year ago

I think there may be some confusion, as wxlua is not a standalone dll and needs to be used with wxwidgets; also having wxlua 3.0.0.8 doesn't preclude it being used with wxwidgets 3.1.4, which is the exact configuration that the current version of the IDE is shipped with.

I can compile wxlua/wxwidgets binaries, but it's easier to get the binaries from the IDE installation, which should work with your code (assuming it requires wxwidgets 3.1+).