8 Commits

Author SHA1 Message Date
Alex 534ec95e63 update core dependencies 2025-11-10 21:55:48 -08:00
Alex 9a00748d65 add an icon 2025-11-10 21:55:48 -08:00
Alex c449975c6d make sure build script doesn't keep going if something fails 2025-11-10 21:55:48 -08:00
Alex 756dc77b0b Update README.md 2025-09-02 23:42:54 -07:00
Alex afc08d72aa shrink build package (--self-contain false) 2025-09-02 15:02:57 -07:00
Alex c609e35b8b shrink release pkg, fix app directory resolution 2025-09-02 13:19:59 -07:00
Alex a2d123e953 Update README.md 2025-09-01 22:28:48 -07:00
Alex a58aeca36b add script to build and package 2025-09-01 22:25:30 -07:00
15 changed files with 49 additions and 17 deletions
+1
View File
@@ -134,3 +134,4 @@ $RECYCLE.BIN/
_NCrunch* _NCrunch*
.vscode/ .vscode/
builds/
+4
View File
@@ -1,5 +1,9 @@
# MercuryConverter # MercuryConverter
<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.
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env sh
cd $(dirname $0)
app_version=MercuryConverter-v$(cat src/Assets/version)
echo Building $app_version
# create builds
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 --self-contained false -o "./builds/$app_version-win-x64" &&
# package builds
cd builds &&
zip -r "$app_version-linux-x64.zip" "$app_version-linux-x64" &&
zip -r "$app_version-win-x64.zip" "$app_version-win-x64"
View File
View File
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

+1 -1
View File
@@ -1 +1 @@
1 1.11
+10 -6
View File
@@ -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));
} }
+3 -3
View File
@@ -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 ///
+1 -1
View File
@@ -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>
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -65,7 +65,7 @@ public static class Utils
if (_ffmpegAvailable == null) if (_ffmpegAvailable == null)
{ {
var testVidPath = Path.Combine( var testVidPath = Path.Combine(
Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)!, AppContext.BaseDirectory,
"ic.mp4" "ic.mp4"
); );