mirror of
https://github.com/muskit/MercuryConverter.git
synced 2026-06-03 04:34:25 -07:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 534ec95e63 | |||
| 9a00748d65 | |||
| c449975c6d | |||
| 756dc77b0b | |||
| afc08d72aa |
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
<img height="600" alt="image" src="https://github.com/user-attachments/assets/2a06c9b4-6b37-43eb-a7f5-3b2d4577c736" />
|
<img height="600" alt="image" src="https://github.com/user-attachments/assets/2a06c9b4-6b37-43eb-a7f5-3b2d4577c736" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This is a rewrite of [WacK-Repackager](https://github.com/muskit/WacK-Repackager) to work with the upcoming Saturn project.
|
This is a rewrite of [WacK-Repackager](https://github.com/muskit/WacK-Repackager) to work with the upcoming Saturn project.
|
||||||
|
|
||||||
|
**If this program does not run, make sure [.NET 9.0+](https://dotnet.microsoft.com/en-us/download) is installed.**
|
||||||
|
|
||||||
Head over to [HOWTO](HOWTO.md) for required data preparation.
|
Head over to [HOWTO](HOWTO.md) for required data preparation.
|
||||||
|
|||||||
+1
-1
Submodule _External/SaturnData updated: 9c25652c01...6eb7ce9c04
+1
-1
Submodule _External/UAssetAPI updated: ec758cff14...8aa90add4d
@@ -3,12 +3,13 @@
|
|||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
app_version=MercuryConverter-v$(cat src/Assets/version)
|
app_version=MercuryConverter-v$(cat src/Assets/version)
|
||||||
|
echo Building $app_version
|
||||||
|
|
||||||
# create builds
|
# create builds
|
||||||
dotnet publish src --runtime linux-x64 -c Release -p:PublishSingleFile=True -o "./builds/$app_version-linux-x64"
|
dotnet publish src --runtime linux-x64 -c Release -p:PublishSingleFile=True --self-contained false -o "./builds/$app_version-linux-x64" &&
|
||||||
dotnet publish src --runtime win-x64 -c Release -p:PublishSingleFile=True -o "./builds/$app_version-win-x64"
|
dotnet publish src --runtime win-x64 -c Release -p:PublishSingleFile=True --self-contained false -o "./builds/$app_version-win-x64" &&
|
||||||
|
|
||||||
# package builds
|
# package builds
|
||||||
cd builds
|
cd builds &&
|
||||||
zip -r "$app_version-linux-x64.zip" "$app_version-linux-x64"
|
zip -r "$app_version-linux-x64.zip" "$app_version-linux-x64" &&
|
||||||
zip -r "$app_version-win-x64.zip" "$app_version-win-x64"
|
zip -r "$app_version-win-x64.zip" "$app_version-win-x64"
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.1
|
1.11
|
||||||
+10
-6
@@ -1,3 +1,4 @@
|
|||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using MercuryConverter.Utility;
|
using MercuryConverter.Utility;
|
||||||
@@ -65,25 +66,29 @@ public class Song
|
|||||||
var chartFilePath = Path.Combine(Settings.I!.DataPath, "MusicData", Id, $"{Id}_{Consts.DIFF_FILENAME_APPEND[diff]}.mer");
|
var chartFilePath = Path.Combine(Settings.I!.DataPath, "MusicData", Id, $"{Id}_{Consts.DIFF_FILENAME_APPEND[diff]}.mer");
|
||||||
var clearThreshold = ((FloatPropertyData)assetData[Consts.DIFF_CLEAR_KEY[diff]]).Value;
|
var clearThreshold = ((FloatPropertyData)assetData[Consts.DIFF_CLEAR_KEY[diff]]).Value;
|
||||||
|
|
||||||
|
var c = NotationSerializer.ToChart(chartFilePath, new NotationReadArgs { }, out var chExcs);
|
||||||
|
// TODO: check exceptions
|
||||||
|
|
||||||
var e = NotationSerializer.ToEntry(chartFilePath, new NotationReadArgs
|
var e = NotationSerializer.ToEntry(chartFilePath, new NotationReadArgs
|
||||||
{
|
{
|
||||||
InferClearThresholdFromDifficulty = false,
|
InferClearThresholdFromDifficulty = false,
|
||||||
});
|
}, out var exportExcs);
|
||||||
|
// TODO: check exceptions
|
||||||
|
|
||||||
|
c.Build(e); // set timings as appropriate
|
||||||
e.Title = Name;
|
e.Title = Name;
|
||||||
e.Reading = Rubi;
|
e.Reading = Rubi;
|
||||||
e.Artist = Artist;
|
e.Artist = Artist;
|
||||||
e.BpmMessage = BpmMessage;
|
e.BpmMessage = BpmMessage;
|
||||||
e.PreviewBegin = PreviewTime * 1000f;
|
|
||||||
e.PreviewLength = PreviewLen * 1000f;
|
|
||||||
e.ClearThreshold = clearThreshold;
|
e.ClearThreshold = clearThreshold;
|
||||||
e.Difficulty = diff;
|
e.Difficulty = diff;
|
||||||
e.Level = l.Value.Item1;
|
e.Level = l.Value.Item1;
|
||||||
e.NotesDesigner = l.Value.Item2;
|
e.NotesDesigner = l.Value.Item2;
|
||||||
e.JacketPath = "jacket.png";
|
e.JacketFile = "jacket.png";
|
||||||
|
|
||||||
// TODO: video
|
// TODO: video
|
||||||
|
|
||||||
e.Guid = $"MERCURY_{Uid}_0{(int)diff}";
|
e.Id = $"MERCURY_{Uid}_0{(int)diff}";
|
||||||
|
|
||||||
if (new List<uint> { 1, 2 }.Contains(Source))
|
if (new List<uint> { 1, 2 }.Contains(Source))
|
||||||
{
|
{
|
||||||
@@ -98,7 +103,6 @@ public class Song
|
|||||||
e.Background = BackgroundOption.Version3;
|
e.Background = BackgroundOption.Version3;
|
||||||
}
|
}
|
||||||
|
|
||||||
var c = NotationSerializer.ToChart(chartFilePath, new NotationReadArgs { });
|
|
||||||
ret.Add((e, c));
|
ret.Add((e, c));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class Exporter
|
|||||||
}
|
}
|
||||||
finishedAudio.Add(audioKey);
|
finishedAudio.Add(audioKey);
|
||||||
}
|
}
|
||||||
ec.Item1.AudioPath = audioExportFileName;
|
ec.Item1.AudioFile = audioExportFileName;
|
||||||
|
|
||||||
/// VIDEO ///
|
/// VIDEO ///
|
||||||
// mv_... = set video
|
// mv_... = set video
|
||||||
@@ -97,7 +97,7 @@ public class Exporter
|
|||||||
|
|
||||||
finishedMovies.Add(movie);
|
finishedMovies.Add(movie);
|
||||||
}
|
}
|
||||||
ec.Item1.VideoPath = vidFileName;
|
ec.Item1.VideoFile = vidFileName;
|
||||||
}
|
}
|
||||||
prevMovie = movie;
|
prevMovie = movie;
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ public class Exporter
|
|||||||
new NotationWriteArgs { FormatVersion = options.ChartFormat }
|
new NotationWriteArgs { FormatVersion = options.ChartFormat }
|
||||||
);
|
);
|
||||||
// restore audio key in db AFTER exporting metadata
|
// restore audio key in db AFTER exporting metadata
|
||||||
ec.Item1.AudioPath = audioKey;
|
ec.Item1.AudioFile = audioKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// JACKET ///
|
/// JACKET ///
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
<AvaloniaUseCompiledBindingsByDefault>false</AvaloniaUseCompiledBindingsByDefault>
|
<AvaloniaUseCompiledBindingsByDefault>false</AvaloniaUseCompiledBindingsByDefault>
|
||||||
|
<ApplicationIcon>../icon.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -24,7 +25,6 @@
|
|||||||
<PackageReference Include="DialogHost.Avalonia" Version="0.9.3" />
|
<PackageReference Include="DialogHost.Avalonia" Version="0.9.3" />
|
||||||
<PackageReference Include="ffmpegcore" Version="5.2.0" />
|
<PackageReference Include="ffmpegcore" Version="5.2.0" />
|
||||||
<PackageReference Include="ini-parser" Version="2.5.2" />
|
<PackageReference Include="ini-parser" Version="2.5.2" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<DataGridTextColumn Header="ID" Width="90" Binding="{Binding Id}"/>
|
<DataGridTextColumn Header="ID" Width="90" Binding="{Binding Id}"/>
|
||||||
<DataGridTextColumn Header="Title" Width="*" Binding="{Binding Name}"/>
|
<DataGridTextColumn Header="Title" Width="*" Binding="{Binding Name}"/>
|
||||||
<DataGridTextColumn Header="Artist" Width="*" Binding="{Binding Artist}"/>
|
<DataGridTextColumn Header="Artist" Width="*" Binding="{Binding Artist}"/>
|
||||||
<DataGridTextColumn Header="Version Released" Width="150" Binding="{Binding SourceName}" SortMemberPath="Source"/>
|
<DataGridTextColumn Header="Version Released" Width="160" Binding="{Binding SourceName}" SortMemberPath="Source"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
<DataGrid.Styles>
|
<DataGrid.Styles>
|
||||||
<Style Selector="DataGridCell">
|
<Style Selector="DataGridCell">
|
||||||
|
|||||||
@@ -74,6 +74,14 @@ public partial class Selection : Panel
|
|||||||
(Song)e.AddedItems[e.AddedItems.Count - 1]! :
|
(Song)e.AddedItems[e.AddedItems.Count - 1]! :
|
||||||
(Song)ListingTable.SelectedItems[ListingTable.SelectedItems.Count - 1]!;
|
(Song)ListingTable.SelectedItems[ListingTable.SelectedItems.Count - 1]!;
|
||||||
|
|
||||||
|
// Debug: Saturn GUIDs
|
||||||
|
var ecs = song.GetEntryCharts();
|
||||||
|
foreach (var (entry, _) in ecs)
|
||||||
|
{
|
||||||
|
Console.WriteLine(entry.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: song preview playback
|
||||||
Dispatcher.UIThread.Post(() =>
|
Dispatcher.UIThread.Post(() =>
|
||||||
{
|
{
|
||||||
if (song.Jacket != null)
|
if (song.Jacket != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user