Skip to content

Commit

Permalink
Fix macos kinda
Browse files Browse the repository at this point in the history
  • Loading branch information
VasilisThePikachu committed Jul 26, 2024
1 parent e135cba commit 0682c24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
5 changes: 3 additions & 2 deletions SS14.Launcher/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
Expand Down Expand Up @@ -38,13 +39,13 @@ public App(OverrideAssetsManager overrideAssets)
UrlsOpened += OnOSXUrlsOpened;
}

private void OnOSXUrlsOpened(object? sender, UrlOpenedEventArgs e)
public void OnOSXUrlsOpened(object? sender, UrlOpenedEventArgs e)
{
// I think this only works on macOS anyway? Well i will leave this here just so I don't surprise myself later.
if (!OperatingSystem.IsMacOS())
return;

Log.Debug($"MacOS launch arg is {e.Urls}. Doing nothing since i did not implement this yet lol");
Log.Debug($"MacOS launch arg is {e.Urls.FirstOrDefault()}. Doing nothing since i did not implement this yet lol");
}

public override void Initialize()
Expand Down
9 changes: 1 addition & 8 deletions SS14.Launcher/ProtocolSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,13 @@ public static void RegisterProtocol()
if (OperatingSystem.IsMacOS())
{
// Yeah you cant get this to work on dev builds
//todo macos protocol pass params
#if !FULL_RELEASE
return;
#endif
var path = $"{AppDomain.CurrentDomain.BaseDirectory}";

Check warning on line 72 in SS14.Launcher/ProtocolSetup.cs

View workflow job for this annotation

GitHub Actions / build

Unreachable code detected

// > be me
// > write protocol registration code
// > application runs in some wierd sandbox folder
// > :despair:
// > find out its about that its cause the user needs to move the app to the applications folder...
// > ... or any "suitable" folder...
// tldr user needs to move the app manually to get this sandbox restriction lifted. This can be done by
// making one of those installer dmg stuff
// making one of those installer dmg stuff... for now lets just stop
if (path.Contains("AppTranslocation"))
{
Log.Error("I have been put in apple jail... move me to your application folder");
Expand Down

0 comments on commit 0682c24

Please sign in to comment.