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

Add Linux support #15

Closed
pkulchenko opened this issue Jun 30, 2012 · 14 comments
Closed

Add Linux support #15

pkulchenko opened this issue Jun 30, 2012 · 14 comments
Assignees
Milestone

Comments

@pkulchenko
Copy link
Owner

No description provided.

@ghost ghost assigned pkulchenko Jun 30, 2012
@pkulchenko
Copy link
Owner Author

(from Javier Guerra Giraldez)

it launches! and it shows the tutorial docs, links work, etc.

weird UI issues:

  • there's no menubar. only the same icon buttons as the examples
    plus a "jump to function definition" popup menu
  • after trying to run a demo, the editor window floats on top of any
    other window.
  • hitting the close window corner button doesn't kill it, but the
    terminal shows an error:
Lua: Error while running chunk 
src/editor/commands.lua:499: wxLua: Unable to call an unknown 
method 'ShowFullScreen' on a 'wxFrame' type.

(hitting Ctr-C (twice) at the terminal kills it)

execution issues:

  • at first didn't find the Lua executable. no prob, just put a
    ./bin/lua => /usr/bin/lua link
  • the spirograph demo flashes a small window and dies with:
./turtle.lua:338: wxLua: Expected an 'unsigned integer' for parameter
1, but got a 'number'.
Function called: 'wxMilliSleep(number)'
01. wxMilliSleep(integer)
stack traceback:
       (command line):1: in function <(command line):1>
       [C]: in function 'wxMilliSleep'
       ./turtle.lua:338: in function 'wait'
       ./spirograph.lua:33: in function 'spiro'
       ...ack-0.30/myprograms/zerobrane-lessons/05-running.lua:11: in main chunk
       [C]: in function 'dofile'
       (command line):1: in function <(command line):1>
       [C]: in function 'xpcall'
       (command line):1: in main chunk
       [C]: ?
Program completed in 0.12 seconds (pid: 26405).

this seems a (design?) glitch of wxLua, changing that line from

    else wx.wxMilliSleep(stillneed); return

to

   else wx.wxMilliSleep(math.floor(stillneed)); return

allows it to run and show some graphs. still not sure if they look as
they should, and it only progresses while there's some events, like
moving the mouse inside the window. if i keep still, the program
freezes.

in all, not bad for a first try, considering all the (squeaky) moving parts.

@pkulchenko
Copy link
Owner Author

@Toiffel, I noticed you've been working on Linux support in your fork. I'll be checking in shortly changes that improve Linux compatibility as well as the package to run/deploy on Linux.

@kodemeister
Copy link
Contributor

Yeah, I've almost finished cmake-based build system as well as the native starter application. However there are some wxgtk-specific bugs left.
btw do you have a zerobrane icon in svg format? If yes I'll be able to make Linux .desktop file with nice scalable icon which will look great in any DE :)

@pkulchenko
Copy link
Owner Author

I took a different path and packaged wxlua as a debian package. This will pull wxwidgets and all other modules as dependencies; you can then launch ZBS as lua src/main.lua zbstudio. I'll provide a shell file that hides these details.

@kodemeister
Copy link
Contributor

I've sent an email two days ago but still no reply (double-checked the email address on your website). Maybe it was blocked by spam filter or something else?

@pkulchenko
Copy link
Owner Author

Responded over email.

@kodemeister
Copy link
Contributor

Thanks! Now I'm able to complete Linux version of CMake script. Next week I'll also try to add Windows/Mac support. This should greatly simplify building and installing ZBS. However all dependencies (wxWidgets, wxLua etc) still need to be compiled manually; maybe I'll write a simple bash script to automate this.

@pkulchenko
Copy link
Owner Author

@Toiffel, I'm slightly confused. I don't plan to have a compiled launcher for linux or mac. Users should be able to run lua src/main.lua zbstudio to get ZBS started. I'll provide a shell file to simplify launching, but I plan to avoid any building process as you should be able to run from repo clone or a package (dmg, deb, etc.)

The windows version is a bit different as the executable also includes icons and provides a more convenient way than a batch file.

The setup for Mac is already checked in; you can see it in macos-build branch. It is a bit more involved, but mostly because of Mac .app format. The linux version should be simpler; as long as you have wxwidgets and wxlua setup, you should be able to run src/main.lua to get the IDE. I'll provide assistance with getting wxlua and all the dependencies.

@kodemeister
Copy link
Contributor

I don't see any problem here. Users will always be able to run IDE with lua src/main.lua zbstudio if they want to. However the most preferred way is just download the ready-to-use package (zip, dmg, deb) from Downloads section and run the compiled executable. Building from source is only intended for developers and linux maintainers, not for ordinary users.

The compiled launcher has some advantages over the shell script: on Linux it can show nice wxWidgets error dialog (instead of printing to terminal and dying), also having a binary executable is conventional for GUI apps and it's more consistent across all platforms. I think it should be left as an option for advanced users and developers.

@pkulchenko
Copy link
Owner Author

Added several commits for Linux support:
0f14a54: Updated configuring toolbar size to improve Linux compatibility.
4685fed: Updated cpath processing to allow Linux version to run side-by-side with Windows and Mac.
985b2c2: Fixed an issue with loading stock icons on Linux.

pkulchenko added a commit that referenced this issue Sep 11, 2012
@pkulchenko
Copy link
Owner Author

@Toiffel, make sense. I just pushed linux updates, that should pull all wxlua dependencies (build/install-deb.sh). Give it a try.

@kodemeister
Copy link
Contributor

Well done! :) I've seamlessly installed the dependencies package on fresh Ubuntu 12.04.1 installation (only had to run chmod +x install-deb.sh). I've also posted the most annoying linux-specific issues.

@pkulchenko
Copy link
Owner Author

Some known Linux issues:

  • (fixed) (Linux) Context menu in the editor window doesn't work #47 (Linux) Context menu in the editor window doesn't work
  • (fixed) (Linux) Edit-Paste menu item is always enabled #46 (Linux) Edit-Paste menu item is always enabled
  • (fixed) (Linux) Mouse cursor doesn't get updated after dragging the slider in scratchpad mode #49 (Linux) Mouse cursor doesn't get updated after dragging the slider in scratchpad mode
  • IDLE events are not triggered unless some other event is also triggered (this breaks debugging of wxwindows apps)
  • Multiple tooltips are occasionally shown during debugging
  • Several GLIB warnings are shown after the app exist: "LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent"; appears to be a known issue fixed in wxwidgets 2.9.4
  • Another Glib warning (also when app exits): GLib-GObject-WARNING **: instance of invalid non-instantiatable type `'
  • And another (also when app exits): GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
  • '>' is colored a bit incorrectly in the console

pkulchenko added a commit that referenced this issue Sep 12, 2012
pkulchenko added a commit that referenced this issue Sep 13, 2012
On Linux DWELLSTART event seems to be generated even for those editor
windows that are not active. What's worse, when generated the event
seems to report "old" position when retrieved using event:GetX and
event:GetY, so instead we use wxGetMousePosition.
@pkulchenko
Copy link
Owner Author

The current master has been tested to run on Ubuntu 10.04, Ubuntu 12.04, ArchLinux, Fedora 18 (32/64bit); it has also been seen running on Xubuntu 12.10, Gentoo, and Mint.

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

No branches or pull requests

2 participants