Skip to content

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
@tresf tresf mentioned this pull request Mar 31, 2025
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