tic-80: 2022-01-18 -> 2022-10-26

Though, it is not really usable. There's always time to fix it later :)
This commit is contained in:
Gabriel Arazas 2022-10-26 17:25:52 +08:00
parent 9e1f14a10b
commit ade16bf435
2 changed files with 62 additions and 80 deletions

View File

@ -1,10 +1,10 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 35a60dc..43b044f 100644
index 964a44d..3ae22ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -247,13 +247,13 @@ if(NOT RAKE)
endif()
@@ -262,13 +262,13 @@ message("BUILD_WITH_MRUBY: ${BUILD_WITH_MRUBY}")
if(BUILD_WITH_MRUBY)
set(MRUBY_BUILDDIR ${CMAKE_SOURCE_DIR}/build/mruby)
- set(MRUBY_DIR ${THIRDPARTY_DIR}/mruby)
+ set(MRUBY_DIR @mruby@)
@ -18,7 +18,7 @@ index 35a60dc..43b044f 100644
if(MSVC)
set(MRUBY_TOOLCHAIN visualcpp)
@@ -271,26 +271,6 @@ if(ANDROID_NDK_HOME)
@@ -286,26 +286,6 @@ if(BUILD_WITH_MRUBY)
set(MRUBY_RAKE_EXTRA_OPTS "${MRUBY_RAKE_EXTRA_OPTS} ANDROID_NDK_HOME=${ANDROID_NDK_HOME}")
endif()
@ -45,31 +45,11 @@ index 35a60dc..43b044f 100644
add_library(mruby STATIC IMPORTED GLOBAL)
set_property(TARGET mruby APPEND
PROPERTY IMPORTED_LOCATION ${MRUBY_LIB}
@@ -298,7 +278,6 @@ set_property(TARGET mruby APPEND
@@ -313,7 +293,6 @@ if(BUILD_WITH_MRUBY)
set_property(TARGET mruby APPEND
PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${MRUBY_DIR}/include
)
- add_dependencies(mruby mruby_vendor)
endif()
################################
# SQUIRREL
@@ -1055,6 +1034,19 @@ if(BUILD_SOKOL)
target_link_options(tic80-sokol PRIVATE -static -mconsole)
endif()
+ if(LINUX)
+ configure_file("${PROJECT_SOURCE_DIR}/build/linux/tic80.desktop.in" "${PROJECT_SOURCE_DIR}/build/linux/tic80.desktop")
+
+ install(TARGETS tic80-sokol DESTINATION bin)
+
+ SET(TIC80_DESKTOP_DIR "share/applications/")
+ SET(TIC80_PIXMAPS_DIR "share/icons/")
+
+ install (FILES ${PROJECT_SOURCE_DIR}/build/linux/tic80.desktop DESTINATION ${TIC80_DESKTOP_DIR})
+ install (FILES ${PROJECT_SOURCE_DIR}/build/linux/tic80.xml DESTINATION ${TIC80_DESKTOP_DIR})
+ install (FILES ${PROJECT_SOURCE_DIR}/build/linux/tic80.png DESTINATION ${TIC80_PIXMAPS_DIR})
+ endif()
+
target_link_libraries(tic80-sokol tic80studio sokol)
endif()

View File

@ -3,20 +3,23 @@
# how.
{ stdenv
, lib
, SDL2
, alsaLib
, cmake
, fetchFromGitHub
, freeglut
, gtk3
, libGLU
, git
, gtk3
, dbus
, libGLU
, libX11
, libstdcxx5
, libglvnd
, mesa
, SDL2
, pkg-config
, valgrind
, sndio
, libsamplerate
, mesa
, pkg-config
, sndio
, valgrind
, zlib
, pulseaudioSupport ? stdenv.isLinux
, libpulseaudio
@ -33,16 +36,15 @@
}:
# TODO: Fix the timestamp in the help section.
# TODO: Wait for SDL v2.0.18 for more Wayland support?
stdenv.mkDerivation rec {
pname = "tic-80";
version = "unstable-2022-01-18";
version = "unstable-2022-10-26";
src = fetchFromGitHub {
owner = "nesbox";
repo = "TIC-80";
rev = "06fde1279677273856c1daf9f2fa22e337daba3d";
sha256 = "sha256-qFjcxb/umrr6CT7yorWCkoDskmKCsMm9frceyF6lXjE=";
rev = "7f4ad780d75d2cd8446f856f85ba293af70530eb";
sha256 = "sha256-8ciBya9ismBQ27JFQr3Qsk72UvHA1vMEExSwGNk3iOk=";
fetchSubmodules = true;
};
@ -78,7 +80,7 @@ stdenv.mkDerivation rec {
];
# TODO: Replace SOKOL-built version with SDL.
cmakeFlags = [ "-DBUILD_PRO=ON" "-DBUILD_SDL=OFF" "-DBUILD_SOKOL=ON" ];
cmakeFlags = [ "-DBUILD_PRO=ON" ];
# Export all of the TIC-80-related utilities.
outputs = [ "out" "dev" ];
@ -89,7 +91,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/share/tic80
cp -r ../demos $out/share/tic80/
mv $out/bin/tic80{-sokol,}
patchelf --set-rpath ${lib.makeLibraryPath [ libstdcxx5 libX11 dbus ]} $out/bin/tic80
'';
meta = with lib; {