mirror of
				https://github.com/2dust/v2rayN.git
				synced 2025-10-30 20:12:52 +00:00 
			
		
		
		
	Compare commits
	
		
			No commits in common. "3df57f74ba192f3cc1a87d8b142cf44dc3fb356d" and "f947f63e6df395b4e2f9ccc6f8712dbe60d34bb7" have entirely different histories.
		
	
	
		
			3df57f74ba
			...
			f947f63e6d
		
	
		
					 4 changed files with 21 additions and 39 deletions
				
			
		
							
								
								
									
										12
									
								
								.github/workflows/winget-publish.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/winget-publish.yml
									
									
									
									
										vendored
									
									
								
							|  | @ -22,18 +22,10 @@ jobs: | ||||||
|           $github = Invoke-RestMethod -uri "https://api.github.com/repos/2dust/v2rayN/releases"  |           $github = Invoke-RestMethod -uri "https://api.github.com/repos/2dust/v2rayN/releases"  | ||||||
| 
 | 
 | ||||||
|           $targetRelease = $github | Where-Object -Property prerelease -match 'False' | Select -First 1 |           $targetRelease = $github | Where-Object -Property prerelease -match 'False' | Select -First 1 | ||||||
|            |           $installerUrl  = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'v2rayN-windows-64\.zip*' | Select -ExpandProperty browser_download_url | ||||||
|           $x64InstallerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'v2rayN-windows-64\.zip' | Select -ExpandProperty browser_download_url |  | ||||||
|           $arm64InstallerUrl = $targetRelease | Select -ExpandProperty assets -First 1 | Where-Object -Property name -match 'v2rayN-windows-arm64\.zip' | Select -ExpandProperty browser_download_url |  | ||||||
| 
 | 
 | ||||||
|           $ver = $targetRelease.tag_name |           $ver = $targetRelease.tag_name | ||||||
| 
 | 
 | ||||||
|           # getting latest wingetcreate file |           # getting latest wingetcreate file | ||||||
|           iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe |           iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe | ||||||
|            |           .\wingetcreate.exe update $wingetPackage -s -v $ver -u "$installerUrl|x64" -t $gitToken | ||||||
|           Write-Host "Updating with both x64 and arm64 installers" |  | ||||||
|           Write-Host "Version: $ver" |  | ||||||
|           Write-Host "x64 URL: $x64InstallerUrl" |  | ||||||
|           Write-Host "arm64 URL: $arm64InstallerUrl" |  | ||||||
|            |  | ||||||
|           .\wingetcreate.exe update $wingetPackage -s -v $ver -u "$x64InstallerUrl|x64" "$arm64InstallerUrl|arm64" -t $gitToken |  | ||||||
|  |  | ||||||
|  | @ -105,7 +105,6 @@ public class UIItem | ||||||
|     public bool Hide2TrayWhenClose { get; set; } |     public bool Hide2TrayWhenClose { get; set; } | ||||||
|     public List<ColumnItem> MainColumnItem { get; set; } |     public List<ColumnItem> MainColumnItem { get; set; } | ||||||
|     public bool ShowInTaskbar { get; set; } |     public bool ShowInTaskbar { get; set; } | ||||||
|     public bool MacOSShowInDock { get; set; } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| [Serializable] | [Serializable] | ||||||
|  |  | ||||||
|  | @ -11,6 +11,11 @@ public partial class App : Application | ||||||
| { | { | ||||||
|     public override void Initialize() |     public override void Initialize() | ||||||
|     { |     { | ||||||
|  |         if (!AppHandler.Instance.InitApp()) | ||||||
|  |         { | ||||||
|  |             Environment.Exit(0); | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|         AvaloniaXamlLoader.Load(this); |         AvaloniaXamlLoader.Load(this); | ||||||
| 
 | 
 | ||||||
|         AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; |         AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; | ||||||
|  |  | ||||||
|  | @ -14,17 +14,13 @@ internal class Program | ||||||
|     [STAThread] |     [STAThread] | ||||||
|     public static void Main(string[] args) |     public static void Main(string[] args) | ||||||
|     { |     { | ||||||
|         if (OnStartup(args) == false) |         OnStartup(args); | ||||||
|         { |  | ||||||
|             Environment.Exit(0); |  | ||||||
|             return; |  | ||||||
|         } |  | ||||||
| 
 | 
 | ||||||
|         BuildAvaloniaApp() |         BuildAvaloniaApp() | ||||||
|             .StartWithClassicDesktopLifetime(args); |             .StartWithClassicDesktopLifetime(args); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     private static bool OnStartup(string[]? Args) |     private static void OnStartup(string[]? Args) | ||||||
|     { |     { | ||||||
|         if (Utils.IsWindows()) |         if (Utils.IsWindows()) | ||||||
|         { |         { | ||||||
|  | @ -34,7 +30,8 @@ internal class Program | ||||||
|             if (!rebootas && !bCreatedNew) |             if (!rebootas && !bCreatedNew) | ||||||
|             { |             { | ||||||
|                 ProgramStarted.Set(); |                 ProgramStarted.Set(); | ||||||
|                 return false; |                 Environment.Exit(0); | ||||||
|  |                 return; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         else |         else | ||||||
|  | @ -42,30 +39,19 @@ internal class Program | ||||||
|             _ = new Mutex(true, "v2rayN", out var bOnlyOneInstance); |             _ = new Mutex(true, "v2rayN", out var bOnlyOneInstance); | ||||||
|             if (!bOnlyOneInstance) |             if (!bOnlyOneInstance) | ||||||
|             { |             { | ||||||
|                 return false; |                 Environment.Exit(0); | ||||||
|  |                 return; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|         if (!AppHandler.Instance.InitApp()) |  | ||||||
|         { |  | ||||||
|             return false; |  | ||||||
|         } |  | ||||||
|         return true; |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // Avalonia configuration, don't remove; also used by visual designer. |     // Avalonia configuration, don't remove; also used by visual designer. | ||||||
|     public static AppBuilder BuildAvaloniaApp() |     public static AppBuilder BuildAvaloniaApp() | ||||||
|     { |     => AppBuilder.Configure<App>() | ||||||
|         return AppBuilder.Configure<App>() |         .UsePlatformDetect() | ||||||
|             .UsePlatformDetect() |         //.WithInterFont() | ||||||
|             //.WithInterFont() |         .WithFontByDefault() | ||||||
|             .WithFontByDefault() |         .LogToTrace() | ||||||
|             .LogToTrace() |         .UseReactiveUI() | ||||||
| #if OS_OSX |         .With(new MacOSPlatformOptions { ShowInDock = false }); | ||||||
|             .UseReactiveUI() |  | ||||||
|             .With(new MacOSPlatformOptions { ShowInDock = AppHandler.Instance.Config.UiItem.MacOSShowInDock }); |  | ||||||
| #else |  | ||||||
|             .UseReactiveUI(); |  | ||||||
| #endif |  | ||||||
|     } |  | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue