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

[MU4 Issue] -f option not working #16444

Closed
00sapo opened this issue Feb 20, 2023 · 6 comments · Fixed by #21750
Closed

[MU4 Issue] -f option not working #16444

00sapo opened this issue Feb 20, 2023 · 6 comments · Fixed by #21750
Assignees
Labels
cli Issues related to MuseScore's command line interface community Issues particularly suitable for community contributors to work on good second issue Expected to be doable for contributors with a little bit of experience with our codebase

Comments

@00sapo
Copy link

00sapo commented Feb 20, 2023

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 attach mxl 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

@Eism
Copy link
Contributor

Eism commented Feb 20, 2023

try mscore -f -o test.mid test.mxl

@00sapo
Copy link
Author

00sapo commented Feb 20, 2023

Doesn't work. It works with 3.6.2

@00sapo
Copy link
Author

00sapo commented Dec 1, 2023

Any news about this?

@cbjeukendrup
Copy link
Contributor

Is it still broken in the latest nightly build (https://musescore.org/en/nightly-builds)?

@00sapo
Copy link
Author

00sapo commented Dec 3, 2023

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...

@cbjeukendrup cbjeukendrup added community Issues particularly suitable for community contributors to work on good second issue Expected to be doable for contributors with a little bit of experience with our codebase cli Issues related to MuseScore's command line interface labels Dec 8, 2023
@nasehim7
Copy link
Contributor

nasehim7 commented Feb 28, 2024

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:-

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 :)

nasehim7 added a commit to nasehim7/MuseScore that referenced this issue Feb 28, 2024
nasehim7 added a commit to nasehim7/MuseScore that referenced this issue Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Issues related to MuseScore's command line interface community Issues particularly suitable for community contributors to work on good second issue Expected to be doable for contributors with a little bit of experience with our codebase
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants