Skip to content

Commit

Permalink
Reorganize projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
stakira committed Oct 31, 2021
1 parent b6807e9 commit 8ff1013
Show file tree
Hide file tree
Showing 24 changed files with 577 additions and 301 deletions.
2 changes: 1 addition & 1 deletion Misc/sync_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def dict_to_file(filename, dict, en_dict):

if __name__ == "__main__":
dir = os.path.dirname(os.path.abspath(__file__))
dir = os.path.join(dir, "../OpenUtau.App/Strings/")
dir = os.path.join(dir, "../OpenUtau/Strings/")
lang_files = os.listdir(dir)
src_file = next(filter(lambda f: f.endswith("Strings.axaml"), lang_files))
src_file = os.path.join(dir, src_file)
Expand Down
2 changes: 2 additions & 0 deletions OpenUtau.Core/Api/Phonemizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ public void SetTiming(double bpm, int beatUnit, int resolution) {
this.resolution = resolution;
}

public string PluginDir => PathManager.Inst.PluginsPath;

/// <summary>
/// Utility method to convert ticks to milliseconds.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Core/Util/PathManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public PathManager() {
public string SingersPath => Path.Combine(HomePath, "Singers");
public string PluginsPath => Path.Combine(HomePath, "Plugins");
public string TemplatesPath => Path.Combine(HomePath, "Templates");
public string LogFilePath => Path.Combine(HomePath, "log.txt");
public string LogFilePath => Path.Combine(HomePath, "Logs", "log.txt");
public string PrefsFilePath => Path.Combine(HomePath, "prefs.json");

