Compare commits
No commits in common. "master" and "stable" have entirely different histories.
@ -1,22 +1,19 @@
|
||||
name: Build
|
||||
run-name: Build ReFuel.FreeType on Docker.
|
||||
run-name: Build Quik.FreeType on Docker.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
branches: [master, stable]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.mixedup.dev/refuel/docker-cross-compiler
|
||||
image: git.mixedup.dev/quik/docker-cross-compiler
|
||||
env:
|
||||
REFUEL_API_KEY: "${{secrets.REFUEL_API_KEY}}"
|
||||
NUGET_USER_NAME: "${{vars.NUGET_USER_NAME}}"
|
||||
NUGET_INDEX: "${{vars.NUGET_INDEX}}"
|
||||
QUIK_API_KEY: "${{secrets.QUIK_API_KEY}}"
|
||||
volumes:
|
||||
- ${{ gitea.workspace }}:/home/refuel/src
|
||||
- ${{ gitea.workspace }}:/home/quik/src
|
||||
steps:
|
||||
- name: Check repository out.
|
||||
uses: actions/checkout@v3
|
||||
@ -25,4 +22,4 @@ jobs:
|
||||
- name: Run Build Script
|
||||
run: "./build_native.sh"
|
||||
- name: Publish Package
|
||||
run: "./publish.sh ."
|
||||
run: "Quik.Common/sh/publish.sh ."
|
||||
|
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -1,6 +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
|
||||
url = https://git.mixedup.dev/QUIK/freetype.git
|
||||
[submodule "Quik.Common"]
|
||||
path = Quik.Common
|
||||
url = https://git.mixedup.dev/QUIK/Quik.Common.git
|
||||
|
2
FT.cs
2
FT.cs
@ -2,7 +2,7 @@ using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace ReFuel.FreeType
|
||||
namespace Quik.FreeType
|
||||
{
|
||||
public static class FT
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace ReFuel.FreeType
|
||||
namespace Quik.FreeType
|
||||
{
|
||||
public enum FTError : int
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace ReFuel.FreeType
|
||||
namespace Quik.FreeType
|
||||
{
|
||||
[Flags]
|
||||
public enum FTLoadFlags
|
||||
|
@ -1,4 +1,4 @@
|
||||
namespace ReFuel.FreeType
|
||||
namespace Quik.FreeType
|
||||
{
|
||||
public enum FTRenderMode
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace ReFuel.FreeType
|
||||
namespace Quik.FreeType
|
||||
{
|
||||
[Flags]
|
||||
public enum FaceFlag : int
|
||||
|
1
Quik.Common
Submodule
1
Quik.Common
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit fdfac9d95134fb5637bb2a9ec98ee11fe188230e
|
@ -10,8 +10,8 @@
|
||||
<PropertyGroup>
|
||||
<!-- Nuget Properties. -->
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<PackageId>ReFuel.FreeType</PackageId>
|
||||
<Version>0.1.0-rc.5</Version>
|
||||
<PackageId>Quik.FreeType</PackageId>
|
||||
<Version>1.1.0</Version>
|
||||
<Authors>FreeType Authors, H. Utku Maden</Authors>
|
||||
<Description>
|
||||
A C# wrapper for the FreeType font loading library.
|
@ -1,22 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
VisualStudioVersion = 17.5.002.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReFuel.FreeType", "ReFuel.FreeType.csproj", "{983377DF-BE92-42A5-A1B7-C2E1D5F3AAF2}"
|
||||
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(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
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F64EFC25-A7C1-4A63-8068-D5626B24871F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
115
Structures.cs
115
Structures.cs
@ -4,7 +4,7 @@ using System.Runtime.InteropServices;
|
||||
// Disable unused warnings for native types.
|
||||
#pragma warning disable CS0649
|
||||
|
||||
namespace ReFuel.FreeType
|
||||
namespace Quik.FreeType
|
||||
{
|
||||
public struct FTLibrary
|
||||
{
|
||||
@ -40,33 +40,32 @@ namespace ReFuel.FreeType
|
||||
public long YMax;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 248)]
|
||||
internal struct FTFaceInternal
|
||||
{
|
||||
[FieldOffset(0)] public long NumberOfFaces;
|
||||
[FieldOffset(8)] public long FaceIndex;
|
||||
[FieldOffset(16)] public long FaceFlags;
|
||||
[FieldOffset(24)] public long StyleFlags;
|
||||
[FieldOffset(32)] public long NumberOfGlyphs;
|
||||
[FieldOffset(40)] public IntPtr FamilyName;
|
||||
[FieldOffset(48)] public IntPtr StyleName;
|
||||
[FieldOffset(56)] public int NumberOfFixedSizes;
|
||||
[FieldOffset(64)] public IntPtr AvailableSizes;
|
||||
[FieldOffset(72)] public int NumberOfCharMaps;
|
||||
[FieldOffset(80)] public IntPtr Charmaps;
|
||||
[FieldOffset(88)] public FTGeneric Generic;
|
||||
[FieldOffset(104)] public FTBox BoundingBox;
|
||||
[FieldOffset(136)] public ushort UnitsPerEm;
|
||||
[FieldOffset(138)] public short Ascender;
|
||||
[FieldOffset(140)] public short Descender;
|
||||
[FieldOffset(142)] public short Height;
|
||||
[FieldOffset(144)] public short MaxAdvanceWidth;
|
||||
[FieldOffset(146)] public short MaxAdvanceHeight;
|
||||
[FieldOffset(148)] public short UnderlinePosition;
|
||||
[FieldOffset(150)] public short UnderlineThickness;
|
||||
[FieldOffset(152)] public FTGlyphSlot Glyph;
|
||||
[FieldOffset(160)] public IntPtr Size;
|
||||
[FieldOffset(168)] public IntPtr Charmap;
|
||||
public long NumberOfFaces;
|
||||
public long FaceIndex;
|
||||
public long FaceFlags;
|
||||
public long StyleFlags;
|
||||
public long NumberOfGlyphs;
|
||||
public IntPtr FamilyName;
|
||||
public IntPtr StyleName;
|
||||
public int NumberOfFixedSizes;
|
||||
public IntPtr AvailableSizes;
|
||||
public int NumberOfCharMaps;
|
||||
public IntPtr Charmaps;
|
||||
public FTGeneric Generic;
|
||||
public FTBox BoundingBox;
|
||||
public ushort UnitsPerEm;
|
||||
public short Ascender;
|
||||
public short Descender;
|
||||
public short Height;
|
||||
public short MaxAdvanceWidth;
|
||||
public short MaxAdvanceHeight;
|
||||
public short UnderlinePosition;
|
||||
public short UnderlineThickness;
|
||||
public FTGlyphSlot Glyph;
|
||||
public IntPtr Size;
|
||||
public IntPtr Charmap;
|
||||
|
||||
// Rest of the struct is private to implementation.
|
||||
}
|
||||
@ -83,54 +82,52 @@ namespace ReFuel.FreeType
|
||||
public long Y;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public struct FTBitmap
|
||||
{
|
||||
[FieldOffset(0)] public uint Rows;
|
||||
[FieldOffset(4)] public uint Width;
|
||||
[FieldOffset(8)] public int Pitch;
|
||||
[FieldOffset(16)] public IntPtr Buffer;
|
||||
[FieldOffset(24)] public ushort NumberOfGrays;
|
||||
[FieldOffset(26)] public byte PixelMode;
|
||||
[FieldOffset(27)] public byte PaletteMode;
|
||||
[FieldOffset(32)] public IntPtr Palette;
|
||||
public uint Rows;
|
||||
public uint Width;
|
||||
public int Pitch;
|
||||
public IntPtr Buffer;
|
||||
public ushort NumberOfGrays;
|
||||
public byte PixelMode;
|
||||
public byte PaletteMode;
|
||||
public IntPtr Palette;
|
||||
}
|
||||
|
||||
public struct FTOutline
|
||||
{
|
||||
public short NumberOfContours;
|
||||
public short NumberOfPoints;
|
||||
public short NumberOfPoints;
|
||||
public IntPtr Points;
|
||||
public IntPtr Tags;
|
||||
public IntPtr Contours;
|
||||
public int Flags;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 296)]
|
||||
internal struct FTGlyphSlotInternal
|
||||
{
|
||||
[FieldOffset(0)] public FTLibrary Library;
|
||||
[FieldOffset(8)] public FTFace Face;
|
||||
[FieldOffset(16)] public FTGlyphSlot Next;
|
||||
[FieldOffset(24)] public uint GlyphIndex;
|
||||
[FieldOffset(32)] public FTGeneric Generic;
|
||||
[FieldOffset(48)] public FTGlyphMetrics Metrics;
|
||||
[FieldOffset(112)] public int LinearHorizontalAdvance;
|
||||
[FieldOffset(116)] public int LinearVerticalAdvance;
|
||||
[FieldOffset(120)] public FTVector Advance;
|
||||
[FieldOffset(136)] public int Format;
|
||||
[FieldOffset(144)] public FTBitmap Bitmap;
|
||||
[FieldOffset(184)] public int BitmapLeft;
|
||||
[FieldOffset(188)] public int BitmapTop;
|
||||
[FieldOffset(192)] public FTOutline Outline;
|
||||
[FieldOffset(232)] public uint NumberOfSubGlyphs;
|
||||
[FieldOffset(240)] public IntPtr SubGlyphs;
|
||||
[FieldOffset(248)] public IntPtr ControlData;
|
||||
[FieldOffset(256)] public long ControlLength;
|
||||
[FieldOffset(264)] public long LsbDelta;
|
||||
[FieldOffset(272)] public long RsbDelta;
|
||||
[FieldOffset(280)] public IntPtr Other;
|
||||
[FieldOffset(288)] public IntPtr Internal;
|
||||
public FTLibrary Library;
|
||||
public FTFace Face;
|
||||
public FTGlyphSlot Next;
|
||||
public uint GlyphIndex;
|
||||
public FTGeneric Generic;
|
||||
public FTGlyphMetrics Metrics;
|
||||
public long LinearHorizontalAdvance;
|
||||
public long LinearVerticalAdvance;
|
||||
public FTVector Advance;
|
||||
public int Format;
|
||||
public FTBitmap Bitmap;
|
||||
public int BitmapLeft;
|
||||
public int BitmapTop;
|
||||
public FTOutline Outline;
|
||||
public uint NumberOfSubGlyphs;
|
||||
public IntPtr SubGlyphs;
|
||||
public IntPtr ControlData;
|
||||
public long ControlLength;
|
||||
public long LsbDelta;
|
||||
public long RsbDelta;
|
||||
public IntPtr Other;
|
||||
public IntPtr Internal;
|
||||
}
|
||||
|
||||
public unsafe struct FTGlyphSlot
|
||||
|
@ -1,16 +1,11 @@
|
||||
#!/bin/bash
|
||||
cd $(dirname "$0")
|
||||
|
||||
export CMAKE_DIR="$PWD/docker-cross-compiler/cmake"
|
||||
export CMAKE_DIR="$PWD/Quik.Common/cmake"
|
||||
export NOINSTALL=1
|
||||
export REFUEL_ADDITIONAL_CMAKE="-D BUILD_SHARED_LIBS=true -D NO_SONAME=true"
|
||||
export QUIK_ADDITIONAL_CMAKE="-D BUILD_SHARED_LIBS=true -D NO_SONAME=true"
|
||||
|
||||
# Clang Builds
|
||||
./docker-cross-compiler/sh/build_native.sh "$PWD/freetype" "osx-arm64 osx-x64"
|
||||
|
||||
# GCC Builds
|
||||
export REFUEL_ADDITIONAL_CMAKE="$REFUEL_ADDITIONAL_CMAKE -D COMPILE_OPTIONS=\"-static-libgcc;-static-libstdc++;-fno-exceptions\""
|
||||
./docker-cross-compiler/sh/build_native.sh "$PWD/freetype" "linux-arm linux-arm64 linux-x64 win-x64 win-x86"
|
||||
./Quik.Common/sh/quik_build_native.sh "$PWD/freetype"
|
||||
|
||||
# Copy out natives from their respective directories into runtimes
|
||||
mkdir -p \
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 518969e2c9a664e5bd8c01b5f90d1dc8c9979cd9
|
2
freetype
2
freetype
@ -1 +1 @@
|
||||
Subproject commit b7c943c5238c86bb30a1a543af2cc92849c74afb
|
||||
Subproject commit 54f85c888df812b98414e019c9549d36afc82cce
|
27
publish.sh
27
publish.sh
@ -1,27 +0,0 @@
|
||||
#!/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
|
Loading…
x
Reference in New Issue
Block a user