5 Commits

Author SHA1 Message Date
9063896923 [v1.1.0] Add OSX binaries.
Some checks failed
Build / build (push) Failing after 3m11s
2024-04-06 16:47:03 +03:00
378e85492c Add export to variables.
All checks were successful
Build / build (push) Successful in 1m39s
2024-04-04 23:34:38 +03:00
6367996b66 Fix permissions.
All checks were successful
Build / build (push) Successful in 31s
2024-04-04 23:30:40 +03:00
c12a65133b Create CI build.
Some checks failed
Build / build (push) Failing after 10s
2024-04-04 23:27:03 +03:00
42e908aeea Add dependencies. 2024-04-04 23:14:45 +03:00
8 changed files with 86 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
name: Build
run-name: Build Quik.FreeType on Docker.
on:
workflow_dispatch:
push:
branches: [master, stable]
jobs:
build:
runs-on: ubuntu-latest
container:
image: git.mixedup.dev/quik/docker-cross-compiler
env:
QUIK_API_KEY: "${{secrets.QUIK_API_KEY}}"
volumes:
- ${{ gitea.workspace }}:/home/quik/src
steps:
- name: Check repository out.
uses: actions/checkout@v3
with:
submodules: recursive
- name: Run Build Script
run: "./build_native.sh"
- name: Publish Package
run: "Quik.Common/sh/publish.sh ."

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[submodule "freetype"]
path = freetype
url = https://git.mixedup.dev/QUIK/freetype.git
[submodule "Quik.Common"]
path = Quik.Common
url = https://git.mixedup.dev/QUIK/Quik.Common.git

3
FT.cs
View File

@@ -17,7 +17,8 @@ namespace Quik.FreeType
"runtimes/linux-arm/native/libfreetype.so",
"runtimes/linux-arm64/native/libfreetype.so",
"runtimes/linux-x64/native/libfreetype.so",
"runtimes/native/libfreetype.dylib",
"runtimes/osx-arm64/libfreetype.dylib",
"runtimes/osx-x64/libfreetype.dylib",
"libfreetype.dll",
"libfreetype.so",
"libfreetype.dylib",

1
Quik.Common Submodule

Submodule Quik.Common added at fdfac9d951

View File

@@ -4,14 +4,14 @@
<TargetFramework>net6.0</TargetFramework>
<LangVersion>7.3</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RuntimeIdentifiers>linux-arm;linux-arm64;linux-x64;win-x86;win-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>linux-arm;linux-arm64;linux-x64;win-x86;win-x64;osx-arm64;osx-x64</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup>
<!-- Nuget Properties. -->
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Quik.FreeType</PackageId>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<Authors>FreeType Authors, H. Utku Maden</Authors>
<Description>
A C# wrapper for the FreeType font loading library.

25
Quik.FreeType.sln Normal file
View File

@@ -0,0 +1,25 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quik.FreeType", "Quik.FreeType.csproj", "{A19CFEF1-19F1-41DD-A784-29AEE6072315}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A19CFEF1-19F1-41DD-A784-29AEE6072315}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A19CFEF1-19F1-41DD-A784-29AEE6072315}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A19CFEF1-19F1-41DD-A784-29AEE6072315}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A19CFEF1-19F1-41DD-A784-29AEE6072315}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F64EFC25-A7C1-4A63-8068-D5626B24871F}
EndGlobalSection
EndGlobal

28
build_native.sh Normal file → Executable file
View File

@@ -1,8 +1,28 @@
#!/bin/bash
cd $(dirname "$0")
# Apply the patch file that makes it easier to build freetype.
# Note that this doesn't work all that well on windows.
cat ../lib/freetype_patch.diff | git -C ../lib/freetype apply
export CMAKE_DIR="$PWD/Quik.Common/cmake"
export NOINSTALL=1
export QUIK_ADDITIONAL_CMAKE="-D BUILD_SHARED_LIBS=true -D NO_SONAME=true"
QUIK_ADDITIONAL_CMAKE=-DBUILD_SHARED_LIBS\=true DST=$PWD ../sh/quik_build_native.sh ../lib/freetype
./Quik.Common/sh/quik_build_native.sh "$PWD/freetype"
# Copy out natives from their respective directories into runtimes
mkdir -p \
./runtimes/linux-arm/native \
./runtimes/linux-arm64/native \
./runtimes/linux-x64/native \
./runtimes/win-x64/native \
./runtimes/win-x86/native \
./runtimes/osx-arm64 \
./runtimes/osx-x64
cp ./out/linux-arm/libfreetype.so runtimes/linux-arm/native/libfreetype.so
cp ./out/linux-arm64/libfreetype.so runtimes/linux-arm64/native/libfreetype.so
cp ./out/linux-x64/libfreetype.so runtimes/linux-x64/native/libfreetype.so
cp ./out/win-x64/libfreetype.dll runtimes/win-x64/native/libfreetype.dll
cp ./out/win-x86/libfreetype.dll runtimes/win-x86/native/libfreetype.dll
cp ./out/osx-arm64/libfreetype.dylib runtimes/osx-arm64/native/libfreetype.dylib
cp ./out/osx-x64/libfreetype.dylib runtimes/osx-x64/native/libfreetype.dylib
dotnet build

1
freetype Submodule

Submodule freetype added at 54f85c888d