From 394e5d848440477401afbabf06cd260cec96fb14 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Tue, 22 Jul 2025 18:24:35 -0500 Subject: [PATCH] Dynamic Build --- .onedev-buildspec.yml | 19 +++++++++++++++++++ CMakeLists.txt | 14 ++++++++------ README.md | 7 +++++++ src/runtime_methods/std.cpp | 1 - 4 files changed, 34 insertions(+), 7 deletions(-) diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml index 7f255c0..efbd870 100644 --- a/.onedev-buildspec.yml +++ b/.onedev-buildspec.yml @@ -32,6 +32,25 @@ jobs: passwordSecret: dockersecret platforms: linux/amd64 condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !CommandStep + name: Build Tar + runInContainer: true + image: onedev.site.tesses.net/dependencies/build:latest + interpreter: !DefaultInterpreter + commands: | + mkdir build2 + cd build2 + cmake -S .. -B . -DTESSESFRAMEWORK_ENABLE_SHARED=ON -DTESSESFRAMEWORK_ENABLE_STATIC=OFF + make -j12 + make install DESTDIR=../crosslang + cd .. + tar cvzf crosslang-x86_64.tar.gz crosslang + useTTY: true + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL + - !PublishArtifactStep + name: Publish CrossLang Artifact + artifacts: crosslang-x86_64.tar.gz + condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL triggers: - !DependencyFinishedTrigger projects: tesses-framework diff --git a/CMakeLists.txt b/CMakeLists.txt index 0875fab..b125f63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,14 @@ if(CROSSLANG_FETCHCONTENT) set(TESSESFRAMEWORK_ENABLE_EXAMPLES OFF) set(TESSESFRAMEWORK_ENABLE_APPS OFF) +if(NOT TESSESFRAMEWORK_ENABLE_SHARED) +set(CROSSLANG_ENABLE_SHARED OFF) +endif() +if(NOT TESSESFRAMEWORK_ENABLE_STATIC) +set(CROSSLANG_ENABLE_STATIC OFF) +endif() + + #set(CROSSLANG_ENABLE_SHARED OFF) #set(TESSESFRAMEWORK_ENABLE_SHARED OFF) #set(CROSSLANG_SHARED_EXECUTABLES OFF) @@ -188,9 +196,6 @@ CROSSLANG_LINK_DEPS(crosslang_static) if(CROSSLANG_FETCHCONTENT) target_link_libraries(crosslang_static PUBLIC tessesframework) -if(TESSESFRAMEWORK_FETCHCONTENT AND TESSESFRAMEWORK_ENABLE_SDL2) -sdl2_fix(crosslang_static) -endif() else() target_link_libraries(crosslang_static PUBLIC TessesFramework::tessesframework) endif() @@ -204,9 +209,6 @@ add_library(crosslang_shared SHARED ${CROSSLANG_SOURCE}) CROSSLANG_LINK_DEPS(crosslang_shared) if(CROSSLANG_FETCHCONTENT) target_link_libraries(crosslang_shared PUBLIC tessesframework_shared) -if(TESSESFRAMEWORK_FETCHCONTENT AND TESSESFRAMEWORK_ENABLE_SDL2) -sdl2_fix(crosslang_shared) -endif() else() target_link_libraries(crosslang_shared PUBLIC TessesFramework::tessesframework_shared) endif() diff --git a/README.md b/README.md index 38fa29c..468eab8 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,13 @@ make sudo make install ``` +## Build with shared libs only (no dependencies other than cmake and build-essentials) +```bash +cmake -S ../.. -B . -DTESSESFRAMEWORK_ENABLE_STATIC=OFF -DTESSESFRAMEWORK_ENABLE_SHARED=ON -DTESSESFRAMEWORK_FETCHCONTENT=ON +make -j`nproc` +sudo make install +``` + ## Run these commands to install crosslang (without plugin support) Or use binaries from [here](https://crosslang.tesseslanguage.com/download/) diff --git a/src/runtime_methods/std.cpp b/src/runtime_methods/std.cpp index e4ffc73..31cb7ba 100644 --- a/src/runtime_methods/std.cpp +++ b/src/runtime_methods/std.cpp @@ -1419,7 +1419,6 @@ namespace Tesses::CrossLang RegisterOGC(gc, env); RegisterProcess(gc,env); RegisterClass(gc,env); - RegisterSDL2(gc,env); gc->RegisterEverything(env);