Skip to content

Commit 96d29e5

Browse files
committed
Normalize args; fixes
1 parent 07d2d09 commit 96d29e5

File tree

5 files changed

+10
-21
lines changed

5 files changed

+10
-21
lines changed

SmartImage.Lib/Utilities/Integration/BaseOSIntegration.cs

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Date: 2024/12/05 @ 21:12:49
33

44
using System.Diagnostics;
5-
using System.Runtime.Versioning;
65
using Novus.OS;
76

87
// ReSharper disable InconsistentNaming
@@ -46,10 +45,10 @@ static BaseOSIntegration()
4645
Executable = GetProcessMainModuleFileName();
4746
ExecutableDirectory = Path.GetDirectoryName(Executable);
4847

49-
if (IsWindows) {
48+
if (FileSystem.IsWindows) {
5049
Integration = new WindowsOSIntegration();
5150
}
52-
else if (IsLinux) {
51+
else if (FileSystem.IsLinux) {
5352
Integration = new LinuxOSIntegration();
5453
}
5554
else {
@@ -60,29 +59,19 @@ static BaseOSIntegration()
6059

6160
#region
6261

63-
internal const string OS_WIN = "windows";
64-
65-
internal const string OS_LINUX = "linux";
66-
6762
public const int EC_ERROR = -1;
6863

6964
public const int EC_OK = 0;
7065

71-
[SupportedOSPlatformGuard(OS_LINUX)]
72-
public static readonly bool IsLinux = OperatingSystem.IsLinux();
73-
74-
[SupportedOSPlatformGuard(OS_WIN)]
75-
public static readonly bool IsWindows = OperatingSystem.IsWindows();
76-
7766

7867
public static BaseOSIntegration Integration { get; }
7968

80-
public static string ExecutableDirectory { get; }
69+
public static string ExecutableDirectory {get;}
8170

8271
public static bool IsExecutableInPath
8372
=> FileSystem.IsFolderInPath(ExecutableDirectory);
8473

85-
public static string Executable { get; }
74+
public static string Executable {get;}
8675

8776
#endregion
8877

SmartImage.Lib/Utilities/Integration/LinuxOSIntegration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace SmartImage.Lib.Utilities.Integration;
1111

12-
[SupportedOSPlatform(OS_LINUX)]
12+
[SupportedOSPlatform(FileSystem.OS_LINUX)]
1313
public sealed class LinuxOSIntegration : BaseOSIntegration
1414
{
1515

SmartImage.Lib/Utilities/Integration/WindowsOSIntegration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace SmartImage.Lib.Utilities.Integration;
1515

16-
[SupportedOSPlatform(OS_WIN)]
16+
[SupportedOSPlatform(FileSystem.OS_WIN)]
1717
public sealed class WindowsOSIntegration : BaseOSIntegration
1818
{
1919

SmartImage.UI/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SmartImage.UI/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
<value>Resources\accept.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123123
</data>
124124
<data name="Arg_AutoSearch" xml:space="preserve">
125-
<value>-auto</value>
125+
<value>-a</value>
126126
</data>
127127
<data name="Arg_Hide" xml:space="preserve">
128128
<value>-h</value>
@@ -152,6 +152,6 @@
152152
<value>Resources\picture_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
153153
</data>
154154
<data name="Reg_Launch_Args" xml:space="preserve">
155-
<value>-i "%1" -auto</value>
155+
<value>-i "%1" -a</value>
156156
</data>
157157
</root>

0 commit comments

Comments
 (0)