Skip to content

Conversation

@gracetai26
Copy link

Resolves: #23898 #23898

It adds the .mscz~ extension to the file open dialog filters and updates the isMuseScoreFile validator to recognize backup files as valid ZIP containers.

[ X] I signed the CLA
[ X] The title of the PR describes the problem it addresses
[X ] Each commit's message describes its purpose and effects, and references the issue it resolves
[X] If changes are extensive, there is a sequence of easily reviewable commits
[ X] The code in the PR follows the coding rules
[ X] There are no unnecessary changes
[X ] The code compiles and runs on my machine, preferably after each commit individually
[ X] I created a unit test or vtest to verify the changes I made (if applicable)

@MarcSabatella
Copy link
Contributor

There is a reason that MuseScore does not open these by default - to prevent people from opening backup copies accidentally. So I do not think it is appropriate to do this.

What might be acceptable is to leave them out of the filter but allow them to be opened directly but with a warning dialog. But that is something to discuss with the design team first, I think, by commenting in the issue thread.

@@ -1901,7 +1901,7 @@ async::Promise<io::path_t> ProjectActionsController::selectScoreOpeningFile() co
"*.ove *.scw *.bmw *.bww *.gtp *.gp3 *.gp4 *.gp5 *.gpx *.gp *.ptb *.mei *.tef *.mscx *.mscs *.mscz~";

std::vector<std::string> filter { muse::trc("project", "All supported files") + " (" + allExt + ")",
muse::trc("project", "MuseScore files") + " (*.mscz)",
muse::trc("project", "MuseScore files") + " (*.mscz *.mscz~)",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already listed below in line 1918 as "MuseScore backup files"

@cbjeukendrup
Copy link
Member

There is a conflict in .gitignore


# QML language server
**/.qmlls.ini
CMakeUserPresets.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some whitespace damage. Certainly not a needed change

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Dec 5, 2025

You'd also need to add that extension somewhere here:

<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\Applications\$(var.ExeKey)">
<RegistryKey Key="SupportedTypes">
<RegistryValue Name=".mscz" Value="" Type="string" />
<RegistryValue Name=".mscx" Value="" Type="string" />
<RegistryValue Name=".mscs" Value="" Type="string" />
<RegistryValue Name=".xml" Value="" Type="string" />
<RegistryValue Name=".musicxml" Value="" Type="string" />
<RegistryValue Name=".mxl" Value="" Type="string" />
<RegistryValue Name=".mei" Value="" Type="string" />
<RegistryValue Name=".cap" Value="" Type="string" />
<RegistryValue Name=".capx" Value="" Type="string" />
<RegistryValue Name=".scw" Value="" Type="string" />
<RegistryValue Name=".bww" Value="" Type="string" />
<RegistryValue Name=".mid" Value="" Type="string" />
<RegistryValue Name=".midi" Value="" Type="string" />
<RegistryValue Name=".kar" Value="" Type="string" />
<RegistryValue Name=".ove" Value="" Type="string" />
<RegistryValue Name=".sgu" Value="" Type="string" />
<RegistryValue Name=".mgu" Value="" Type="string" />
<RegistryValue Name=".md" Value="" Type="string" />
<RegistryValue Name=".gtp" Value="" Type="string" />
<RegistryValue Name=".gp3" Value="" Type="string" />
<RegistryValue Name=".gp4" Value="" Type="string" />
<RegistryValue Name=".gp5" Value="" Type="string" />
<RegistryValue Name=".gpx" Value="" Type="string" />
<RegistryValue Name=".gp" Value="" Type="string" />
<RegistryValue Name=".ptb" Value="" Type="string" />
<RegistryValue Name=".tef" Value="" Type="string" />
<RegistryValue Name=".sf2" Value="" Type="string" />
<RegistryValue Name=".sf3" Value="" Type="string" />
</RegistryKey>

and here:
<dict>
<key>UTTypeIdentifier</key>
<string>org.musescore.mscz,</string>
<key>UTTypeDescription</key>
<string>MuseScore Backup File</string>
<key>UTTypeIconFile</key>
<string>MsczIcon.icns</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.content</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>mscz,</string>
</array>
<key>public.mime-type</key>
<array>
<string>application/x-musescore</string>
</array>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>org.musescore.mscx,</string>
<key>UTTypeDescription</key>
<string>MuseScore Uncompressed Backup File</string>
<key>UTTypeIconFile</key>
<string>MscxIcon.icns</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.content</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>mscx,</string>
</array>
<key>public.mime-type</key>
<array>
<string>application/x-musescore+xml</string>
</array>
</dict>
</dict>

and here:
<mime-type type="application/x-musescore">
<comment>MuseScore compressed backup score</comment>
<glob pattern="*.mscz,"/>
<sub-class-of type="application/zip"/>
<icon name="application-x-musescore@MUSE_APP_INSTALL_SUFFIX@"/>
</mime-type>
<mime-type type="application/x-musescore+xml">
<comment>MuseScore uncompressed backup score</comment>
<glob pattern="*.mscx,"/>
<sub-class-of type="application/xml"/>
<root-XML namespaceURI="" localName="museScore"/>
<icon name="application-x-musescore@MUSE_APP_INSTALL_SUFFIX@+xml"/>
<magic>
<match type="string" value="&lt;?xml" offset="0">
<match type="string" value="&lt;museScore" offset="0:128">
<match type="string" value="&lt;Score" offset="0:512"/>
</match>
</match>
</magic>
</mime-type>

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.

Make MS recognise the .mscz~ filetype

4 participants