New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protogen osx #163

wants to merge 3 commits into
base: master
Jump to file or symbol
Failed to load files and symbols.
+26 −0
Diff settings


Just for now

Viewing a subset of changes. View all

If on Unix, run either "/usr/local/bin/protoc" or "/usr/bin/protoc" i…

…n stead of the Windows binary.
  • Loading branch information...
Emil "AngryAnt" Johansen
Emil "AngryAnt" Johansen committed Jun 13, 2016
commit dac0d5fe23b431b74e6a4e44380504280271bf30
@@ -54,8 +54,34 @@ public static string CombinePathFromAppRoot(string path)
return Path.Combine(Path.GetDirectoryName(loaderPath), path);
public static bool IsUnix
int p = (int)System.Environment.OSVersion.Platform;
return (p == 4 || p == 6 || p == 128);
public static string GetProtocPath(out string folder)
if (IsUnix)
const string
kLocalLocation = "/usr/local/bin/protoc",
kGlobalLocation = "/usr/bin/protoc";
folder = null;
if (File.Exists (kLocalLocation))
return kLocalLocation;
return kGlobalLocation;
const string Name = "protoc.exe";
string lazyPath = InputFileLoader.CombinePathFromAppRoot(Name);
if (File.Exists(lazyPath))
ProTip! Use n and p to navigate between commits in a pull request.