Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit dcfbac8

Browse files
committed
Finish mac support
We were missing the filesystem watcher library port for macOS, this adds it.
1 parent 793f493 commit dcfbac8

File tree

14 files changed

+40
-22
lines changed

14 files changed

+40
-22
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
*.exe filter=lfs diff=lfs merge=lfs -text
1111
*.meta -text
1212
*.asset -text
13-
*.unity -text
13+
*.unity -text
14+
*.bundle filter=lfs diff=lfs merge=lfs -text

lib/sfw.net/Debug/sfw.net.dll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:551ba5aa30ed990e3e9754d70ead24abcaf4ac001dceb6706221de7a48c8529a
3-
size 7680
2+
oid sha256:5af748ffa894e48094e63a88770fa0f1c51eaee855f13f1aa308860af44ef30d
3+
size 7168

lib/sfw.net/Debug/sfw.net.dll.mdb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:23235b5737c749c7121fd786a969fb414dfd3820088fb0776415a4fee6f5a503
3-
size 2017
2+
oid sha256:084fa4ce690843a8c4cad6ca7b1506fc3c24cfea929b3e47eff19f099e31e322
3+
size 1924

lib/sfw.net/Release/sfw.net.dll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:5507d90f6a9477d0422a2d7f8d269c109a8b061c3e5a32a9c820cedab3679c75
2+
oid sha256:5af748ffa894e48094e63a88770fa0f1c51eaee855f13f1aa308860af44ef30d
33
size 7168

lib/sfw.net/Release/sfw.net.dll.mdb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:731efe4fa6ad106a1388caed09c3b8b1252fb3695b6e863f94e469efa16e3f9c
3-
size 1819
2+
oid sha256:084fa4ce690843a8c4cad6ca7b1506fc3c24cfea929b3e47eff19f099e31e322
3+
size 1924

lib/sfw.net/mac/libsfw.bundle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:a57ab1f8b0ddafdf387cc92bb7781d0a4326e66a55468e0ce8c45e6df1222c22
3+
size 104072

src/GitHub.Api/Events/RepositoryWatcher.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,22 @@ public RepositoryWatcher(IPlatform platform, RepositoryPathConfiguration paths,
5959
};
6060

6161
pauseEvent = new ManualResetEventSlim();
62-
disableNative = !platform.Environment.IsWindows;
62+
//disableNative = !platform.Environment.IsWindows;
6363
}
6464

6565
public void Initialize()
6666
{
6767
var pathsRepositoryPath = paths.RepositoryPath.ToString();
68-
Logger.Trace("Watching Path: \"{0}\"", pathsRepositoryPath);
6968

70-
if (!disableNative)
71-
nativeInterface = new NativeInterface(pathsRepositoryPath);
69+
try
70+
{
71+
if (!disableNative)
72+
nativeInterface = new NativeInterface(pathsRepositoryPath);
73+
}
74+
catch (Exception ex)
75+
{
76+
Logger.Error(ex);
77+
}
7278
}
7379

7480
public void Start()
@@ -85,6 +91,8 @@ public void Start()
8591
throw new InvalidOperationException("NativeInterface is null");
8692
}
8793

94+
Logger.Trace("Watching Path: \"{0}\"", paths.RepositoryPath.ToString());
95+
8896
running = true;
8997
pauseEvent.Reset();
9098
task = Task.Factory.StartNew(WatcherLoop, cancellationToken, TaskCreationOptions.None, TaskScheduler.Default);

src/UnityExtension/Assets/Editor/GitHub.Unity/GitHub.Unity.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126
</ProjectReference>
127127
</ItemGroup>
128128
<ItemGroup>
129-
<!-- Content Include="$(SolutionDir)\lib\sfw.net\osx\libsfw.dylib">
129+
<Content Include="$(SolutionDir)\lib\sfw.net\mac\libsfw.bundle">
130130
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
131-
</Content -->
131+
</Content>
132132
<Content Include="$(SolutionDir)\lib\sfw.net\win\x86\$(BuildConfig)\sfw_x86.dll">
133133
<Link>x86\sfw_x86.dll</Link>
134134
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

src/packaging/CopyLibrariesToDevelopmentFolder/CopyLibrariesToDevelopmentFolder.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
<Compile Include="Class1.cs" />
5555
</ItemGroup>
5656
<ItemGroup>
57-
<!-- Content Include="$(SolutionDir)\lib\sfw.net\osx\libsfw.dylib">
57+
<Content Include="$(SolutionDir)\lib\sfw.net\mac\libsfw.bundle">
5858
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
59-
</Content -->
59+
</Content>
6060
<Content Include="$(SolutionDir)\lib\sfw.net\win\x64\$(Configuration)\sfw_x64.dll">
6161
<Link>x64\sfw_x64.dll</Link>
6262
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

src/packaging/CopyLibrariesToPackageProject/CopyLibrariesToPackageProject.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
<None Include="packages.config" />
7272
</ItemGroup>
7373
<ItemGroup>
74-
<!-- Content Include="$(SolutionDir)\lib\sfw.net\osx\libsfw.dylib">
74+
<Content Include="$(SolutionDir)\lib\sfw.net\mac\libsfw.bundle">
7575
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
76-
</Content -->
76+
</Content>
7777
<Content Include="$(SolutionDir)\lib\sfw.net\win\x86\$(BuildConfiguration)\sfw_x86.dll">
7878
<Link>x86\sfw_x86.dll</Link>
7979
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

0 commit comments

Comments
 (0)