mirror of
https://onedev.site.tesses.net/crosslang
synced 2026-03-25 22:30:20 +00:00
Fix v0.0.2
This commit is contained in:
@@ -11,7 +11,6 @@ jobs:
|
||||
build-arch:
|
||||
runs-on: arch-builder
|
||||
steps:
|
||||
- run: pacman --noconfirm -Sy nodejs npm
|
||||
- uses: actions/checkout@v4
|
||||
- run: wget -O /root/repository.key https://git.tesseslanguage.com/api/packages/tesses50/arch/repository.key
|
||||
- run: pacman-key --add /root/repository.key
|
||||
@@ -63,6 +62,31 @@ jobs:
|
||||
run: bash build.sh
|
||||
|
||||
working-directory: ./Packaging/Windows
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Log in to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.GITEA_DOMAIN }}
|
||||
username: ${{ env.GITEA_REGISTRY_USER }}
|
||||
password: ${{ secrets.MY_GITEA_AUTH }}
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/riscv32,linux/riscv64
|
||||
build-contexts:
|
||||
- i686=./builds/containers/i686
|
||||
- x86_64=./builds/containers/x86_64
|
||||
- powerpc=./builds/containers/powerpc
|
||||
- powerpc64=./builds/containers/powerpc64
|
||||
- armv7a=./builds/containers/armv7a
|
||||
- aarch64=./builds/containers/aarch64
|
||||
- riscv32=./builds/containers/riscv32
|
||||
- riscv64=./builds/containers/riscv64
|
||||
context: .
|
||||
file: ./Dockerfile.superslim
|
||||
push: true
|
||||
tags: ${{ env.GITEA_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}:${{ gitea.ref_name }},${{ env.GITEA_DOMAIN }}/${{ env.RESULT_IMAGE_NAME }}:latest
|
||||
- uses: akkuman/gitea-release-action@v1
|
||||
env:
|
||||
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
||||
|
||||
39
Dockerfile.superslim
Normal file
39
Dockerfile.superslim
Normal file
@@ -0,0 +1,39 @@
|
||||
FROM --platform=linux/386 scratch
|
||||
COPY --from=i686 . /
|
||||
ENV CROSSLANG_CONTAINER=1
|
||||
ENTRYPOINT ["/usr/bin/crossint"]
|
||||
|
||||
FROM --platform=linux/amd64 scratch
|
||||
COPY --from=x86_64 . /
|
||||
ENV CROSSLANG_CONTAINER=1
|
||||
ENTRYPOINT ["/usr/bin/crossint"]
|
||||
|
||||
FROM --platform=linux/ppc scratch
|
||||
COPY --from=powerpc . /
|
||||
ENV CROSSLANG_CONTAINER=1
|
||||
ENTRYPOINT ["/usr/bin/crossint"]
|
||||
|
||||
FROM --platform=linux/ppc64 scratch
|
||||
COPY --from=powerpc64 . /
|
||||
ENV CROSSLANG_CONTAINER=1
|
||||
ENTRYPOINT ["/usr/bin/crossint"]
|
||||
|
||||
FROM --platform=linux/arm scratch
|
||||
COPY --from=armv7a . /
|
||||
ENV CROSSLANG_CONTAINER=1
|
||||
ENTRYPOINT ["/usr/bin/crossint"]
|
||||
|
||||
FROM --platform=linux/arm64 scratch
|
||||
COPY --from=aarch64 . /
|
||||
ENV CROSSLANG_CONTAINER=1
|
||||
ENTRYPOINT ["/usr/bin/crossint"]
|
||||
|
||||
FROM --platform=linux/riscv32 scratch
|
||||
COPY --from=riscv32 . /
|
||||
ENV CROSSLANG_CONTAINER=1
|
||||
ENTRYPOINT ["/usr/bin/crossint"]
|
||||
|
||||
FROM --platform=linux/riscv64 scratch
|
||||
COPY --from=riscv64 . /
|
||||
ENV CROSSLANG_CONTAINER=1
|
||||
ENTRYPOINT ["/usr/bin/crossint"]
|
||||
@@ -21,4 +21,12 @@ cd build
|
||||
cmake -S ../../../../ -B . -DTESSESFRAMEWORK_ENABLE_SHARED=OFF -DTESSESFRAMEWORK_FETCHCONTENT=ON -DTESSESFRAMEWORK_ENABLE_STATIC=ON -DCMAKE_TOOLCHAIN_FILE="$DIR/toolchain.cmake" -DCROSSLANG_ENABLE_SUPERSLIM=ON -DCMAKE_BUILD_TYPE=Release
|
||||
make -j`nproc`
|
||||
cp crosslang ../../../../artifacts/crosslang-slim-$TOOLCHAIN
|
||||
mkdir -p ../../../../builds/containers/$ARCH/usr/bin
|
||||
cp crosslang ../../../../builds/containers/$ARCH/usr/bin/crosslang
|
||||
ln -s crosslang ../../../../builds/containers/$ARCH/usr/bin/crossint
|
||||
ln -s crosslang ../../../../builds/containers/$ARCH/usr/bin/crossc
|
||||
ln -s crosslang ../../../../builds/containers/$ARCH/usr/bin/crossvm
|
||||
ln -s crosslang ../../../../builds/containers/$ARCH/usr/bin/crossarchivecreate
|
||||
ln -s crosslang ../../../../builds/containers/$ARCH/usr/bin/crossarchiveextract
|
||||
ln -s crosslang ../../../../builds/containers/$ARCH/usr/bin/crossdump
|
||||
rm -rf "$DIR"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ARCH="i686" TOOLCHAIN="i686-linux-musl" bash build-slim.sh
|
||||
#ARCH="x86_64" TOOLCHAIN="x86_64-linux-musl" bash build-slim.sh
|
||||
#ARCH="powerpc" TOOLCHAIN="powerpc-linux-musl" bash build-slim.sh
|
||||
#ARCH="powerpc" TOOLCHAIN="powerpc64-linux-musl" bash build-slim.sh
|
||||
#ARCH="aarch64" TOOLCHAIN="aarch64-linux-musl" bash build-slim.sh
|
||||
#ARCH="armv7a" TOOLCHAIN="armv7l-linux-musleabihf" bash build-slim.sh
|
||||
ARCH="i686" TOOLCHAIN="i686-linux-musl" bash build-slim.sh
|
||||
ARCH="x86_64" TOOLCHAIN="x86_64-linux-musl" bash build-slim.sh
|
||||
ARCH="powerpc" TOOLCHAIN="powerpc-linux-musl" bash build-slim.sh
|
||||
ARCH="powerpc64" TOOLCHAIN="powerpc64-linux-musl" bash build-slim.sh
|
||||
ARCH="armv7a" TOOLCHAIN="armv7l-linux-musleabihf" bash build-slim.sh
|
||||
ARCH="aarch64" TOOLCHAIN="aarch64-linux-musl" bash build-slim.sh
|
||||
ARCH="riscv32" TOOLCHAIN="riscv32-linux-musl" bash build-slim.sh
|
||||
ARCH="riscv64" TOOLCHAIN="riscv64-linux-musl" bash build-slim.sh
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "CrossLang.hpp"
|
||||
#include "TessesFramework/Platform/Environment.hpp"
|
||||
#include <iostream>
|
||||
|
||||
#include <string>
|
||||
@@ -10,6 +11,27 @@ namespace Tesses::CrossLang::Programs
|
||||
|
||||
static bool Download(Tesses::Framework::Filesystem::VFSPath filename,std::shared_ptr<Tesses::Framework::Filesystem::VFS> vfs)
|
||||
{
|
||||
auto inContainer=Platform::Environment::GetVariable("CROSSLANG_CONTAINER");
|
||||
if(inContainer && *inContainer=="1" || *inContainer=="y" || *inContainer=="Y")
|
||||
{
|
||||
HttpRequest req;
|
||||
req.url = "https://downloads.tesses.net/ShellPackage.crvm";
|
||||
req.method = "GET";
|
||||
HttpResponse resp(req);
|
||||
if(resp.statusCode == StatusCode::OK)
|
||||
{
|
||||
auto strm = resp.ReadAsStream();
|
||||
CrossLang::CrossArchiveExtract(strm, vfs);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Error when fetching the script error: " << std::to_string(resp.statusCode) << " " << HttpUtils::StatusCodeString(resp.statusCode) << std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
while(true)
|
||||
{
|
||||
std::cout << "File " << filename.ToString() << " not found, do you want to download the installer from: https://downloads.tesses.net/ShellPackage.crvm (this may install other stuff as well) (Y/n)? ";
|
||||
|
||||
Reference in New Issue
Block a user