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

Puts statement inside qml files doesn't work on terminal. #385

Open
marahmbawwab opened this issue Mar 30, 2023 · 2 comments
Open

Puts statement inside qml files doesn't work on terminal. #385

marahmbawwab opened this issue Mar 30, 2023 · 2 comments

Comments

@marahmbawwab
Copy link

The issue happened when building the project on Windows OS using msys2-mingw64. After building the project and modifying one of the qml files exiting in this directory (....\zyn-fusion-build\src\mruby-zest-build\src\mruby-zest\qml) by adding a puts statement in order to print something on the terminal, nothing printed. On the other hand, it works for Linux OS.

To Reproduce Follow the steps:-

  • Build the project by running this command: 'make -f Makefile.mingw64.mk all' on zyn-fusion-build cloned directory.

  • Modify the TextEdit qml file on this directory '....\zyn-fusion-build\src\mruby-zest-build\src\mruby-zest\qml' by adding
    puts statement inside the onKey function.

    edit_file

  • Open msys2-mingw64 terminal then go to this directory (......\zyn-fusion-build\build\zyn-fusion-windows-64bit-3.0.6-git-demo)
    which contains the binary file (.exe file) for the project (zynaddsubfx file). After that run this command: ./zynaddsubfx -U -P 1337.

    first

  • Open another msys2-mingw64 terminal then go to this directory (..../zyn-fusion-build/src/mruby-zest-build) and run those two
    commands:

    • run 'make windows-hotload'.
    • run 'make run'.

    second

  • Press on a key and change a number in the tuning in the UI.

UI_highlight

After doing all the above steps:-

  • Expected behavior: the puts statement will be printed on the second terminal.
  • Current behavior: nothing printed on the terminal.

If anyone can help, I appreciate that.

@fundamental
Copy link
Member

Disabling print statements was done on windows for the initial release since IIRC the way windows often spawns programs leaves the program without the typical stdout/stderr/etc handles you'd just assume exist on unix setups. This ought to be easy enough to undo for a development build (not a release build) and I think the specific section in question is mruby-zest-build/src/mruby-widget-lib/src/api.c:138..141 where disable_kernel_io is called.

@pgervais
Copy link
Collaborator

pgervais commented Apr 4, 2023

Thanks for the context. It sounds like the right thing to do is to tweak the Makefile to add a development mode where puts is active. We won't be working on that any time soon though, so I'm leaving the issue open and marking it "good first issue" because it looks simple to fix and would be useful.

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

3 participants