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 lmms-console.exe #7732

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Add lmms-console.exe #7732

wants to merge 4 commits into from

Conversation

tresf
Copy link
Member

@tresf tresf commented Feb 26, 2025

Adds a new lmms-console.exe target for Windows builds that will allow --help, --version.

  • The existing lmms.exe leverages WinMain() entry point making certain console interactions on Windows not possible.
  • Since Run without terminal for non-debug Windows builds #7022 (comment) this console behavior can be toggled on, but only for Debug builds.
  • This change affects all Windows builds by:
    • Make the default lmms.exe to always use WinMain() entry points
    • Builds a second lmms-console.exe to always use main() entry point
  • This new lmms-console.exe can be leveraged as a CLI interface on Windows, similar to other platforms.
"C:\Program FIles\LMMS\lmms-console.exe" --help

TODO:

  • Fix segmentation fault when rendering a project, it's mangling lmms-console.exe with lmms.exe.
     gdb '/c/Program Files/LMMS/lmms-console.exe'
    Thread 1 received signal SIGSEGV, Segmentation fault.
    0x00007ff7c74c4524 in lmms!? 
    qt_static_metacall@MidiClip@lmms@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z () from /c/Program Files/LMMS/lmms.exe
    (gdb) bt full
    #0  0x00007ff7c74c4524 in lmms!? 
    qt_static_metacall@MidiClip@lmms@@CAXPEAVQObject@@W4Call@QMetaObject@@HPEAPEAX@Z ()
       from /c/Program Files/LMMS/lmms.exe

Inspired by #7427
Keywords: -mwindows, -mconsole, WIN32_EXECUTABLE

@tresf tresf marked this pull request as draft February 26, 2025 06:22
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

Successfully merging this pull request may close these issues.

1 participant