Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions buildscripts/packaging/Linux+BSD/musescore.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,11 @@

<mime-type type="application/x-musescore">
<comment>MuseScore compressed backup score</comment>
<glob pattern="*.mscz,"/>
<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>

<!-- MuseScore URL Protocol -->

<mime-type type="x-scheme-handler/musescore">
Expand Down
19 changes: 19 additions & 0 deletions buildscripts/packaging/Windows/Installer/WIX.template.in
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<RegistryValue Name=".mscz" Value="MuseScore.mscz.$(var.ProgIdSuffix)" Type="string" />
<RegistryValue Name=".mscx" Value="MuseScore.mscx.$(var.ProgIdSuffix)" Type="string" />
<RegistryValue Name=".mscs" Value="MuseScore.mscs.$(var.ProgIdSuffix)" Type="string" />
<RegistryValue Name=".mscz~" Value="MuseScore.mscz.$(var.ProgIdSuffix)" Type="string" />
<!-- TODO: Add other file types here too? -->
</RegistryKey>

Expand Down Expand Up @@ -115,6 +116,7 @@
<RegistryValue Name=".mscz" Value="" Type="string" />
<RegistryValue Name=".mscx" Value="" Type="string" />
<RegistryValue Name=".mscs" Value="" Type="string" />
<RegistryValue Name=".mscz~" Value="" Type="string" />
<RegistryValue Name=".xml" Value="" Type="string" />
<RegistryValue Name=".musicxml" Value="" Type="string" />
<RegistryValue Name=".mxl" Value="" Type="string" />
Expand Down Expand Up @@ -200,6 +202,23 @@
<RegistryValue Name="Content Type" Value="application/x-musescore+xml" Type="string" />
</RegistryKey>

<!-- MSCZ~ -->
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscz~.$(var.ProgIdSuffix)">
<RegistryValue Value="MuseScore Backup File" Type="string" />
<RegistryValue Key="DefaultIcon" Value="[INSTALL_ROOT]bin\$(var.ExeName),1" Type="string" />
<RegistryValue Key="shell\open\command" Value="&quot;[INSTALL_ROOT]bin\$(var.ExeName)&quot; &quot;%1&quot;" Type="string" />
</RegistryKey>
<?ifndef MUSE_APP_IS_PRERELEASE?>
<RegistryValue Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.mscz~\CurVer" Value="MuseScore.mscz~.$(var.ProgIdSuffix)" Type="string" />
<?endif?>

<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\.mscz~">
<?ifndef MUSE_APP_IS_PRERELEASE?>
<RegistryValue Value="MuseScore.mscz~.$(var.ProgIdSuffix)" Type="string" />
<?endif?>
<RegistryValue Name="Content Type" Value="application/x-musescore+xml" Type="string" />
</RegistryKey>

<!-- musescore URL scheme -->
<RegistryKey Root="$(var.RegistryRoot)" Key="SOFTWARE\Classes\MuseScore.Url.musescore.$(var.ProgIdSuffix)">
<RegistryValue Value="MuseScore URL" Type="string" />
Expand Down
26 changes: 1 addition & 25 deletions buildscripts/packaging/macOS/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,38 +96,14 @@
<dict>
<key>public.filename-extension</key>
<array>
<string>mscz,</string>
<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>
</array>
<key>CFBundleDocumentTypes</key>
<array>
Expand Down
7 changes: 5 additions & 2 deletions src/engraving/infrastructure/mscio.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ namespace mu::engraving {
//! NOTE The main format is MuseScore, is a zip archive with a specific structure
static const std::string MSCZ = "mscz";

//! NOTE This is the automatically generated backup file.
static const std::string MSCZ_BACKUP = "mscz~";

//! NOTE Before MuseScore 4, MuseScore could save data in one xml file (excluding binary) with `.mscx` extension.
//! Starting from MuseScore 4, only the score domain model store to the `.mscx` file,
//! and other data, such as styles, chordlist, synthesizer settings, etc. are stored in separate files.
Expand All @@ -46,7 +49,7 @@ static const std::string MSCS = "mscs";

inline bool isMuseScoreFile(const std::string& suffix)
{
return suffix == MSCZ || suffix == MSCX || suffix == MSCS;
return suffix == MSCZ || suffix == MSCX || suffix == MSCS || suffix == MSCZ_BACKUP;
}

enum class MscIoMode : unsigned char {
Expand All @@ -58,7 +61,7 @@ enum class MscIoMode : unsigned char {

inline MscIoMode mscIoModeBySuffix(const std::string& suffix)
{
if (suffix == MSCZ) {
if (suffix == MSCZ || suffix == MSCZ_BACKUP) {
return MscIoMode::Zip;
} else if (suffix == MSCX) {
return MscIoMode::Dir;
Expand Down
2 changes: 1 addition & 1 deletion src/project/internal/notationproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Ret NotationProject::load(const muse::io::path_t& path, const OpenParams& openPa
return ret;
}

bool treatAsImported = m_masterNotation->mscVersion() < 400 && !isCloudProject();
bool treatAsImported = (m_masterNotation->mscVersion() < 400 && !isCloudProject()) || format == MSCZ_BACKUP;

listenIfNeedSaveChanges();
setNeedSave(treatAsImported);
Expand Down
Loading