15 Commits

Author SHA1 Message Date
db07a2daff Modify build script.
All checks were successful
Build / build (push) Successful in 38s
2024-06-20 15:04:39 +03:00
166839eb8a Add execute flag to publish.sh
All checks were successful
Build / build (push) Successful in 2m18s
2024-06-20 13:05:32 +03:00
5b55dbb64e Update docker-cross-compiler.
Some checks failed
Build / build (push) Failing after 2m17s
2024-06-20 12:58:42 +03:00
1c5f73ceb8 Fix build script.
Some checks failed
Build / build (push) Failing after 7s
2024-06-20 12:46:07 +03:00
dfd585c939 Fix URI for freetype. 2024-06-20 12:42:19 +03:00
a0ddeefe76 Add docker cross compiler module. 2024-06-20 12:41:16 +03:00
3eeb41c1c9 Rename project and namespace. 2024-06-20 12:39:15 +03:00
ed462e05e1 Remove Quik.Common submodule. 2024-06-20 11:30:17 +03:00
8d6aa89c5e Update workflow and add publish script. 2024-06-20 11:29:45 +03:00
themixedupstuff
3e687d3c75 Only make pushes to stable build. 2024-04-06 15:52:44 +02:00
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
14 changed files with 125 additions and 14 deletions

View File

@@ -0,0 +1,28 @@
name: Build
run-name: Build ReFuel.FreeType on Docker.
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
container:
image: git.mixedup.dev/refuel/docker-cross-compiler
env:
REFUEL_API_KEY: "${{secrets.REFUEL_API_KEY}}"
NUGET_USER_NAME: "${{vars.NUGET_USER_NAME}}"
NUGET_INDEX: "${{vars.NUGET_INDEX}}"
volumes:
- ${{ gitea.workspace }}:/home/refuel/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: "./publish.sh ."

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[submodule "freetype"]
path = freetype
url = https://git.mixedup.dev/ReFuel/freetype.git
[submodule "docker-cross-compiler"]
path = docker-cross-compiler
url = https://git.mixedup.dev/ReFuel/docker-cross-compiler

5
FT.cs
View File

@@ -2,7 +2,7 @@ using System;
using System.Reflection;
using System.Runtime.InteropServices;
namespace Quik.FreeType
namespace ReFuel.FreeType
{
public static class FT
{
@@ -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",

View File

@@ -1,4 +1,4 @@
namespace Quik.FreeType
namespace ReFuel.FreeType
{
public enum FTError : int
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Quik.FreeType
namespace ReFuel.FreeType
{
[Flags]
public enum FTLoadFlags

View File

@@ -1,4 +1,4 @@
namespace Quik.FreeType
namespace ReFuel.FreeType
{
public enum FTRenderMode
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Quik.FreeType
namespace ReFuel.FreeType
{
[Flags]
public enum FaceFlag : int

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>
<PackageId>ReFuel.FreeType</PackageId>
<Version>0.1.0-rc.1</Version>
<Authors>FreeType Authors, H. Utku Maden</Authors>
<Description>
A C# wrapper for the FreeType font loading library.

22
ReFuel.FreeType.sln Normal file
View File

@@ -0,0 +1,22 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReFuel.FreeType", "ReFuel.FreeType.csproj", "{983377DF-BE92-42A5-A1B7-C2E1D5F3AAF2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{983377DF-BE92-42A5-A1B7-C2E1D5F3AAF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{983377DF-BE92-42A5-A1B7-C2E1D5F3AAF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{983377DF-BE92-42A5-A1B7-C2E1D5F3AAF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{983377DF-BE92-42A5-A1B7-C2E1D5F3AAF2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
// Disable unused warnings for native types.
#pragma warning disable CS0649
namespace Quik.FreeType
namespace ReFuel.FreeType
{
public struct FTLibrary
{

33
build_native.sh Normal file → Executable file
View File

@@ -1,8 +1,33 @@
#!/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/docker-cross-compiler/cmake"
export NOINSTALL=1
export REFUEL_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
# Clang Builds
./docker-cross-compiler/sh/build_native.sh "$PWD" "osx-arm64 osx-x64"
# GCC Builds
export REFUEL_ADDITIONAL_CMAKE="$REFUEL_ADDITIONAL_CMAKE -D CMAKE_CXX_FLAGS=\"-static-libgcc -static-libstdc++ -fno-exceptions\""
./docker-cross-compiler/sh/build_native.sh "$PWD" "linux-arm linux-arm64 linux-x64 win-x64 win-x86"
# 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
docker-cross-compiler Submodule

Submodule docker-cross-compiler added at 518969e2c9

1
freetype Submodule

Submodule freetype added at 54f85c888d

27
publish.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
cd $(dirname "$0")
if [ -z "$REFUEL_API_KEY" ]
then
echo "Please define REFUEL_API_KEY"
exit 1
fi
if [ -z "$NUGET_USER_NAME" ]
then
echo "Please define NUGET_USER_NAME"
exit 1
fi
if [ -z "$NUGET_INDEX" ]
then
echo "Please define NUGET_INDEX"
exit 1
fi
dotnet nuget add source \
-n ReFuel -u "$NUGET_USER_NAME" -p "$REFUEL_API_KEY" \
--store-password-in-clear-text \
"$NUGET_INDEX"
dotnet nuget push -s ReFuel bin/*/*.nupkg