[MU4 Issue] -f option not working
00sapo opened this issue · 6 comments
Describe the bug
Option -f
is ignored with musescore 4.0.1 (don't know about previous versions)
To Reproduce
- Download attached
test.xml.zip
mv test.xml.zip test.mxl
(needed because github doesn't let me attachmxl
files)mscore -fo test.mid test.mxl
Expected behavior
Produce test.mid
without GUI interruptions. It instead creates the dialog saying that the file is corrupted and asking if it should continue opening it.
test.xml.zip
Platform information
-OS: Linux Manjaro (Arch-based)
-Musescore version: Manjaro repository 4.0.1 and AppImage 4.0.1 tested
try mscore -f -o test.mid test.mxl
Doesn't work. It works with 3.6.2
Any news about this?
Is it still broken in the latest nightly build (https://musescore.org/en/nightly-builds)?
Tested and it has the same issue: it opens a gui popup asking confirmation because the file has some issue (it was prepared using Final). If -f is used, it should just convert it...
Greetings @Eism @cbjeukendrup @00sapo My initial analysis why it works in 3.6.2 and doesn't in MuseScore 4.x version is due to the following:
3.6.2:-
MuseScore/importexport/musicxml/importxml.cpp
Line 205 in 4566605
During the start, we set that the task is going to be noGui so when we check here, this should come as true and give no error in the file.
On the other hand, master:-
We are doing something similar but this time the property is RunMode::ConsoleApp which makes the condition false and executes line 201 which is the Dialog Box.
I think a better solution would be to propagate the forceMode
information downstream from MusicXmlReader::read
till doValidateAndImport
function of importxml to decide beforehand to validate or not. Let me know what is your take on this? happy to take this issue :)