mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
fix<MacOS>: wrong path to find Terminal.app; GitInstallDir ends to the folder that contains bin/git; way to open and select file in Finder
This commit is contained in:
parent
5ac7d78796
commit
d74a3fb550
4 changed files with 7 additions and 4 deletions
3
src/BuildMacOS.command
Normal file
3
src/BuildMacOS.command
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
dotnet publish -c Release -r osx-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
|
@ -6,7 +6,7 @@ namespace SourceGit.Native {
|
||||||
[SupportedOSPlatform("macOS")]
|
[SupportedOSPlatform("macOS")]
|
||||||
internal class MacOS : OS.IBackend {
|
internal class MacOS : OS.IBackend {
|
||||||
public string FindGitInstallDir() {
|
public string FindGitInstallDir() {
|
||||||
if (File.Exists("/usr/bin/git")) return "/usr/bin/git";
|
if (File.Exists("/usr/bin/git")) return "/usr";
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace SourceGit.Native {
|
||||||
if (Directory.Exists(path)) {
|
if (Directory.Exists(path)) {
|
||||||
Process.Start("open", path);
|
Process.Start("open", path);
|
||||||
} else if (File.Exists(path)) {
|
} else if (File.Exists(path)) {
|
||||||
Process.Start("open", $"\"{path}\" -a Finder");
|
Process.Start("open", $"\"{path}\" -R");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
Background="{DynamicResource Brush.Contents}"
|
Background="{DynamicResource Brush.Contents}"
|
||||||
ItemsSource="{Binding Commits}"
|
ItemsSource="{Binding Commits}"
|
||||||
SelectionMode="Extended"
|
SelectionMode="Extended"
|
||||||
SelectedItem="{Binding AutoSelectedCommit}"
|
SelectedItem="{Binding AutoSelectedCommit, Mode=OneWay}"
|
||||||
CanUserReorderColumns="False"
|
CanUserReorderColumns="False"
|
||||||
CanUserResizeColumns="False"
|
CanUserResizeColumns="False"
|
||||||
CanUserSortColumns="False"
|
CanUserSortColumns="False"
|
||||||
|
|
|
@ -74,7 +74,7 @@ namespace SourceGit.Views {
|
||||||
if (DefaultUser != oldUser) cmd.Set("user.name", DefaultUser);
|
if (DefaultUser != oldUser) cmd.Set("user.name", DefaultUser);
|
||||||
if (DefaultEmail != oldEmail) cmd.Set("user.email", DefaultEmail);
|
if (DefaultEmail != oldEmail) cmd.Set("user.email", DefaultEmail);
|
||||||
if (GPGUserKey != oldGPGSignKey) cmd.Set("user.signingkey", GPGUserKey);
|
if (GPGUserKey != oldGPGSignKey) cmd.Set("user.signingkey", GPGUserKey);
|
||||||
if (CRLFMode.Value != oldCRLF) cmd.Set("core.autocrlf", CRLFMode.Value);
|
if (CRLFMode != null && CRLFMode.Value != oldCRLF) cmd.Set("core.autocrlf", CRLFMode.Value);
|
||||||
if (EnableGPGSigning != (oldGPGSignEnable == "true")) cmd.Set("commit.gpgsign", EnableGPGSigning ? "true" : "false");
|
if (EnableGPGSigning != (oldGPGSignEnable == "true")) cmd.Set("commit.gpgsign", EnableGPGSigning ? "true" : "false");
|
||||||
if (GPGExecutableFile != oldGPGExec) cmd.Set("gpg.program", GPGExecutableFile);
|
if (GPGExecutableFile != oldGPGExec) cmd.Set("gpg.program", GPGExecutableFile);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue