Skip to content

Commit c990a35

Browse files
committed
feat(Core): add windowList support to macOS
1 parent cfdf192 commit c990a35

8 files changed

Lines changed: 632 additions & 302 deletions

File tree

SnapX.Core/OSX.props

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,21 @@
22
<Target Name="CargoBuild" BeforeTargets="BeforeBuild" Condition="'$(nocargobuild)' == ''">
33
<Message Text="Compiling Rust intermediary library..." Importance="High" />
44
<PropertyGroup>
5-
<RustLibName>libsnapxrust.dylib</RustLibName>
5+
<!-- Since snapxrust is written in a completely different programming language, this props file can also be ran on Linux for development -->
6+
<RustLibName Condition="'$(TargetMacOS)' == 'true'">libsnapxrust.dylib</RustLibName>
7+
<RustLibName Condition="'$(TargetLinux)' == 'true'">libsnapxrust.so</RustLibName>
8+
<RustLibName Condition="'$(TargetWindows)' == 'true'">snapxrust.dll</RustLibName>
9+
<RustDir>ScreenCapture/Rust</RustDir>
10+
<RustConfig>release</RustConfig>
11+
<RustLibSource>$(RustDir)/target/$(RustConfig)/$(RustLibName)</RustLibSource>
612
</PropertyGroup>
7-
<Exec Command="cd ScreenCapture/Rust &amp;&amp; cargo build --release" />
13+
<Exec Command="cd $(RustDir) &amp;&amp; cargo build --$(RustConfig)" />
14+
<ItemGroup>
15+
<None Include="$(RustLibSource)">
16+
<Link>$(RustLibName)</Link>
17+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
18+
</None>
19+
</ItemGroup>
820
</Target>
921
<ItemGroup Condition="$(DisableOCR) != '1'">
1022
<PackageReference Include="Sdcb.OpenCvSharp4.mini.runtime.osx-x64" Version="$(OpenCvSharp4Version)" />

SnapX.Core/ScreenCapture/Rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SnapX.Core/ScreenCapture/Rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "snapxrust"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
edition = "2021"
55
build = "build.rs"
66

0 commit comments

Comments
 (0)