Fix ARM32 Support
All checks were successful
minecraft-pi-reborn/pipeline/head This commit looks good

This commit is contained in:
TheBrokenRail 2022-03-12 22:52:58 -05:00
parent e319d46ea0
commit 9f63fa712f
7 changed files with 36 additions and 16 deletions

@ -1 +1 @@
Subproject commit 4663a8656d8c12be00286ee10aae2ff55ff589af
Subproject commit b01f0001eae0b01f9de2bba3d1b93c386b298c0d

View File

@ -25,7 +25,11 @@ char *get_full_library_search_path() {
}
// Interpret
if (str.size() >= 2 && str[0] != '\t' && str[str.size() - 1] == ':') {
output.append(str);
// Blacklist RPI Legacy GL Drivers
#define RPI_LEGACY_GL_PATH "/opt/vc"
if (str.rfind(RPI_LEGACY_GL_PATH ":", 0) != 0 && str.rfind(RPI_LEGACY_GL_PATH "/", 0) != 0) {
output.append(str);
}
}
} else {
running = 0;
@ -37,8 +41,10 @@ char *get_full_library_search_path() {
output.pop_back();
}
// Close Process
int ret = WEXITSTATUS(pclose(file));
if (ret != 0) {
int ret = pclose(file);
if (ret == -1) {
ERR("ldconfig Failed: %s", strerror(errno));
} else if (ret != 0) {
ERR("ldconfig Failed: Exit Code: %i", ret);
}
// Return

View File

@ -1,6 +1,6 @@
project(media-layer-stubs)
# Add GLES Stubs For Linking
# Add GLES1 Stubs For Linking
add_library(GLESv1_CM SHARED src/GLESv1_CM.c)
target_link_libraries(GLESv1_CM media-layer-headers)
set_target_properties(GLESv1_CM PROPERTIES SOVERSION "1")
@ -27,17 +27,11 @@ if(BUILD_ARM_COMPONENTS)
install(TARGETS EGL X11 DESTINATION "${MCPI_FALLBACK_LIB_DIR}") # Place At The End Of LD_LIBRARY_PATH
endif()
# Install GLESv1_CM Stubs In Server Mode
# Install Fake GLESv1_CM Stubs In Server Mode
if(MCPI_HEADLESS_MODE)
install(TARGETS GLESv1_CM DESTINATION "${MCPI_LIB_DIR}")
endif()
# MCPI Depends On GLESv2, But Uses GLESv1_CM
install_symlink("libGLESv1_CM.so.1" "${MCPI_LIB_DIR}/libGLESv2.so")
# Prevent MCPI From Linking To The Legacy GL Driver When Directly Linking To GL (RPI-Specific)
if(NOT MCPI_HEADLESS_MODE AND NOT MCPI_USE_MEDIA_LAYER_PROXY)
# Symlinks
install_symlink("/usr/lib/arm-linux-gnueabihf/libEGL.so.1" "${MCPI_LIB_DIR}/libEGL.so")
install_symlink("/usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so.1" "${MCPI_LIB_DIR}/libGLESv1_CM.so.1")
endif()
# Redirect MCPI To Correct Libraries
add_subdirectory(redirect)
endif()

View File

@ -0,0 +1,18 @@
project(media-layer-stubs-redirect)
# MCPI Depends On GLESv2, But Uses GLESv1_CM
add_library(GLESv2_redirect SHARED src/nop.c)
target_link_libraries(GLESv2_redirect GLESv1_CM)
target_link_options(GLESv2_redirect PRIVATE "-Wl,--no-as-needed")
set_target_properties(GLESv2_redirect PROPERTIES OUTPUT_NAME "GLESv2")
install(TARGETS GLESv2_redirect DESTINATION "${MCPI_LIB_DIR}")
# MCPI links to libEGL.so instead of libEGL.so.1, this creates a fake libEGL.so which redirects it to the correct libEGL.so.1.
# This is only needed on configurations that don't generate their own libEGL.so.
if(NOT MCPI_HEADLESS_MODE AND NOT MCPI_USE_MEDIA_LAYER_PROXY)
add_library(EGL_redirect SHARED src/nop.c)
target_link_libraries(EGL_redirect EGL)
target_link_options(EGL_redirect PRIVATE "-Wl,--no-as-needed")
set_target_properties(EGL_redirect PROPERTIES OUTPUT_NAME "EGL")
install(TARGETS EGL_redirect DESTINATION "${MCPI_LIB_DIR}")
endif()

View File

@ -23,7 +23,6 @@ const version = fs.readFileSync('VERSION', 'utf8').trim();
// Packages/Dependencies
const packages = [
'libc6',
'libc-bin',
'libstdc++6'
];
if (mode === 'client') {
@ -132,7 +131,9 @@ const runtime = {
`usr/lib/${name}/minecraft-pi`,
`usr/lib/${name}/**/*.so`,
'usr/arm-linux-gnueabihf/lib'
] : undefined
] : undefined,
// libapprun_hooks.so Is Buggy And Unneeded
no_hooks: true
};
// AppDir

View File

@ -88,6 +88,7 @@ fi
queue_pkg \
python3-pip \
python3-setuptools \
python3-wheel \
patchelf \
desktop-file-utils \
libgdk-pixbuf2.0-dev \