EasyRPG / buildscripts

The scripts used to compile needed libraries for supported platform ports on our Jenkins server
https://ci.easyrpg.org/view/Toolchains/
Other
16 stars 17 forks source link

Bump libraries / toolchains #144

Closed Ghabry closed 1 year ago

Ghabry commented 1 year ago

the typical bumping "fun"

Fix https://github.com/EasyRPG/Player/issues/2841

Ghabry commented 1 year ago

Something is broken with gamepads in Firefox:

The gamepadconnected/disconnected events in the shellfile receive gamepad events that do not have the "gamepad" field populated. Should add an undefined-check their.

Works fine in Chrome though.

Ghabry commented 1 year ago

Found the reason for the build error in 3ds and switch while testing this.

The library generated by dkp for the textures is a OBJECT library and I also moved to a OBJECT library. OBJECT depending on OBJECT is not automatically resolved as can result in build errors (same object file linked twice).

https://gitlab.kitware.com/cmake/cmake/-/issues/18682

Making this explicit solves it:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 030021b3..e9ee01c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -602,7 +602,9 @@ elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "3ds")
        OPTIONS -f rgba)
    dkp_add_embedded_binary_library(3ds-assets keyboard battery)
    target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
-   target_sources(${PROJECT_NAME} PRIVATE
+   target_link_libraries(${PROJECT_NAME} 3ds-assets)
+   target_sources(${PROJECT_NAME} INTERFACE
+       $<TARGET_OBJECTS:3ds-assets> PRIVATE
        src/platform/3ds/audio.cpp
        src/platform/3ds/audio.h
        src/platform/3ds/clock.cpp
@@ -610,7 +612,6 @@ elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "3ds")
        src/platform/3ds/input_buttons.cpp
        src/platform/3ds/ui.cpp
        src/platform/3ds/ui.h)
-   target_link_libraries(${PROJECT_NAME} 3ds-assets)
 elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "psvita")
    if(NOT VITA)
        message(FATAL_ERROR "Missing toolchain file! Use '-DCMAKE_TOOLCHAIN_FILE=$VITASDK/share/vita.toolchain.cmake' option.")
@@ -638,7 +639,8 @@ elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "switch")
    enable_language(ASM)
    dkp_add_embedded_binary_library(switch-assets "${CMAKE_CURRENT_SOURCE_DIR}/resources/switch/touch_ui.png")
    target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
-   target_sources(${PROJECT_NAME} PRIVATE
+   target_sources(${PROJECT_NAME} INTERFACE
+       $<TARGET_OBJECTS:switch-assets> PRIVATE
        src/platform/switch/audio.cpp
        src/platform/switch/audio.h
        src/platform/switch/clock.cpp
@@ -646,7 +648,6 @@ elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "switch")
        src/platform/switch/input_buttons.cpp
        src/platform/switch/ui.cpp
        src/platform/switch/ui.h)
-   target_link_libraries(${PROJECT_NAME} switch-assets)
 elseif(${PLAYER_TARGET_PLATFORM} STREQUAL "wii")
    if(NOT NINTENDO_WII)
        message(FATAL_ERROR "Missing toolchain file! Use '-DCMAKE_TOOLCHAIN_FILE=$DEVKITPRO/cmake/Wii.cmake' option.")

EDIT: The link_library line must stay for switch to fix a missing include.


macos build needs --disable-arm-a64-neon for pixman

Ghabry commented 1 year ago

thats now ready. When merged and recompiled https://github.com/EasyRPG/Player/pull/2863 can be tested