-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from gluschenko/cross-platform-part2
Cross-platfrom #2
- Loading branch information
Showing
43 changed files
with
372 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
libcld2.so | ||
libcld2.dll | ||
libcld2.arm64.dylib | ||
libcld2.x86_64.dylib | ||
build_temp/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/LanguageIdentification.CLD2/LanguageIdentification.CLD2.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
libcld3.so | ||
libcld3.dll | ||
libcld3.dylib | ||
libcld3.arm64.dylib | ||
libcld3.x86_64.dylib | ||
build_temp/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/LanguageIdentification.CLD3/LanguageIdentification.CLD3.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/LanguageIdentification.FastText/LanguageIdentification.FastText.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
liblingua.so | ||
liblingua.arm64.dylib | ||
lingua.dll | ||
build_temp/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/LanguageIdentification.Lingua.Native/Scripts/run-build.macos.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ -z "$1" ]; then | ||
echo "Error: No architecture specified." | ||
echo "Usage: $0 <arch>" | ||
exit 1 | ||
fi | ||
|
||
ARCH=$1 | ||
|
||
if [[ "$ARCH" != "x86_64" && "$ARCH" != "arm64" ]]; then | ||
echo "Error: Invalid architecture specified. Use 'x86_64' or 'arm64'." | ||
exit 1 | ||
fi | ||
|
||
echo "Hello world $ARCH"; | ||
|
||
brew install llvm | ||
|
||
workspace="build_temp" | ||
|
||
mkdir "$workspace" -p | ||
cp -a Native/lingua-ffi/. $workspace/. | ||
|
||
ls -R . | ||
|
||
cd "$workspace" | ||
|
||
echo "Build for MacOS on $ARCH"; | ||
cargo build --release | ||
|
||
ls -R | ||
|
||
cd ./target/release | ||
otool -L liblingua.dylib | ||
cp liblingua.dylib ../../../liblingua.$ARCH.dylib | ||
|
||
# Clean up | ||
rm -rf "$workspace" | ||
echo "Goodbye world"; |
27 changes: 27 additions & 0 deletions
27
src/LanguageIdentification.Lingua.Native/Scripts/run-build.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# PowerShell equivalent script | ||
# Ensure script stops if any command fails | ||
$ErrorActionPreference = "Stop" | ||
|
||
Write-Output "Hello world" | ||
|
||
$workspace = "build_temp" | ||
|
||
# Copy directories | ||
Copy-Item -Path "Native\lingua-ffi\." -Destination $workspace -Recurse -Force | ||
|
||
# List directory contents recursively | ||
Get-ChildItem -Recurse -Path . | ||
|
||
Set-Location $workspace | ||
|
||
# Build for Windows | ||
cargo build --release | ||
|
||
# List directory contents recursively | ||
Get-ChildItem -Recurse -Path . | ||
|
||
# Display shared library dependencies | ||
Copy-Item -Path ".\target\release\lingua.dll" -Destination "..\lingua.dll" | ||
|
||
# Clean up | ||
Write-Output "Goodbye world" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.