public string GetCachePath() {
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Plugin.Builtin/ArpasingPhonemizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void Initialize() {
// Load cmudict.
cmudict = G2pDictionary.GetShared("cmudict");
// Load g2p plugin dictionary.
string filepath = Path.Combine(Path.GetDirectoryName(typeof(ArpasingPhonemizer).Assembly.Location), "arpasing.yaml");
string filepath = Path.Combine(PluginDir, "arpasing.yaml");
try {
CreateDefaultPluginDict(filepath);
if (File.Exists(filepath)) {
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Win/OpenUtau.Win.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OpenUtau.App\OpenUtau.App.csproj" />
<ProjectReference Include="..\OpenUtau\OpenUtau.csproj" />
<ProjectReference Include="..\OpenUtau.Core\OpenUtau.Core.csproj" />
<ProjectReference Include="..\OpenUtau.Plugin.Builtin\OpenUtau.Plugin.Builtin.csproj" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Win/UI/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
xmlns:il="clr-namespace:Microsoft.Expression.Interactivity.Layout;assembly=Microsoft.Expression.Interactions"
xmlns:ib="clr-namespace:OpenUtau.UI.Behaviors"
Style="{StaticResource UBorderlessWindow}" Title="OpenUTAU" KeyDown="Window_KeyDown" Activated="Window_Activated">
Style="{StaticResource UBorderlessWindow}" Title="OpenUTAU (Legacy)" KeyDown="Window_KeyDown" Activated="Window_Activated">
<i:Interaction.Behaviors>
<ib:BorderlessWindowBehavior/>
</i:Interaction.Behaviors>
Expand Down
9 changes: 6 additions & 3 deletions OpenUtau.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31321.278
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau", "OpenUtau\OpenUtau.csproj", "{D951492F-0901-4296-AE7F-831430C07FA9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau.Win", "OpenUtau.Win\OpenUtau.Win.csproj", "{D951492F-0901-4296-AE7F-831430C07FA9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8CC070AB-64DC-4C02-89E7-D8E5EC91A492}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -21,11 +21,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau.Test", "OpenUtau.T
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau.Core", "OpenUtau.Core\OpenUtau.Core.csproj", "{7793257C-054C-4935-A1EF-CAB345E9F6C5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau.App", "OpenUtau.App\OpenUtau.App.csproj", "{9535E26C-4584-4126-B6F7-B91B41113196}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau", "OpenUtau\OpenUtau.csproj", "{9535E26C-4584-4126-B6F7-B91B41113196}"
ProjectSection(ProjectDependencies) = postProject
{D24740E1-CC43-4226-A573-59C013FE50A2} = {D24740E1-CC43-4226-A573-59C013FE50A2}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenUtau.Plugin.Builtin", "OpenUtau.Plugin.Builtin\OpenUtau.Plugin.Builtin.csproj", "{D24740E1-CC43-4226-A573-59C013FE50A2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unzipper", "Unzipper\Unzipper.csproj", "{82B142C1-145B-4A9E-9B69-47EAB17CB6C0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Unzipper", "Unzipper\Unzipper.csproj", "{82B142C1-145B-4A9E-9B69-47EAB17CB6C0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
6 changes: 5 additions & 1 deletion OpenUtau/OpenUtau.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<SatelliteResourceLanguages>none</SatelliteResourceLanguages>
<Nullable>enable</Nullable>
Expand Down Expand Up @@ -29,6 +29,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenUtau.Core\OpenUtau.Core.csproj" />
<ProjectReference Include="..\OpenUtau.Plugin.Builtin\OpenUtau.Plugin.Builtin.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="..\libs\**" CopyToOutputDirectory="PreserveNewest" LinkBase="libs\" />
Expand All @@ -46,4 +47,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="(if not exist $(OutDir)Plugins mkdir $(OutDir)Plugins) &amp;&amp; (copy /y $(OutDir)OpenUtau.Plugin.Builtin.dll $(OutDir)Plugins\)" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion OpenUtau/Strings/Strings.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
<system:String x:Key="pianoroll.menu.lyrics">Lyrics</system:String>
<system:String x:Key="pianoroll.menu.lyrics.hiraganatoromaji">Hiragana to Romaji</system:String>
<system:String x:Key="pianoroll.menu.lyrics.javcvtocv">Japanese VCV to CV</system:String>
<system:String x:Key="pianoroll.menu.lyrics.removetonesuffix">Remove Tone Suffix</system:String>
<system:String x:Key="pianoroll.menu.lyrics.removelettersuffix">Remove Letter Suffix</system:String>
<system:String x:Key="pianoroll.menu.lyrics.removetonesuffix">Remove Tone Suffix</system:String>
<system:String x:Key="pianoroll.menu.lyrics.romajitohiragana">Romaji to Hiragana</system:String>
<system:String x:Key="pianoroll.menu.notes">Notes</system:String>
<system:String x:Key="pianoroll.menu.notes.addtaildash">Add tail "-"</system:String>
Expand Down
51 changes: 40 additions & 11 deletions OpenUtau/Strings/Strings.es-ES.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,27 @@
<!--<system:String x:Key="oto.consonant">Consonant</system:String>-->
<!--<system:String x:Key="oto.cutoff">Cutoff</system:String>-->
<!--<system:String x:Key="oto.file">File</system:String>-->
<!--<system:String x:Key="oto.flavor">Flavor</system:String>-->
<!--<system:String x:Key="oto.offset">Offset</system:String>-->
<!--<system:String x:Key="oto.overlap">Overlap</system:String>-->
<!--<system:String x:Key="oto.phonetic">Phonetic</system:String>-->
<!--<system:String x:Key="oto.prefix">Prefix</system:String>-->
<!--<system:String x:Key="oto.preutter">Preutter</system:String>-->
<!--<system:String x:Key="oto.set">Set</system:String>-->
<!--<system:String x:Key="oto.suffix">Suffix</system:String>-->
<!--<system:String x:Key="oto.tags">Tags</system:String>-->

<!--<system:String x:Key="pianoroll.menu.lyrics">Lyrics</system:String>-->
<!--<system:String x:Key="pianoroll.menu.lyrics.hiraganatoromaji">Hiragana to Romaji</system:String>-->
<!--<system:String x:Key="pianoroll.menu.lyrics.javcvtocv">Japanese VCV to CV</system:String>-->
<!--<system:String x:Key="pianoroll.menu.lyrics.removelettersuffix">Remove Letter Suffix</system:String>-->
<!--<system:String x:Key="pianoroll.menu.lyrics.removetonesuffix">Remove Tone Suffix</system:String>-->
<!--<system:String x:Key="pianoroll.menu.lyrics.romajitohiragana">Romaji to Hiragana</system:String>-->
<!--<system:String x:Key="pianoroll.menu.notes">Notes</system:String>-->
<!--<system:String x:Key="pianoroll.menu.notes.addtaildash">Add tail "-"</system:String>-->
<!--<system:String x:Key="pianoroll.menu.notes.quantize15">Quantize to 1/128</system:String>-->
<!--<system:String x:Key="pianoroll.menu.notes.quantize30">Quantize to 1/64</system:String>-->
<!--<system:String x:Key="pianoroll.menu.part">Part</system:String>-->
<!--<system:String x:Key="pianoroll.menu.part.legacypluginexp">Legacy Plugin (Experimental)</system:String>-->
<!--<system:String x:Key="pianoroll.menu.part.rename">Rename</system:String>-->
<!--<system:String x:Key="pianoroll.toggle.phoneme">View Phonemes (O)</system:String>-->
<!--<system:String x:Key="pianoroll.toggle.pitch">View Pitch Bend (I)</system:String>-->
Expand All @@ -110,10 +116,14 @@
<!--<system:String x:Key="pianoroll.toggle.vibrato">View Vibrato (U)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.eraser">Eraser Tool (3)</system:String>-->
<!--<system:String x:Key="pianoroll.tool.pen">Pen Tool (2)
Left click to draw
Left click to draw
Right click to delete</system:String>-->
<!--<system:String x:Key="pianoroll.tool.selection">Selection Tool (1)
Hold Ctrl to select more</system:String>-->
<!--<system:String x:Key="pianoroll.tool.tagger">Tagger Tool (4)
Left click to draw
Right click to erase</system:String>-->
<!--<system:String x:Key="pianoroll.tool.tagger.setup">Setup Tags</system:String>-->

<!--<system:String x:Key="prefs.advanced">Advanced</system:String>-->
<!--<system:String x:Key="prefs.advanced.beta">Beta</system:String>-->
Expand All @@ -140,34 +150,44 @@ Hold Ctrl to select more</system:String>-->
</system:String>
<system:String x:Key="prefs.rendering.resampler.preview">Resampler para la previsualización</system:String>
<!--<system:String x:Key="prefs.rendering.resampler.warn">
Warning: moresampler is not supported yet. It will be extremely slow and cause high CPU usage. If you insist, please:
1. Turn on "resampler-compatibility" in moreconfig.txt.
2. Reduce pre-render threads to 1 or 2.
3. Patiently wait for prerender to finish before play.
Warning: moresampler is not supported yet. It will be extremely slow and cause high CPU usage. If you insist, please:
1. Turn on "resampler-compatibility" in moreconfig.txt.
2. Reduce pre-render threads to 1 or 2.
3. Patiently wait for prerender to finish before play.
</system:String>-->

<!--<system:String x:Key="singers.caption">Singers</system:String>-->
<!--<system:String x:Key="singers.location">Location</system:String>-->
<!--<system:String x:Key="singers.refresh">Refresh</system:String>-->
<!--<system:String x:Key="singers.setencoding">Set Encoding</system:String>-->
<!--<system:String x:Key="singers.subbanks.add">Add</system:String>-->
<!--<system:String x:Key="singers.subbanks.caption">Tag Editor</system:String>-->
<!--<system:String x:Key="singers.subbanks.dir">Directory</system:String>-->
<!--<system:String x:Key="singers.subbanks.prefix">Prefix</system:String>-->
<!--<system:String x:Key="singers.subbanks.remove">Remove</system:String>-->
<!--<system:String x:Key="singers.subbanks.reset">Reset</system:String>-->
<!--<system:String x:Key="singers.subbanks.save">Save</system:String>-->
<!--<system:String x:Key="singers.subbanks.suffix">Suffix</system:String>-->
<!--<system:String x:Key="singers.subbanks.tags">Tags</system:String>-->
<!--<system:String x:Key="singers.subbanks.toneranges">Tone Ranges</system:String>-->

<!--<system:String x:Key="tip.exps">
Left Button Draw: Set expressions
Right Button Draw: Reset expressions
Left Button Draw: Set expressions
Right Button Draw: Reset expressions
</system:String>-->
<system:String x:Key="tip.lyricbox.next">Tab: Siguiente nota</system:String>
<system:String x:Key="tip.lyricbox.prev">Shift+Tab: Nota anterior</system:String>
<!--<system:String x:Key="tip.notes.basics">
Selection Tool
Selection Tool
Box Select: Select notes
Ctrl + Box Select: Select more notes
Up/Down: Transpose selected notes
Ctrl + Up/Down: Transpose selected notes by octave
Pen Tool
Pen Tool
Left Button Draw: Add note
Right Click: Remove note
Right Button Draw: Remove multiple notes
General
General
T: Toggle tips
Drag Note: Move note
Drag End of Note: Resize note
Expand All @@ -180,6 +200,15 @@ Hold Ctrl to select more</system:String>-->
<system:String x:Key="tracks.movedown">Mover hacia abajo</system:String>
<system:String x:Key="tracks.moveup">Mover hacia arriba</system:String>
<system:String x:Key="tracks.remove">Remover</system:String>
<!--<system:String x:Key="tracks.selectsinger">Select Singer</system:String>-->

<!--<system:String x:Key="updater.caption">Check for Update</system:String>-->
<!--<system:String x:Key="updater.github">GitHub</system:String>-->
<!--<system:String x:Key="updater.status.available">Update v{0} available!</system:String>-->
<!--<system:String x:Key="updater.status.checking">Checking for updates...</system:String>-->
<!--<system:String x:Key="updater.status.notavailable">Up to date</system:String>-->
<!--<system:String x:Key="updater.status.unknown">Unable to check update</system:String>-->
<!--<system:String x:Key="updater.update">Update</system:String>-->

<system:String x:Key="warning">Advertencia</system:String>
<system:String x:Key="warning.asciipath">Su ruta de instalación de OpenUTAU "{0}" contiene caracteres no-ASCII. Resamplers.exe probablemente no funcionen.</system:String>
Expand Down
18 changes: 9 additions & 9 deletions OpenUtau/Strings/Strings.es-MX.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
<system:String x:Key="dialogs.export.caption">Exportar</system:String>
<system:String x:Key="dialogs.export.savefirst">Porfavor, guarda el archivo antes de exportarlo.</system:String>
<system:String x:Key="dialogs.messagebox.cancel">Cancelar</system:String>
<system:String x:Key="dialogs.messagebox.no">No</system:String>
<!--<system:String x:Key="dialogs.messagebox.no">No</system:String>-->
<system:String x:Key="dialogs.messagebox.ok">OK</system:String>
<system:String x:Key="dialogs.messagebox.yes">Sí</system:String>
<system:String x:Key="dialogs.noresampler.caption">Resampler no encontrado</system:String>
<system:String x:Key="dialogs.noresampler.message">No se encontró un Resampler. Pone uno (sea .exe o .dll) en la carpeta Resamplers en la ruta de instalación de OpenUTAU.</system:String>

<system:String x:Key="errors.caption">Error</system:String>
<!--<system:String x:Key="errors.caption">Error</system:String>-->

<system:String x:Key="exps.abbr">Abreviación</system:String>
<system:String x:Key="exps.apply">Aplicar</system:String>
Expand Down Expand Up @@ -69,7 +69,7 @@
<system:String x:Key="menu.help.about">Sobre OpenUTAU</system:String>
<system:String x:Key="menu.help.wiki">Wiki de OpenUTAU</system:String>
<system:String x:Key="menu.tools">_Herramientas</system:String>
<system:String x:Key="menu.tools.layout">Layout</system:String>
<!--<system:String x:Key="menu.tools.layout">Layout</system:String>-->
<system:String x:Key="menu.tools.layout.hsplit11">1:1 Horizontal</system:String>
<system:String x:Key="menu.tools.layout.hsplit12">1:2 Horizontal</system:String>
<system:String x:Key="menu.tools.layout.hsplit13">1:3 Horizontal</system:String>
Expand All @@ -82,7 +82,7 @@
<system:String x:Key="menu.tools.singer.installadv">Instalar Voz (Avanzado)</system:String>
<system:String x:Key="menu.tools.singers">Voces</system:String>

<system:String x:Key="oto.alias">Alias</system:String>
<!--<system:String x:Key="oto.alias">Alias</system:String>-->
<system:String x:Key="oto.consonant">Consonante</system:String>
<system:String x:Key="oto.cutoff">Silencio (Derecho)</system:String>
<system:String x:Key="oto.file">Archivo</system:String>
Expand All @@ -93,13 +93,13 @@
<system:String x:Key="oto.preutter">Precedente</system:String>
<system:String x:Key="oto.set">Aplicar</system:String>
<system:String x:Key="oto.suffix">Sufijo</system:String>
<system:String x:Key="oto.tags">Tags</system:String>
<!--<system:String x:Key="oto.tags">Tags</system:String>-->

<system:String x:Key="pianoroll.menu.lyrics">Letras</system:String>
<system:String x:Key="pianoroll.menu.lyrics.hiraganatoromaji">Hiragana a Romaji</system:String>
<system:String x:Key="pianoroll.menu.lyrics.hiraganatoromaji">Hiragana a Romaji</system:String>
<system:String x:Key="pianoroll.menu.lyrics.javcvtocv">VCV a CV (Japonés)</system:String>
<system:String x:Key="pianoroll.menu.lyrics.removetonesuffix">Quitar Sufijo de Tono</system:String>
<system:String x:Key="pianoroll.menu.lyrics.removelettersuffix">Quitar Sufijo de Letra</system:String>
<system:String x:Key="pianoroll.menu.lyrics.removetonesuffix">Quitar Sufijo de Tono</system:String>
<system:String x:Key="pianoroll.menu.lyrics.romajitohiragana">Romaji a Hiragana</system:String>
<system:String x:Key="pianoroll.menu.notes">Notas</system:String>
<system:String x:Key="pianoroll.menu.notes.addtaildash">Añadir cola "-"</system:String>
Expand All @@ -126,7 +126,7 @@ Click derecho para borrar</system:String>
<system:String x:Key="pianoroll.tool.tagger.setup">Configurar Etiquetas</system:String>

<system:String x:Key="prefs.advanced">Avanzado</system:String>
<system:String x:Key="prefs.advanced.beta">Beta</system:String>
<!--<system:String x:Key="prefs.advanced.beta">Beta</system:String>-->
<system:String x:Key="prefs.advanced.stable">Estable</system:String>
<system:String x:Key="prefs.appearance">Apariencia</system:String>
<system:String x:Key="prefs.appearance.lang">Lenguaje</system:String>
Expand Down Expand Up @@ -203,7 +203,7 @@ General
<system:String x:Key="tracks.selectsinger">Seleccionar Voz</system:String>

<system:String x:Key="updater.caption">Buscar Actualizaciones</system:String>
<system:String x:Key="updater.github">GitHub</system:String>
<!--<system:String x:Key="updater.github">GitHub</system:String>-->
<system:String x:Key="updater.status.available">Actualización Disponible (v{0})</system:String>
<system:String x:Key="updater.status.checking">Buscando Actualizaciones...</system:String>
<system:String x:Key="updater.status.notavailable">OpenUTAU esta actualizado</system:String>
Expand Down
Loading

0 comments on commit 8ff1013

Please sign in to comment.