File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed
Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,6 @@ public override void OnFrameworkInitializationCompleted()
4343 AudioEngine . Destroy ( ) ;
4444 } ;
4545
46- // init translation
47- TranslationManager . Init ( PathManager . TranslationsFolder ) ;
48- TranslationManager . CurrentLanguage . Value = TranslationManager . Languages . Contains ( Settings . Language . Value ) ? Settings . Language : TranslationManager . GetCurrentOSLanguage ( ) ;
49- Settings . Language . Modified . Subscribe ( ( ) => TranslationManager . CurrentLanguage . Value = Settings . Language ) ;
50-
5146 // init audio engine
5247 AudioUtils . Init ( new NAudioCodec ( ) ) ;
5348 AudioEngine . Init ( new SDLPlaybackHandler ( ) ) ;
Original file line number Diff line number Diff line change 11using System ;
22using System . Diagnostics ;
33using System . IO ;
4+ using System . Linq ;
45using Avalonia ;
56using Avalonia . Media ;
67using Avalonia . ReactiveUI ;
78using TuneLab . Base . Utils ;
89using TuneLab . Configs ;
10+ using TuneLab . I18N ;
911using TuneLab . Utils ;
1012
1113namespace TuneLab ;
@@ -18,9 +20,11 @@ class Program
1820 [ STAThread ]
1921 public static void Main ( string [ ] args )
2022 {
23+ // init logger
2124 Log . SetupLogger ( new FileLogger ( Path . Combine ( PathManager . LogsFolder , "TuneLab_" + DateTime . Now . ToString ( "yyyy-MM-dd_hh-mm-ss" ) + ".log" ) ) ) ;
2225 Log . Info ( "Version: " + AppInfo . Version ) ;
2326
27+ // check if other instance is running
2428 var lockFile = LockFile . Create ( PathManager . LockFilePath ) ;
2529 if ( lockFile == null )
2630 {
@@ -30,11 +34,19 @@ public static void Main(string[] args)
3034 return ;
3135 }
3236
37+ // init setting
3338 Settings . Init ( PathManager . SettingsFilePath ) ;
3439
40+ // init translation
41+ TranslationManager . Init ( PathManager . TranslationsFolder ) ;
42+ TranslationManager . CurrentLanguage . Value = TranslationManager . Languages . Contains ( Settings . Language . Value ) ? Settings . Language : TranslationManager . GetCurrentOSLanguage ( ) ;
43+ Settings . Language . Modified . Subscribe ( ( ) => TranslationManager . CurrentLanguage . Value = Settings . Language ) ;
44+
45+ // event loop
3546 BuildAvaloniaApp ( )
3647 . StartWithClassicDesktopLifetime ( args ) ;
3748
49+ // exit
3850 lockFile . Dispose ( ) ;
3951 }
4052
Original file line number Diff line number Diff line change 4646 <ProjectReference Include =" ..\TuneLab.Extensions.Voices\TuneLab.Extensions.Voices.csproj" />
4747 </ItemGroup >
4848
49- <Target Name =" CopyFiles" AfterTargets =" Build" >
50- <ItemGroup >
51- <Resources Include =" Resources\**\*.*" />
52- </ItemGroup >
53-
54- <Copy SourceFiles =" @(Resources)" DestinationFolder =" $(TargetDir)\Resources\%(RecursiveDir)" />
55- </Target >
49+ <ItemGroup >
50+ <None Update =" Resources\**\*.*" >
51+ <CopyToOutputDirectory >Always</CopyToOutputDirectory >
52+ </None >
53+ </ItemGroup >
5654</Project >
You can’t perform that action at this time.
0 commit comments