Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	BeatSaberModManager/Services/Implementations/ProtocolHandlerRegistrars/LinuxProtocolHandlerRegistrar.cs
  • Loading branch information
affederaffe committed Nov 13, 2023
2 parents 0eadaee + 37759dd commit 5724ed6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ jobs:
dotnet-version: "8.0.x"

- name: Build Self Contained
run: dotnet publish ./BeatSaberModManager/BeatSaberModManager.csproj -c Release -r win10-x64 --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true
run: dotnet publish ./BeatSaberModManager/BeatSaberModManager.csproj -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: BeatSaberModManager-win-x64-self-contained
path: BeatSaberModManager/bin/Release/win10-x64/publish/BeatSaberModManager.exe

- name: Build Framework Dependent
run: dotnet publish ./BeatSaberModManager/BeatSaberModManager.csproj -c Release -r win10-x64 --no-self-contained -p:PublishSingleFile=true
run: dotnet publish ./BeatSaberModManager/BeatSaberModManager.csproj -c Release -r win-x64 --no-self-contained -p:PublishSingleFile=true
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public bool IsProtocolHandlerRegistered(string protocol)
using StreamReader streamReader = new(fileStream);
while (streamReader.ReadLine() is { } line)
{
if (line.StartsWith($"Exec={Environment.ProcessPath}", StringComparison.Ordinal))
if (line.StartsWith($"Exec={Program.Product}", StringComparison.Ordinal))
return true;
}

Expand Down Expand Up @@ -68,17 +68,15 @@ public void UnregisterProtocolHandler(string protocol)
private static string GetHandlerNameForProtocol(string protocol) => $"{Program.Product}-url-{protocol}.desktop";

private static string GetDesktopFileContent(string protocol) =>
$"""
[Desktop Entry]
Name={Program.Product}
Comment=URL:{protocol} Protocol
Type=Application
Categories=Utility
Exec={Environment.ProcessPath} --install %u
Terminal=false
NoDisplay=true
MimeType=x-scheme-handler/{protocol}
""";
@$"[Desktop Entry]
Name={Program.Product}
Comment=URL:{protocol} Protocol
Type=Application
Categories=Utility
Exec={Program.Product} --install %u
Terminal=false
NoDisplay=true
MimeType=x-scheme-handler/{protocol}
";
}
}

0 comments on commit 5724ed6

Please sign in to comment.