diff --git a/.gitea/workflows/tag.yaml b/.gitea/workflows/tag.yaml index 1837ea9..5de2747 100644 --- a/.gitea/workflows/tag.yaml +++ b/.gitea/workflows/tag.yaml @@ -13,7 +13,7 @@ jobs: runs-on: arch-builder steps: - uses: actions/checkout@v4 - - run: pacman --noconfirm -Sy mbedtls curl + - run: pacman --noconfirm -Sy mbedtls curl zip zig ninja - run: pacman --config /opt/cross/ppc/pacman.conf --noconfirm -Sy mbedtls - run: cp Packaging/Linux/PKGBUILD /home/build/PKGBUILD - run: cp Packaging/Linux/build-arch.sh /home/build/build-arch.sh @@ -21,6 +21,14 @@ jobs: - run: chown build:build /home/build/PKGBUILD - run: chown build:build /home/build/build-arch.sh - run: su build -c /home/build/build-arch.sh + - run: env -C Packaging/Tools bash build.sh + - uses: akkuman/gitea-release-action@v1 + env: + NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18 + with: + prerelease: true + files: |- + artifacts/** update-tap: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index f8bc89b..eb1fdcf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ builds .vscode out /.vs +artifacts \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d5040c..20cc302 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,11 +137,6 @@ else() target_compile_definitions(TessesFramework PUBLIC TESSESFRAMEWORK_CERT_BUNDLE_FILE=${TESSESFRAMEWORK_CERT_BUNDLE_FILE}) endif() if(NOT TESSESFRAMEWORK_FETCHCONTENT) -if(MBEDTLS_DIR STREQUAL "") -else() -target_include_directories(${TessesFramework_TARGET} PUBLIC ${MBEDTLS_DIR}/include) -target_link_directories(${TessesFramework_TARGET} PUBLIC ${MBEDTLS_DIR}/lib) -endif() target_link_libraries(${TessesFramework_TARGET} PUBLIC mbedtls mbedx509 mbedcrypto) endif() endif() @@ -219,7 +214,7 @@ if(TESSESFRAMEWORK_FETCHCONTENT) target_link_libraries(tessesframework_shared PUBLIC mbedtls mbedx509 mbedcrypto everest p256m) else() -target_link_libraries(tessesframework_shared PUBLIC MbedTLS::mbedcrypto MbedTLS::mbedtls MbedTLS::mbedx509) +target_link_libraries(tessesframework_shared PUBLIC mbedtls mbedx509 mbedcrypto) endif() endif() diff --git a/CMakePresets.json b/CMakePresets.json deleted file mode 100644 index 5869874..0000000 --- a/CMakePresets.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "version": 3, - "configurePresets": [ - { - "name": "linux-debug", - "displayName": "Linux Debug", - "description": "Target the Windows Subsystem for Linux (WSL) or a remote Linux system.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/out/build/${presetName}", - "installDir": "${sourceDir}/out/install/${presetName}", - "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Linux" - }, - "vendor": { "microsoft.com/VisualStudioRemoteSettings/CMake/2.0": { "remoteSourceRootDir": "$env{HOME}/.vs/$ms{projectDirName}" } } - }, - { - "name": "macos-debug", - "displayName": "macOS Debug", - "description": "Target a remote macOS system.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/out/build/${presetName}", - "installDir": "${sourceDir}/out/install/${presetName}", - "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Darwin" - }, - "vendor": { "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" } } - }, - { - "name": "windows-base", - "description": "Target Windows with the Visual Studio development environment.", - "hidden": true, - "generator": "Ninja", - "binaryDir": "${sourceDir}/out/build/${presetName}", - "installDir": "${sourceDir}/out/install/${presetName}", - "cacheVariables": { - "CMAKE_C_COMPILER": "cl.exe", - "CMAKE_CXX_COMPILER": "cl.exe", - "TESSESFRAMEWORK_ENABLE_MBED": false, - "TESSESFRAMEWORK_FETCHCONTENT": false - }, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "x64-debug", - "displayName": "x64 Debug", - "description": "Target Windows (64-bit) with the Visual Studio development environment. (Debug)", - "inherits": "windows-base", - "architecture": { - "value": "x64", - "strategy": "external" - }, - "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } - }, - { - "name": "x64-release", - "displayName": "x64 Release", - "description": "Target Windows (64-bit) with the Visual Studio development environment. (RelWithDebInfo)", - "inherits": "x64-debug", - "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } - }, - { - "name": "x86-debug", - "displayName": "x86 Debug", - "description": "Target Windows (32-bit) with the Visual Studio development environment. (Debug)", - "inherits": "windows-base", - "architecture": { - "value": "x86", - "strategy": "external" - }, - "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } - }, - { - "name": "x86-release", - "displayName": "x86 Release", - "description": "Target Windows (32-bit) with the Visual Studio development environment. (RelWithDebInfo)", - "inherits": "x86-debug", - "cacheVariables": { "CMAKE_BUILD_TYPE": "Release" } - } - ] -} \ No newline at end of file diff --git a/Packaging/Tools/build.sh b/Packaging/Tools/build.sh new file mode 100644 index 0000000..ccf35a8 --- /dev/null +++ b/Packaging/Tools/build.sh @@ -0,0 +1,35 @@ +mkdir -p ../../artifacts +mkdir -p builds +git clone --depth 1 https://git.tesses.org/tesses50/zig-cross builds/zig-cross + + + +for tripple in x86_64-linux-musl x86-linux-musl aarch64-linux-musl arm-linux-musleabi riscv64-linux-musl powerpc-linux-musleabihf; do + export BUILDDIR=builds/$tripple + mkdir -p $BUILDDIR + cmake -S ../.. -B $BUILDDIR --toolchain $PWD/builds/zig-cross/$tripple\.cmake -DCMAKE_BUILD_TYPE=Release -DTESSESFRAMEWORK_INSTALL_DEVELOPMENT=OFF -DTESSESFRAMEWORK_ENABLE_EXAMPLES=OFF -DTESSESFRAMEWORK_ENABLE_SHARED=OFF -DTESSESFRAMEWORK_ENABLE_STATIC=ON -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++ -static -Wl,--strip-all" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -GNinja + cmake --build $BUILDDIR || exit 1 + cmake --install $BUILDDIR --prefix $BUILDDIR/out + tar cvzf ../../artifacts/tessesframework-tools-$tripple\.tar.gz -C $BUILDDIR/out/ bin + +done + +for tripple in x86_64-windows-gnu x86-windows-gnu aarch64-windows-gnu; do + export BUILDDIR=builds/$tripple + mkdir -p $BUILDDIR + cmake -S ../.. -B $BUILDDIR --toolchain $PWD/builds/zig-cross/$tripple\.cmake -DCMAKE_BUILD_TYPE=Release -DTESSESFRAMEWORK_INSTALL_DEVELOPMENT=OFF -DTESSESFRAMEWORK_ENABLE_EXAMPLES=OFF -DTESSESFRAMEWORK_ENABLE_SHARED=OFF -DTESSESFRAMEWORK_ENABLE_STATIC=ON -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++ -static -Wl,--strip-all" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -GNinja + cmake --build $BUILDDIR || exit 1 + cmake --install $BUILDDIR --prefix $BUILDDIR/out + + env -C $BUILDDIR/out zip -r ../../../../../artifacts/tessesframework-tools-$tripple\.zip bin +done + +for tripple in x86_64-macos-none aarch64-macos-none; do + export BUILDDIR=builds/$tripple + mkdir -p $BUILDDIR + cmake -S ../.. -B $BUILDDIR --toolchain $PWD/builds/zig-cross/$tripple\.cmake -DCMAKE_BUILD_TYPE=Release -DTESSESFRAMEWORK_INSTALL_DEVELOPMENT=OFF -DTESSESFRAMEWORK_ENABLE_EXAMPLES=OFF -DTESSESFRAMEWORK_ENABLE_SHARED=OFF -DTESSESFRAMEWORK_ENABLE_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -GNinja -DCMAKE_EXE_LINKER_FLAGS="-Wl,--strip-all" + cmake --build $BUILDDIR || exit 1 + cmake --install $BUILDDIR --prefix $BUILDDIR/out + tar cvzf ../../artifacts/tessesframework-tools-$tripple\.tar.gz -C $BUILDDIR/out/ bin + +done \ No newline at end of file diff --git a/apps/tanonydrop.cpp b/apps/tanonydrop.cpp index 915fc01..84e9b20 100644 --- a/apps/tanonydrop.cpp +++ b/apps/tanonydrop.cpp @@ -50,7 +50,7 @@ int main(int argc, char** argv) .SendText( "" "" - "