Compare commits
10 Commits
dcbc58481e
...
v0.0.9
| Author | SHA1 | Date | |
|---|---|---|---|
| 56b74dc6fc | |||
| a6be15410d | |||
| 7aa7635ab6 | |||
| 15785225e0 | |||
| 1c3fda37f5 | |||
| a72ab256f2 | |||
| 671a4c88b7 | |||
| bdbdfde646 | |||
| 62e316b022 | |||
| 17e4ca9410 |
@@ -5,6 +5,7 @@ on:
|
|||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
TF_VERSION: 0.0.6
|
||||||
PACKAGE_AND_BREW: ${{ secrets.PACKAGE_AND_BREW }}
|
PACKAGE_AND_BREW: ${{ secrets.PACKAGE_AND_BREW }}
|
||||||
VERSION: ${{ gitea.ref_name }}
|
VERSION: ${{ gitea.ref_name }}
|
||||||
RESULT_IMAGE_NAME: tesses50/crosslang
|
RESULT_IMAGE_NAME: tesses50/crosslang
|
||||||
@@ -12,23 +13,14 @@ env:
|
|||||||
GITEA_REGISTRY_USER: tesses50
|
GITEA_REGISTRY_USER: tesses50
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-arch:
|
build-ppc:
|
||||||
runs-on: arch-builder
|
name: "🔨 Build for PowerPC"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: git.tesses.org/tesses50/linux-ppc:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: wget -O /root/repository.key https://git.tesses.org/api/packages/tesses50/arch/repository.key
|
- run: bash build-for-ppc.sh
|
||||||
- run: pacman-key --add /root/repository.key
|
|
||||||
- run: pacman-key --config /opt/cross/ppc/pacman.conf --add /root/repository.key
|
|
||||||
- run: printf "[tesses50.git.tesses.org]\nSigLevel = Optional TrustAll\nServer = https://git.tesses.org/api/packages/tesses50/arch/core/\$arch\n" >> /etc/pacman.conf
|
|
||||||
- run: printf "[tesses50.git.tesses.org]\nSigLevel = Optional TrustAll\nServer = https://git.tesses.org/api/packages/tesses50/arch/core/\$arch\n" >> /opt/cross/ppc/pacman.conf
|
|
||||||
- run: pacman --noconfirm -Sy mbedtls tessesframework zip zig ninja
|
|
||||||
- run: pacman --config /opt/cross/ppc/pacman.conf --noconfirm -Sy mbedtls tessesframework
|
|
||||||
- run: cp Packaging/Linux/PKGBUILD /home/build/PKGBUILD
|
|
||||||
- run: cp Packaging/Linux/build-arch.sh /home/build/build-arch.sh
|
|
||||||
- run: chmod 755 /home/build/build-arch.sh
|
|
||||||
- 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
|
|
||||||
- uses: akkuman/gitea-release-action@v1
|
- uses: akkuman/gitea-release-action@v1
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
||||||
@@ -37,6 +29,43 @@ jobs:
|
|||||||
files: |-
|
files: |-
|
||||||
artifacts/**
|
artifacts/**
|
||||||
|
|
||||||
|
build-packages:
|
||||||
|
name: "🔨 Build for everything else"
|
||||||
|
runs-on: fw13-ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- container: "git.tesses.org/tesses50/linux-x64:latest"
|
||||||
|
nfpmName: "amd64"
|
||||||
|
debianName: "x86_64-linux-gnu"
|
||||||
|
- container: "git.tesses.org/tesses50/linux-x86:latest"
|
||||||
|
nfpmName: "386"
|
||||||
|
debianName: "i386-linux-gnu"
|
||||||
|
- container: "git.tesses.org/tesses50/linux-arm:latest"
|
||||||
|
nfpmName: "arm7"
|
||||||
|
debianName: "arm-linux-gnueabihf"
|
||||||
|
- container: "git.tesses.org/tesses50/linux-arm64:latest"
|
||||||
|
nfpmName: "arm64"
|
||||||
|
debianName: "aarch64-linux-gnu"
|
||||||
|
- container: "git.tesses.org/tesses50/linux-riscv64:latest"
|
||||||
|
nfpmName: "riscv64"
|
||||||
|
debianName: "riscv64-linux-gnu"
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: ${{ matrix.container }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: bash build-for-nfpm.sh ${{ matrix.nfpmName }} ${{ matrix.debianName }}
|
||||||
|
- uses: akkuman/gitea-release-action@v1
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
|
||||||
|
with:
|
||||||
|
prerelease: true
|
||||||
|
files: |-
|
||||||
|
artifacts/**
|
||||||
|
|
||||||
|
|
||||||
update-tap:
|
update-tap:
|
||||||
runs-on: global-container-mingw
|
runs-on: global-container-mingw
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ include(cmake/version.cmake)
|
|||||||
project(TessesCrossLang VERSION ${CROSSLANG_MAJOR_VERSION}.${CROSSLANG_MINOR_VERSION}.${CROSSLANG_PATCH_VERSION})
|
project(TessesCrossLang VERSION ${CROSSLANG_MAJOR_VERSION}.${CROSSLANG_MINOR_VERSION}.${CROSSLANG_PATCH_VERSION})
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
@@ -32,3 +33,12 @@ include(cmake/app.cmake)
|
|||||||
if(CROSSLANG_INSTALL_DEVELOPMENT)
|
if(CROSSLANG_INSTALL_DEVELOPMENT)
|
||||||
add_subdirectory(pkgconfig)
|
add_subdirectory(pkgconfig)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT CROSSLANG_TF_VERSION STREQUAL "")
|
||||||
|
if(NOT CROSSLANG_NFPM_ARCH STREQUAL "")
|
||||||
|
configure_file(nfpm.yaml.in nfpm.yaml @ONLY)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
|
||||||
|
configure_file(ppc-pkgbuild.in ppc-pkgbuild @ONLY)
|
||||||
|
endif()
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
# Maintainer: Mike Nolan <tesses@tesses.net>
|
|
||||||
pkgname=crosslang # '-bzr', '-git', '-hg' or '-svn'
|
|
||||||
pkgver=0.0.6
|
|
||||||
pkgrel=1
|
|
||||||
pkgdesc=""
|
|
||||||
arch=('x86_64' 'powerpc')
|
|
||||||
url="https://git.tesses.org/tesses50/crosslang"
|
|
||||||
license=('GPLv3')
|
|
||||||
groups=()
|
|
||||||
depends=('mbedtls' 'tessesframework=0.0.4')
|
|
||||||
makedepends=('git' 'cmake' 'make' 'base-devel' 'wget') # 'bzr', 'git', 'mercurial' or 'subversion'
|
|
||||||
install=
|
|
||||||
source=('crosslang::git+https://git.tesses.org/tesses50/crosslang')
|
|
||||||
noextract=()
|
|
||||||
sha256sums=('SKIP')
|
|
||||||
if [[ -z "$CMAKE_TOOLCHAIN" ]]; then
|
|
||||||
options=(!strip)
|
|
||||||
else
|
|
||||||
options=(!buildflags !strip)
|
|
||||||
fi
|
|
||||||
# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
|
|
||||||
# a description of each element in the source array.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
prepare() {
|
|
||||||
cd "$srcdir/${pkgname}"
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
|
||||||
cd "$srcdir/${pkgname}"
|
|
||||||
mkdir build
|
|
||||||
|
|
||||||
if [[ -z "$CMAKE_TOOLCHAIN" ]]; then
|
|
||||||
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DCROSSLANG_FETCHCONTENT=OFF -DCMAKE_BUILD_TYPE=Release
|
|
||||||
else
|
|
||||||
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr -DCROSSLANG_FETCHCONTENT=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$CMAKE_TOOLCHAIN"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd build
|
|
||||||
make -j`nproc`
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package() {
|
|
||||||
cd "$srcdir/${pkgname}/build"
|
|
||||||
make install DESTDIR="$pkgdir/"
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
cd /home/build
|
|
||||||
mkdir x86_64
|
|
||||||
cd x86_64
|
|
||||||
cp ../PKGBUILD .
|
|
||||||
makepkg
|
|
||||||
curl --user tesses50:$PACKAGE_AND_BREW \
|
|
||||||
--upload-file *.pkg.tar.zst \
|
|
||||||
https://git.tesses.org/api/packages/tesses50/arch/core
|
|
||||||
cd ..
|
|
||||||
mkdir powerpc
|
|
||||||
cd powerpc
|
|
||||||
cp ../PKGBUILD .
|
|
||||||
CARCH=powerpc CMAKE_TOOLCHAIN=/opt/cross/ppc/toolchain.cmake makepkg
|
|
||||||
curl --user tesses50:$PACKAGE_AND_BREW \
|
|
||||||
--upload-file *.pkg.tar.zst \
|
|
||||||
https://git.tesses.org/api/packages/tesses50/arch/core
|
|
||||||
41
build-for-nfpm.sh
Normal file
41
build-for-nfpm.sh
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
if [ $# -lt 2 ]
|
||||||
|
then
|
||||||
|
echo "Not enough args, pass nfpm arch and debian tripple as argument"
|
||||||
|
echo "This script requires our docker container: git.tesses.org/tesses50/linux-*:latest"
|
||||||
|
else
|
||||||
|
curl https://git.tesses.org/tesses50/tessesframework/releases/download/v$TF_VERSION/tessesframework-v$TF_VERSION-$1.tar.gz | tar xz -C /opt/cross/staging
|
||||||
|
mkdir -p build
|
||||||
|
cd build
|
||||||
|
cmake-cross -S .. -B . -DCROSSLANG_NFPM_ARCH=$1 -DCMAKE_INSTALL_LIBDIR=lib/$2 -DCMAKE_BUILD_TYPE=Release -DCROSSLANG_FETCHCONTENT=OFF -DCROSSLANG_TF_VERSION=$TF_VERSION
|
||||||
|
make -j`nproc`
|
||||||
|
make install DESTDIR=debian
|
||||||
|
cd debian
|
||||||
|
nfpm package -f ../nfpm.yaml -p deb
|
||||||
|
curl --user tesses50:$PACKAGE_AND_BREW \
|
||||||
|
--upload-file *.deb \
|
||||||
|
https://git.tesses.org/api/packages/tesses50/debian/pool/universal/main/upload
|
||||||
|
#debian/pool/bionic
|
||||||
|
cd ..
|
||||||
|
if [ "$1" = "386" ] || [ "$1" = "arm7" ]
|
||||||
|
then
|
||||||
|
cmake-cross -S .. -B . -DCROSSLANG_NFPM_ARCH=$1 -DCMAKE_INSTALL_LIBDIR=lib32
|
||||||
|
else
|
||||||
|
cmake-cross -S .. -B . -DCROSSLANG_NFPM_ARCH=$1 -DCMAKE_INSTALL_LIBDIR=lib64
|
||||||
|
fi
|
||||||
|
make install DESTDIR=fedora
|
||||||
|
cd fedora
|
||||||
|
nfpm package -f ../nfpm.yaml -p rpm
|
||||||
|
curl --user tesses50:$PACKAGE_AND_BREW \
|
||||||
|
--upload-file *.rpm \
|
||||||
|
https://git.tesses.org/api/packages/tesses50/rpm/upload
|
||||||
|
cd ..
|
||||||
|
cmake-cross -S .. -B . -DCROSSLANG_NFPM_ARCH=$1 -DCMAKE_INSTALL_LIBDIR=lib
|
||||||
|
make install DESTDIR=arch
|
||||||
|
cd arch
|
||||||
|
nfpm package -f ../nfpm.yaml -p archlinux
|
||||||
|
curl --user tesses50:$PACKAGE_AND_BREW \
|
||||||
|
--upload-file *.pkg.tar.zst \
|
||||||
|
https://git.tesses.org/api/packages/tesses50/arch/core
|
||||||
|
mkdir -p ../../artifacts
|
||||||
|
tar czf ../../artifacts/crosslang-$VERSION\-$1\.tar.gz --owner=1000 --group=1000 -C usr/ . -C /opt/cross/staging/ .
|
||||||
|
fi
|
||||||
21
build-for-ppc.sh
Normal file
21
build-for-ppc.sh
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
curl https://git.tesses.org/tesses50/tessesframework/releases/download/v$TF_VERSION/tessesframework-v$TF_VERSION-powerpc.tar.gz | tar xz -C /opt/cross/staging
|
||||||
|
|
||||||
|
mkdir -p build
|
||||||
|
pushd build
|
||||||
|
cmake-cross -S .. -B . -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCROSSLANG_FETCHCONTENT=OFF -DCROSSLANG_TF_VERSION=$TF_VERSION
|
||||||
|
make -j`nproc`
|
||||||
|
mkdir -p /home/build/cl
|
||||||
|
chown build:build -R /home/build
|
||||||
|
make install DESTDIR=/home/build/cl/src
|
||||||
|
cp ppc-pkgbuild /home/build/cl/PKGBUILD
|
||||||
|
chmod 644 /home/build/cl/PKGBUILD
|
||||||
|
chown build:build -R /home/build/cl
|
||||||
|
pushd /home/build/cl
|
||||||
|
su build -c 'CARCH=powerpc makepkg -d'
|
||||||
|
curl --user tesses50:$PACKAGE_AND_BREW \
|
||||||
|
--upload-file *.pkg.tar.zst \
|
||||||
|
https://git.tesses.org/api/packages/tesses50/arch/core
|
||||||
|
popd
|
||||||
|
popd
|
||||||
|
mkdir -p artifacts
|
||||||
|
tar czf artifacts/crosslang-$VERSION\-powerpc.tar.gz --owner=1000 --group=1000 -C /home/build/cl/src/usr . -C /opt/cross/staging/ .
|
||||||
@@ -1,5 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.0.9
|
||||||
|
Fixed Process.ShellFileOrUrl was broken New.ShellFileOrUrl
|
||||||
|
|
||||||
|
## 0.0.8
|
||||||
|
Use new build setup
|
||||||
|
|
||||||
|
## 0.0.7
|
||||||
|
Fix a security vulerability in crossdump that is supposed to use uint32_t but accidently used uint8_t, set to tessesframework=0.0.5
|
||||||
|
|
||||||
## 0.0.6
|
## 0.0.6
|
||||||
Fix bug with classes, use slim exclusively, add package private data and change rehaul cmake configs
|
Fix bug with classes, use slim exclusively, add package private data and change rehaul cmake configs
|
||||||
|
|
||||||
|
|||||||
@@ -32,8 +32,7 @@ set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
|
|||||||
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/winicon.ico")
|
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/winicon.ico")
|
||||||
set(CPACK_NSIS_MODIFY_PATH ON)
|
set(CPACK_NSIS_MODIFY_PATH ON)
|
||||||
set(CPACK_PACKAGE_VENDOR "Tesses")
|
set(CPACK_PACKAGE_VENDOR "Tesses")
|
||||||
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$DESKTOP\\\\CrossLang Interperter.lnk' '$INSTDIR\\\\bin\\\\crossint.exe'")
|
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$DESKTOP\\\\CrossLang Menu.lnk' '$INSTDIR\\\\bin\\\\crosslang.exe' 'interactive'")
|
||||||
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\CrossLang Interperter.lnk' '$INSTDIR\\\\bin\\\\crossint.exe'")
|
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\CrossLang Menu.lnk' '$INSTDIR\\\\bin\\\\crosslang.exe' 'interactive'")
|
||||||
|
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
@@ -5,7 +5,7 @@ set(CROSSLANG_STATIC ${TESSESFRAMEWORK_STATIC} CACHE INTERNAL "For CrossLang" FO
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
TessesFramework
|
TessesFramework
|
||||||
GIT_REPOSITORY https://git.tesses.org/tesses50/tessesframework.git
|
GIT_REPOSITORY https://git.tesses.org/tesses50/tessesframework.git
|
||||||
GIT_TAG 25d67053ccebf209f50e6928fad8827164eb4c28
|
GIT_TAG bd0587779e68832cf382fe49b6b2e99474bcf81f
|
||||||
)
|
)
|
||||||
set(TESSESFRAMEWORK_ENABLE_EXAMPLES OFF)
|
set(TESSESFRAMEWORK_ENABLE_EXAMPLES OFF)
|
||||||
FetchContent_MakeAvailable(TessesFramework)
|
FetchContent_MakeAvailable(TessesFramework)
|
||||||
|
|||||||
@@ -5,3 +5,5 @@ option(CROSSLANG_ENABLE_FFI "Enable libffi" OFF)
|
|||||||
option(CROSSLANG_ENABLE_RPATH "Enable RPATH" ON)
|
option(CROSSLANG_ENABLE_RPATH "Enable RPATH" ON)
|
||||||
option(CROSSLANG_CUSTOM_CONSOLE "Enable custom Console" OFF)
|
option(CROSSLANG_CUSTOM_CONSOLE "Enable custom Console" OFF)
|
||||||
option(CROSSLANG_STATIC "Build with static libraries instead of shared" OFF)
|
option(CROSSLANG_STATIC "Build with static libraries instead of shared" OFF)
|
||||||
|
option(CROSSLANG_NFPM_ARCH "Architecture for NFPM" "")
|
||||||
|
option(CROSSLANG_TF_VERSION "TessesFramework Version for nfpm and pkgbuild" "")
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
set(CROSSLANG_MAJOR_VERSION 0)
|
set(CROSSLANG_MAJOR_VERSION 0)
|
||||||
set(CROSSLANG_MINOR_VERSION 0)
|
set(CROSSLANG_MINOR_VERSION 0)
|
||||||
set(CROSSLANG_PATCH_VERSION 6)
|
set(CROSSLANG_PATCH_VERSION 9)
|
||||||
|
|||||||
183
nfpm.yaml.in
Normal file
183
nfpm.yaml.in
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
# Name. (required)
|
||||||
|
name: crosslang
|
||||||
|
|
||||||
|
# Architecture. (required)
|
||||||
|
# This will expand any env var you set in the field, e.g. arch: ${GOARCH}
|
||||||
|
# The architecture is specified using Go nomenclature (GOARCH) and translated
|
||||||
|
# to the platform specific equivalent. In order to manually set the architecture
|
||||||
|
# to a platform specific value, set `{format}.arch`.
|
||||||
|
# Examples: `all`, `amd64`, `386`, `arm5`, `arm6`, `arm7`, `arm64`, `mips`,
|
||||||
|
# `mipsle`, `mips64le`, `ppc64le`, `s390`, `riscv64`
|
||||||
|
arch: @CROSSLANG_NFPM_ARCH@
|
||||||
|
|
||||||
|
# Platform.
|
||||||
|
# This will expand any env var you set in the field, e.g. platform: ${GOOS}
|
||||||
|
# This is only used by the rpm and deb packagers.
|
||||||
|
# Examples: `linux` (default), `darwin`
|
||||||
|
platform: linux
|
||||||
|
|
||||||
|
# Version. (required)
|
||||||
|
# This will expand any env var you set in the field, e.g. version: ${SEMVER}
|
||||||
|
# Some package managers, like deb, require the version to start with a digit.
|
||||||
|
# Hence, you should not prefix the version with 'v'.
|
||||||
|
version: @CROSSLANG_MAJOR_VERSION@.@CROSSLANG_MINOR_VERSION@.@CROSSLANG_PATCH_VERSION@
|
||||||
|
|
||||||
|
# Version Schema allows you to specify how to parse the version string.
|
||||||
|
# Default is `semver`
|
||||||
|
# `semver` attempt to parse the version string as a valid semver version.
|
||||||
|
# The parser is lenient; it will strip a `v` prefix and will accept
|
||||||
|
# versions with fewer than 3 components, like `v1.2`.
|
||||||
|
# If parsing succeeds, then the version will be molded into a format
|
||||||
|
# compatible with the specific packager used.
|
||||||
|
# If parsing fails, then the version is used as-is.
|
||||||
|
# `none` skip trying to parse the version string and just use what is passed in
|
||||||
|
version_schema: semver
|
||||||
|
|
||||||
|
# Version Epoch.
|
||||||
|
# A package with a higher version epoch will always be considered newer.
|
||||||
|
# See: https://www.debian.org/doc/debian-policy/ch-controlfields.html#epochs-should-be-used-sparingly
|
||||||
|
#epoch: 1
|
||||||
|
|
||||||
|
# Version Prerelease.
|
||||||
|
# Default is extracted from `version` if it is semver compatible.
|
||||||
|
# This is appended to the `version`, e.g. `1.2.3+beta1`. If the `version` is
|
||||||
|
# semver compatible, then this replaces the prerelease component of the semver.
|
||||||
|
#prerelease: alpha
|
||||||
|
|
||||||
|
# Version Metadata (previously deb.metadata).
|
||||||
|
# Default is extracted from `version` if it is semver compatible.
|
||||||
|
# Setting metadata might interfere with version comparisons depending on the
|
||||||
|
# packager. If the `version` is semver compatible, then this replaces the
|
||||||
|
# version metadata component of the semver.
|
||||||
|
# version_metadata: git
|
||||||
|
|
||||||
|
# Version Release, aka revision.
|
||||||
|
# This will expand any env var you set in the field, e.g. release: ${VERSION_RELEASE}
|
||||||
|
# This is appended to the `version` after `prerelease`. This should be
|
||||||
|
# incremented if you release an updated package of the same upstream version,
|
||||||
|
# and it should reset to 1 when bumping the version.
|
||||||
|
release: 1
|
||||||
|
|
||||||
|
# Section.
|
||||||
|
# This is only used by the deb packager.
|
||||||
|
# See: https://www.debian.org/doc/debian-policy/ch-archive.html#sections
|
||||||
|
section: default
|
||||||
|
|
||||||
|
# Priority.
|
||||||
|
# Defaults to `optional` on deb
|
||||||
|
# Defaults to empty on rpm and apk
|
||||||
|
# See: https://www.debian.org/doc/debian-policy/ch-archive.html#priorities
|
||||||
|
priority: extra
|
||||||
|
|
||||||
|
# Maintainer. (required)
|
||||||
|
# This will expand any env var you set in the field, e.g. maintainer: ${GIT_COMMITTER_NAME} <${GIT_COMMITTER_EMAIL}>
|
||||||
|
# Defaults to empty on rpm and apk
|
||||||
|
# Leaving the 'maintainer' field unset will not be allowed in a future version
|
||||||
|
maintainer: Mike Nolan <tesses@tesses.net>
|
||||||
|
|
||||||
|
# Description.
|
||||||
|
# This will expand any env var you set in the field, e.g. description: ${DESCRIPTION}
|
||||||
|
# Defaults to `no description given`.
|
||||||
|
# Most packagers call for a one-line synopsis of the package. Some (like deb)
|
||||||
|
# also call for a multi-line description starting on the second line.
|
||||||
|
description: TessesFramework a library to make C++ easier for me, used in CrossLang
|
||||||
|
|
||||||
|
# Vendor.
|
||||||
|
# This will expand any env var you set in the field, e.g. vendor: ${VENDOR}
|
||||||
|
# This is only used by the rpm packager.
|
||||||
|
vendor: Tesses
|
||||||
|
|
||||||
|
# Package's homepage.
|
||||||
|
# This will expand any env var you set in the field, e.g. homepage: ${CI_PROJECT_URL}
|
||||||
|
homepage: https://git.tesses.org/tesses50/crosslang
|
||||||
|
|
||||||
|
# License.
|
||||||
|
license: GPLv3
|
||||||
|
|
||||||
|
# Date to be used as mtime on internal files.
|
||||||
|
#
|
||||||
|
# Default is the value of $SOURCE_DATE_EPOCH (which should be an Unix time),
|
||||||
|
# or the current time.
|
||||||
|
# Read more about SOURCE_DATE_EPOCH at https://reproducible-builds.org/docs/source-date-epoch/
|
||||||
|
#mtime: "2009-11-10T23:00:00Z"
|
||||||
|
|
||||||
|
# Changelog YAML file, see: https://github.com/goreleaser/chglog
|
||||||
|
# changelog: "changelog.yaml"
|
||||||
|
|
||||||
|
# Disables globbing for files, config_files, etc.
|
||||||
|
# disable_globbing: false
|
||||||
|
|
||||||
|
|
||||||
|
# Packages it replaces. (overridable)
|
||||||
|
# This will expand any env var you set in the field, e.g. ${REPLACE_BLA}
|
||||||
|
# the env var approach can be used to account for differences in platforms
|
||||||
|
#replaces:
|
||||||
|
# - foobar
|
||||||
|
# - ${REPLACE_BLA}
|
||||||
|
|
||||||
|
# Packages it provides. (overridable)
|
||||||
|
# This will expand any env var you set in the field, e.g. ${PROVIDES_BLA}
|
||||||
|
# the env var approach can be used to account for differences in platforms
|
||||||
|
#provides:
|
||||||
|
# - bar
|
||||||
|
# - ${PROVIDES_BLA}
|
||||||
|
|
||||||
|
# Dependencies. (overridable)
|
||||||
|
# This will expand any env var you set in the field, e.g. ${DEPENDS_NGINX}
|
||||||
|
# the env var approach can be used to account for differences in platforms
|
||||||
|
# e.g. rhel needs nginx >= 1:1.18 and deb needs nginx (>= 1.18.0)
|
||||||
|
#depends:
|
||||||
|
# - git
|
||||||
|
# - ${DEPENDS_NGINX}
|
||||||
|
|
||||||
|
# Recommended packages. (overridable)
|
||||||
|
# This will expand any env var you set in the field, e.g. ${RECOMMENDS_BLA}
|
||||||
|
# the env var approach can be used to account for differences in platforms
|
||||||
|
#recommends:
|
||||||
|
# - golang
|
||||||
|
# - ${RECOMMENDS_BLA}
|
||||||
|
|
||||||
|
# Suggested packages. (overridable)
|
||||||
|
# This will expand any env var you set in the field, e.g. ${SUGGESTS_BLA}
|
||||||
|
# the env var approach can be used to account for differences in platforms
|
||||||
|
#suggests:
|
||||||
|
# - bzr
|
||||||
|
|
||||||
|
# Packages it conflicts with. (overridable)
|
||||||
|
# This will expand any env var you set in the field, e.g. ${CONFLICTS_BLA}
|
||||||
|
# the env var approach can be used to account for differences in platforms
|
||||||
|
#conflicts:
|
||||||
|
# - mercurial
|
||||||
|
# - ${CONFLICTS_BLA}
|
||||||
|
|
||||||
|
# Contents to add to the package
|
||||||
|
# This can be binaries or any other files.
|
||||||
|
contents:
|
||||||
|
- src: usr/
|
||||||
|
dst: /usr/
|
||||||
|
type: tree
|
||||||
|
|
||||||
|
# Umask to be used on files without explicit mode set.
|
||||||
|
#
|
||||||
|
# By default, nFPM will inherit the mode of the original file that's being
|
||||||
|
# added.
|
||||||
|
# This may lead to issues if these files are checkout out in Git, for example,
|
||||||
|
# as it won't keep all the permissions on fresh checkouts, or if the local
|
||||||
|
# system has a problematic umask setting.
|
||||||
|
#
|
||||||
|
# This setting allows to set the umask for all files that are added to the
|
||||||
|
# package without a specific file_info.mode set.
|
||||||
|
#
|
||||||
|
# Default: 0o002 (will remove world-writable permissions)
|
||||||
|
umask: 0o002
|
||||||
|
|
||||||
|
overrides:
|
||||||
|
deb:
|
||||||
|
depends:
|
||||||
|
- "tessesframework (= @CROSSLANG_TF_VERSION@-1)"
|
||||||
|
rpm:
|
||||||
|
depends:
|
||||||
|
- "tessesframework = @CROSSLANG_TF_VERSION@-1"
|
||||||
|
archlinux:
|
||||||
|
depends:
|
||||||
|
- "tessesframework=@CROSSLANG_TF_VERSION@-1"
|
||||||
21
ppc-pkgbuild.in
Normal file
21
ppc-pkgbuild.in
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Maintainer: Mike Nolan <tesses@tesses.net>
|
||||||
|
pkgname=crosslang # '-bzr', '-git', '-hg' or '-svn'
|
||||||
|
pkgver=@CROSSLANG_MAJOR_VERSION@.@CROSSLANG_MINOR_VERSION@.@CROSSLANG_PATCH_VERSION@
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc=""
|
||||||
|
arch=('powerpc')
|
||||||
|
url="https://git.tesses.org/tesses50/crosslang"
|
||||||
|
license=('GPLv3')
|
||||||
|
groups=()
|
||||||
|
depends=('tessesframework=@CROSSLANG_TF_VERSION@-1')
|
||||||
|
makedepends=('git' 'cmake' 'make' 'base-devel' 'wget') # 'bzr', 'git', 'mercurial' or 'subversion'
|
||||||
|
install=
|
||||||
|
source=()
|
||||||
|
noextract=()
|
||||||
|
sha256sums=()
|
||||||
|
options=(!buildflags !strip)
|
||||||
|
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cp -r "${srcdir}/"* "${pkgdir}/"
|
||||||
|
}
|
||||||
@@ -94,7 +94,7 @@ void CrossLangDump(std::shared_ptr<Tesses::Framework::Streams::Stream> strm) {
|
|||||||
|
|
||||||
uint32_t ents = EnsureInt(strm);
|
uint32_t ents = EnsureInt(strm);
|
||||||
|
|
||||||
for (uint8_t k = 0; k < ents; k++) {
|
for (uint32_t k = 0; k < ents; k++) {
|
||||||
Ensure(strm, main_header, 1);
|
Ensure(strm, main_header, 1);
|
||||||
uint8_t flags = main_header[0];
|
uint8_t flags = main_header[0];
|
||||||
std::cout << "\t\t/^" << strs.at(EnsureInt(strm)) << "^/"
|
std::cout << "\t\t/^" << strs.at(EnsureInt(strm)) << "^/"
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ TObject CrossLangShell(GCList &ls, std::vector<std::string> &argv) {
|
|||||||
"Tesses.CrossLang.ShellPackage-1.0.0.0-prod.crvm";
|
"Tesses.CrossLang.ShellPackage-1.0.0.0-prod.crvm";
|
||||||
if (argv.size() == 2 && argv[1] == "configdir") {
|
if (argv.size() == 2 && argv[1] == "configdir") {
|
||||||
std::cout << dir.ToString() << std::endl;
|
std::cout << dir.ToString() << std::endl;
|
||||||
return 0;
|
return (int64_t)0;
|
||||||
}
|
}
|
||||||
if (argv.size() > 1 && argv[1] == "update-shell") {
|
if (argv.size() > 1 && argv[1] == "update-shell") {
|
||||||
|
|
||||||
@@ -101,15 +101,15 @@ TObject CrossLangShell(GCList &ls, std::vector<std::string> &argv) {
|
|||||||
auto strm = resp.ReadAsStream();
|
auto strm = resp.ReadAsStream();
|
||||||
CrossLang::CrossArchiveExtract(strm, subdir);
|
CrossLang::CrossArchiveExtract(strm, subdir);
|
||||||
|
|
||||||
return 0;
|
return (int64_t)0;
|
||||||
} else {
|
} else {
|
||||||
std::cout << "Error when fetching the script error: "
|
std::cout << "Error when fetching the script error: "
|
||||||
<< std::to_string(resp.statusCode) << " "
|
<< std::to_string(resp.statusCode) << " "
|
||||||
<< HttpUtils::StatusCodeString(resp.statusCode)
|
<< HttpUtils::StatusCodeString(resp.statusCode)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return 1;
|
return (int64_t)1;
|
||||||
}
|
}
|
||||||
return 0;
|
return (int64_t)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Tesses::Framework::Filesystem::LocalFS->RegularFileExists(filename)) {
|
if (!Tesses::Framework::Filesystem::LocalFS->RegularFileExists(filename)) {
|
||||||
@@ -125,12 +125,12 @@ TObject CrossLangShell(GCList &ls, std::vector<std::string> &argv) {
|
|||||||
CrossLang::CrossArchiveExtract(strm, subdir);
|
CrossLang::CrossArchiveExtract(strm, subdir);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return 1;
|
return (int64_t)1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!Download(filename, subdir))
|
if (!Download(filename, subdir))
|
||||||
return 1;
|
return (int64_t)1;
|
||||||
return 0;
|
return (int64_t)0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ TObject CrossLangVM(GCList &ls, TRootEnvironment *env,
|
|||||||
std::cout << "USAGE: "
|
std::cout << "USAGE: "
|
||||||
<< (argv.empty() ? (std::string) "crossvm" : argv[0])
|
<< (argv.empty() ? (std::string) "crossvm" : argv[0])
|
||||||
<< " <filename.crvm> <args...>" << std::endl;
|
<< " <filename.crvm> <args...>" << std::endl;
|
||||||
return 1;
|
return (int64_t)1;
|
||||||
}
|
}
|
||||||
|
|
||||||
env->LoadFileWithDependencies(
|
env->LoadFileWithDependencies(
|
||||||
@@ -33,7 +33,7 @@ TObject CrossLangVM(GCList &ls, TRootEnvironment *env,
|
|||||||
auto res = env->CallFunctionWithFatalError(ls, "WebAppMain", {args2});
|
auto res = env->CallFunctionWithFatalError(ls, "WebAppMain", {args2});
|
||||||
auto svr2 = Tesses::CrossLang::ToHttpServer(ls.GetGC(), res);
|
auto svr2 = Tesses::CrossLang::ToHttpServer(ls.GetGC(), res);
|
||||||
if (svr2 == nullptr)
|
if (svr2 == nullptr)
|
||||||
return 1;
|
return (int64_t)1;
|
||||||
Tesses::Framework::Http::HttpServer svr(port, svr2);
|
Tesses::Framework::Http::HttpServer svr(port, svr2);
|
||||||
svr.StartAccepting();
|
svr.StartAccepting();
|
||||||
TF_RunEventLoop();
|
TF_RunEventLoop();
|
||||||
@@ -46,7 +46,7 @@ TObject CrossLangVM(GCList &ls, TRootEnvironment *env,
|
|||||||
_co->CallMethod(ls, "", "Close", {});
|
_co->CallMethod(ls, "", "Close", {});
|
||||||
}
|
}
|
||||||
TF_Quit();
|
TF_Quit();
|
||||||
return 0;
|
return (int64_t)0;
|
||||||
} else {
|
} else {
|
||||||
TList *args = TList::Create(ls);
|
TList *args = TList::Create(ls);
|
||||||
for (size_t arg = 1; arg < argv.size(); arg++)
|
for (size_t arg = 1; arg < argv.size(); arg++)
|
||||||
|
|||||||
@@ -3,7 +3,17 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace Tesses::CrossLang {
|
namespace Tesses::CrossLang {
|
||||||
|
TObject Console_setInvertedColors(GCList &ls, std::vector<TObject> args) {
|
||||||
|
bool inverted;
|
||||||
|
if (GetArgument(args, 0, inverted)) {
|
||||||
|
Tesses::Framework::Console::SetInvertedColors(inverted);
|
||||||
|
}
|
||||||
|
return Undefined();
|
||||||
|
}
|
||||||
|
TObject Console_Reset(GCList &ls, std::vector<TObject> args) {
|
||||||
|
Tesses::Framework::Console::Reset();
|
||||||
|
return Undefined();
|
||||||
|
}
|
||||||
TObject Console_getIsTTY(GCList &ls, std::vector<TObject> args) {
|
TObject Console_getIsTTY(GCList &ls, std::vector<TObject> args) {
|
||||||
|
|
||||||
return Tesses::Framework::Console::IsTTY();
|
return Tesses::Framework::Console::IsTTY();
|
||||||
@@ -69,11 +79,14 @@ TObject Console_Fatal(GCList &ls, std::vector<TObject> args) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
TObject Console_WriteLine(GCList &ls, std::vector<TObject> args) {
|
TObject Console_WriteLine(GCList &ls, std::vector<TObject> args) {
|
||||||
|
|
||||||
if (args.size() < 1) {
|
if (args.size() < 1) {
|
||||||
Tesses::Framework::Console::WriteLineView("");
|
Tesses::Framework::Console::WriteLineView("");
|
||||||
return Undefined();
|
return Undefined();
|
||||||
}
|
}
|
||||||
Tesses::Framework::Console::WriteLine(ToString(ls.GetGC(), args[0]));
|
std::string text = ToString(ls.GetGC(), args[0]);
|
||||||
|
|
||||||
|
Tesses::Framework::Console::WriteLine(text);
|
||||||
|
|
||||||
return Undefined();
|
return Undefined();
|
||||||
}
|
}
|
||||||
@@ -143,7 +156,7 @@ TObject Console_List(GCList &ls, std::vector<TObject> args) {
|
|||||||
|
|
||||||
return (int64_t)Tesses::Framework::Console::List(items);
|
return (int64_t)Tesses::Framework::Console::List(items);
|
||||||
}
|
}
|
||||||
return 0;
|
return (int64_t)0;
|
||||||
}
|
}
|
||||||
void TStd::RegisterConsole(std::shared_ptr<GC> gc, TRootEnvironment *env) {
|
void TStd::RegisterConsole(std::shared_ptr<GC> gc, TRootEnvironment *env) {
|
||||||
env->permissions.canRegisterConsole = true;
|
env->permissions.canRegisterConsole = true;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ class TServerContext : public TNativeObjectThatReturnsHttpDictionary {
|
|||||||
else if (key == "getIP")
|
else if (key == "getIP")
|
||||||
return ctx->ip;
|
return ctx->ip;
|
||||||
else if (key == "getPort")
|
else if (key == "getPort")
|
||||||
return ctx->port;
|
return (int64_t)ctx->port;
|
||||||
else if (key == "getOriginalPath")
|
else if (key == "getOriginalPath")
|
||||||
return ctx->originalPath;
|
return ctx->originalPath;
|
||||||
else if (key == "getPath")
|
else if (key == "getPath")
|
||||||
@@ -235,7 +235,7 @@ class TServerContext : public TNativeObjectThatReturnsHttpDictionary {
|
|||||||
return sc;
|
return sc;
|
||||||
}
|
}
|
||||||
} else if (key == "getStatusCode")
|
} else if (key == "getStatusCode")
|
||||||
return ctx->statusCode;
|
return (int64_t)ctx->statusCode;
|
||||||
else if (key == "getQueryParams")
|
else if (key == "getQueryParams")
|
||||||
return TNativeObject::Create<THttpDictionary>(ls, &ctx->queryParams,
|
return TNativeObject::Create<THttpDictionary>(ls, &ctx->queryParams,
|
||||||
this);
|
this);
|
||||||
|
|||||||
@@ -280,6 +280,16 @@ void TStd::RegisterProcess(std::shared_ptr<GC> gc, TRootEnvironment *env) {
|
|||||||
}
|
}
|
||||||
return Undefined();
|
return Undefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
dict->DeclareFunction(
|
||||||
|
gc, "ShellFileOrUrl", "Launch file or url in shell", {"urlOrFilename"},
|
||||||
|
[](GCList &ls, std::vector<TObject> args) -> TObject {
|
||||||
|
std::string fileOrUrl;
|
||||||
|
if (GetArgument(args, 0, fileOrUrl))
|
||||||
|
Tesses::Framework::Platform::ShellFileOrUrl(fileOrUrl);
|
||||||
|
|
||||||
|
return Undefined();
|
||||||
|
});
|
||||||
gc->BarrierEnd();
|
gc->BarrierEnd();
|
||||||
}
|
}
|
||||||
} // namespace Tesses::CrossLang
|
} // namespace Tesses::CrossLang
|
||||||
|
|||||||
@@ -16,8 +16,12 @@ TObject TRandom::CallMethod(GCList &ls, std::string name,
|
|||||||
|
|
||||||
return (int64_t)random.Next((uint32_t)first);
|
return (int64_t)random.Next((uint32_t)first);
|
||||||
}
|
}
|
||||||
|
{
|
||||||
return random.Next();
|
uint64_t num = random.Next();
|
||||||
|
int64_t val2 = 0;
|
||||||
|
memcpy(&val2, &num, sizeof(int64_t));
|
||||||
|
return val2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == "NextByte") {
|
if (name == "NextByte") {
|
||||||
|
|||||||
@@ -3195,7 +3195,7 @@ bool InterperterThread::ExecuteMethod2(std::shared_ptr<GC> gc, TObject instance,
|
|||||||
if (GetArgument(args, 0, index) &&
|
if (GetArgument(args, 0, index) &&
|
||||||
(size_t)index < bArray->data.size() &&
|
(size_t)index < bArray->data.size() &&
|
||||||
(size_t)index + 8 <= bArray->data.size()) {
|
(size_t)index + 8 <= bArray->data.size()) {
|
||||||
uint64_t value = BitConverter::ToDoubleLE(
|
double value = BitConverter::ToDoubleLE(
|
||||||
bArray->data[(size_t)index]);
|
bArray->data[(size_t)index]);
|
||||||
|
|
||||||
cse.back()->Push(gc, value);
|
cse.back()->Push(gc, value);
|
||||||
@@ -3218,7 +3218,7 @@ bool InterperterThread::ExecuteMethod2(std::shared_ptr<GC> gc, TObject instance,
|
|||||||
if (GetArgument(args, 0, index) &&
|
if (GetArgument(args, 0, index) &&
|
||||||
(size_t)index < bArray->data.size() &&
|
(size_t)index < bArray->data.size() &&
|
||||||
(size_t)index + 8 <= bArray->data.size()) {
|
(size_t)index + 8 <= bArray->data.size()) {
|
||||||
uint64_t value = BitConverter::ToDoubleBE(
|
double value = BitConverter::ToDoubleBE(
|
||||||
bArray->data[(size_t)index]);
|
bArray->data[(size_t)index]);
|
||||||
|
|
||||||
cse.back()->Push(gc, value);
|
cse.back()->Push(gc, value);
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ bool InterperterThread::GetField(std::shared_ptr<GC> gc) {
|
|||||||
|
|
||||||
if (netStrm != nullptr) {
|
if (netStrm != nullptr) {
|
||||||
if (key == "Port") {
|
if (key == "Port") {
|
||||||
cse.back()->Push(gc, netStrm->GetPort());
|
cse.back()->Push(gc, (int64_t)netStrm->GetPort());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user