Repository navigation
Update TIC-80 - #28
Conversation
|
I don't know gitlab that well, but I could not find the mentioned targets. I hope we could get some update on this. |
|
I was able to build it for my Linux x86_64 and Android using your the configs you created in the gitlab yml. It does fix nesbox#2504 (sprites) and nesbox#2319 (javascript games). I made a small Makefile (with the help of ChatGPT) to build it. It can be found with instructions at: https://gist.github.com/imsys/2981c9de54a07abf7a24df139b3237a2 In case anyone wants to just use my binaries, I will host it at my Gdrive until we have an official build. I also tried compiling to Linux aarch64, so I could run it on my TRIMUI handheld. It would just build fine, but the core would just fail to load over there. I will probably check in their community what I may be missing to get it working correctly there. |
|
Thanks for testing. I think what was remaining here was making sure that all build targets passed in libretro buildbot. While most passed, not all did. I'm unclear on the status of that today. Either way, this attempt could do with another update to the latest TIC80 😉 |
|
I was able to compile for the TrimUI, notes are at: https://gist.github.com/imsys/0c67f1b27ff386abb075b67c6fa1766a |
|
Edge case: Bokdown https://tic80.com/play?cart=1411 |
|
Sorry, my bad. The problem is in the TIC-80 main (latest 4c1b009). |
Added support for building with JS and Janet in the CI configuration. Updated various build configurations to include 32-bit system arguments.
|
Like the idea of pushing some of the cmake stuff upstream. Good call 👍 |
This is really quite tricky, maybe this could work? .core-some-32bits-system:
variables:
CORE_32BITS_ARGS: >
-DCMAKE_C_FLAGS_RELEASE="-DLUA_32BITS -DTIC80_FFT_UNSUPPORTED -DPOOR_CLIB"
-DCMAKE_CXX_FLAGS_RELEASE="-DLUA_32BITS" |
Disable JANET build option in CI configuration.
|
The Switch version is basically fixed, we just need to set Actually, we have to add Speaking of which, they all compile fine, but the lib will be incomplete if we don't do the changes at nesbox#2905 So I thought that for now we could just do: before_script:
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1a27f7a0dcfaf6149cd2c56e9d173c538526648a/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"At least just to check if it works. Or you could add the file to this project and do a Now the biggest problem is still the C/CXX_FLAGS. The next suggestion Gemini gave is to we try this: - |
echo 'set(CMAKE_C_FLAGS_RELEASE "-DLUA_32BITS -DTIC80_FFT_UNSUPPORTED -DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
echo 'set(CMAKE_CXX_FLAGS_RELEASE "-DLUA_32BITS" CACHE STRING "" FORCE)' >> build_flags.cmake
- export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake"If this doesn't work, probably some variation of it will. So I updated my gist with all those changes. |
|
I thought it would take only a few iterations, but it's taking way more.. libretro-build-ctr (3DS) ✅ fixed Switch build got an error that I was able to reproduce, and I fixed by more updates to libretro.cmake. It needs to be updated in the 3 occurrences in the before_script. The WiiU and Vita seems to be missing some os-time related lib, and I'm looking into it. |
|
NGC and Wii are failing because they require devkit to be added to path, so I added: WiiU is failing because of some python issue with UTC_TIME,.. so I just set python off only for it. I have also set JS of for dingux. All updated in the gist. |
Updated the URL for fetching libretro.cmake to a newer commit.
oh,.. that line required to be between quotes: before_script:
- export NUMPROC=$(($(nproc)/5))
- '[ -n "${DEVKITPPC:-}" ] && export PATH="$PATH:$DEVKITPPC/bin"' |
|
Drumrolls 😄 @@ -107,6 +107,13 @@
- build-shared
- build-static
+.js-patch:
+ before_script:
+ - export NUMPROC=$(($(nproc)/5))
+ - echo 'set(CMAKE_C_FLAGS_RELEASE "-DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
+ - export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake"
+ - sed -i 's|#include <fenv.h>|#if __has_include(<fenv.h>)\n#include <fenv.h>\n#endif|' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/vendor/quickjs/quickjs.c"
+
.core-some-32bits-system:
variables:
EXTRA_PATH: lib
@@ -117,6 +124,7 @@
echo 'set(CMAKE_C_FLAGS_RELEASE "-DLUA_32BITS -DTIC80_FFT_UNSUPPORTED -DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
echo 'set(CMAKE_CXX_FLAGS_RELEASE "-DLUA_32BITS" CACHE STRING "" FORCE)' >> build_flags.cmake
- export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake"
+ - sed -i 's|#include <fenv.h>|#if __has_include(<fenv.h>)\n#include <fenv.h>\n#endif|' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/vendor/quickjs/quickjs.c"
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
- |
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.11/cmake-3.31.11-linux-x86_64.sh -o cmake-install.sh
@@ Dingux @@
libretro-build-dingux-odbeta-mips32:
extends:
- .libretro-dingux-odbeta-cmake-mips32
- .core-defs
+ - .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
- CORE_ARGS_EXTRA: >
- -DBUILD_WITH_JS=OFF
# RetroFW
libretro-build-retrofw-mips32:
extends:
- .libretro-retrofw-odbeta-cmake-mips32
- .core-defs
+ - .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -march=mips32 -mtune=mips32r2 -mhard-float
- CORE_ARGS_EXTRA: >
- -DBUILD_WITH_JS=OFF
# MIYOO
libretro-build-miyoo-arm32:
extends:
- .libretro-miyoo-cmake-arm32
- .core-defs
+ - .js-patch
variables:
DINGUX_CFLAGS: -DDINGUX -fomit-frame-pointer -fno-fast-math -march=armv5te -mtune=arm926ej-s -ftree-vectorize -funswitch-loops
DINGUX_CXXFLAGS: -DDINGUX -fomit-frame-pointer -fno-fast-math -march=armv5te -mtune=arm926ej-s -ftree-vectorize -funswitch-loops
- CORE_ARGS_EXTRA: >
- -DBUILD_WITH_JS=OFF
# VITA
libretro-build-vita:
@@ -262,11 +267,11 @@
- .core-defs
variables:
EXTRA_PATH: lib
- CORE_ARGS_EXTRA: >
- -DBUILD_WITH_JS=OFF
before_script:
- export NUMPROC=$(($(nproc)/5))
- - export CORE_ARGS="${CORE_ARGS} -DCMAKE_POSITION_INDEPENDENT_CODE=OFF"
+ - echo 'set(CMAKE_C_FLAGS_RELEASE "-DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake
+ - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
+ - export CORE_ARGS="${CORE_ARGS} -DCMAKE_POSITION_INDEPENDENT_CODE=OFF -C ${CI_PROJECT_DIR}/build_flags.cmake"
# Libnx
libretro-build-libnx-aarch64:
@@ -279,6 +284,7 @@
- export NUMPROC=$(($(nproc)/5))
- curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake"
- sed -i '13,31 s/^/#/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/nswitch.cmake"
+ - sed -i 's/set(PREFER_SYSTEM_LIBRARIES ON)/set(PREFER_SYSTEM_LIBRARIES OFF)/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/CMakeLists.txt" |
Added .js-patch to various build configurations and adjusted CORE_ARGS.
|
Yay! It worked! :) It builds fine, I just do not know if it actually runs. I do not have any of the Nintendo devices to test on them. By the way, I think we could also add Another note on the |
| echo 'set(CMAKE_CXX_FLAGS_RELEASE "-DLUA_32BITS" CACHE STRING "" FORCE)' >> build_flags.cmake | ||
| - export CORE_ARGS="${CORE_ARGS} -C ${CI_PROJECT_DIR}/build_flags.cmake" | ||
| - sed -i 's|#include <fenv.h>|#if __has_include(<fenv.h>)\n#include <fenv.h>\n#endif|' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/vendor/quickjs/quickjs.c" | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" |
There was a problem hiding this comment.
Before this gets in, I'd prefer if the upstream PR gets in first: nesbox#2905
Selectively building off of forks can become a mess in some cases 😅
| before_script: | ||
| - export NUMPROC=$(($(nproc)/5)) | ||
| - echo 'set(CMAKE_C_FLAGS_RELEASE "-DPOOR_CLIB" CACHE STRING "" FORCE)' > build_flags.cmake | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" |
| EXTRA_PATH: lib | ||
| before_script: | ||
| - export NUMPROC=$(($(nproc)/5)) | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" |
| variables: | ||
| EXTRA_PATH: lib | ||
| before_script: | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" |
|
@imsys Brought in the latest changes, and I'm unsure if it will break everything. Mind having a look? |
| before_script: | ||
| - export NUMPROC=$(($(nproc)/5)) | ||
| - curl -L https://raw.githubusercontent.com/imsys/TIC-80/1fff1af2e33d71a586abdcac82cf3c3dbf881c49/cmake/libretro.cmake -o "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/libretro.cmake" | ||
| - sed -i '13,31 s/^/#/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/nswitch.cmake" |
There was a problem hiding this comment.
You can remove this line, this patch was already applied in nesbox#2891
There was a problem hiding this comment.
to be more clear, remove the - sed -i '13,31 s/^/#/' "$CI_PROJECT_DIR/$CMAKE_SOURCE_ROOT/cmake/nswitch.cmake"
There was a problem hiding this comment.
oh, nevermind, you are getting the commit "Bump miniaudio version" that is just one before this was applied.
There was a problem hiding this comment.
Think we should just merge this big change in, even though Nesbox hasn't merged your update?
There was a problem hiding this comment.
He has been away for about 40 days. I think we should just merge and later update it when he is back.
| - .libretro-webos-armv7a-cmake | ||
| - .core-defs | ||
| variables: | ||
| CORE_ARGS: "${CORE_ARGS} -DCMAKE_POLICY_VERSION_MINIMUM=3.5" |
There was a problem hiding this comment.
For the WebOS section, don't use CORE_ARGS, it has some unexpected behaviors when trying to overwrite. If you want to use it, use CORE_ARGS_EXTRA, but as the CMAKE_POLICY_VERSION_MINIMUM is already set, just remove it.
There was a problem hiding this comment.
| CORE_ARGS: "${CORE_ARGS} -DCMAKE_POLICY_VERSION_MINIMUM=3.5" | |
| CORE_ARGS_EXTRA: "${CORE_ARGS} -DCMAKE_POLICY_VERSION_MINIMUM=3.5" |
| variables: | ||
| CORE_ARGS: "${CORE_ARGS} -DCMAKE_POLICY_VERSION_MINIMUM=3.5" |
https://git.libretro.com/libretro/tic80/-/tree/revert-27-revert-26-update-tic80?ref_type=heads