Skip to content

Commit

Permalink
fuck this fucking snap again
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilLord666 committed Mar 5, 2024
1 parent becd543 commit 0f79246
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
14 changes: 3 additions & 11 deletions app/Wissance.Zerial/Wissance.Zerial.Desktop/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,8 @@ class Program
[STAThread]
public static void Main(string[] args)
{
string env = args.FirstOrDefault(a => a.Contains(EnvironmentKey));
Environment = OtherEnvironmentKey;
if (env != null)
{
string[] parts = env.Split("=");
if (parts.Length == 2)
{
Environment = parts[1].ToLower() == SnapEnvironmentKey ? SnapEnvironmentKey : OtherEnvironmentKey;
}
}
string snapEnv = args.FirstOrDefault(a => a.Contains("snap"));
Environment = snapEnv != null ? SnapEnvironmentKey : OtherEnvironmentKey;

BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
Expand All @@ -39,5 +31,5 @@ public static AppBuilder BuildAvaloniaApp()

public const string SnapEnvironmentKey = "snap";
public const string OtherEnvironmentKey = "other";
private const string EnvironmentKey = "environment";
//private const string EnvironmentKey = "environment";
}
6 changes: 5 additions & 1 deletion snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ description: |
base: core22

architectures:
- build-on: [amd64]
build-for: [amd64]

confinement: strict

parts:
Expand Down Expand Up @@ -34,4 +38,4 @@ apps:
plugs:
- desktop
- desktop-legacy
command: ./Wissance.Zerial.Desktop --environment=snap
command: ./Wissance.Zerial.Desktop --snap

0 comments on commit 0f79246

Please sign in to comment.