Merge pull request 'Update ARM GNU toolchain to version 12.3-rel1' (#64) from taylorthemushroom/minecraft-pi-reborn:master into master
Reviewed-on: minecraft-pi-reborn/minecraft-pi-reborn#64
This commit is contained in:
commit
fab66319ea
@ -1,11 +1,11 @@
|
|||||||
# Pick URL
|
# Pick URL
|
||||||
execute_process(COMMAND uname -m OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND uname -m OUTPUT_VARIABLE arch OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
if(arch STREQUAL "x86_64")
|
if(arch STREQUAL "x86_64")
|
||||||
set(toolchain_url "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf.tar.xz")
|
set(toolchain_url "https://developer.arm.com/-/media/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz")
|
||||||
set(toolchain_sha256 "aa074fa8371a4f73fecbd16bd62c8b1945f23289e26414794f130d6ccdf8e39c")
|
set(toolchain_sha256 "f5f3c1cfcb429833d363e8fec31bb1282974b119ca8169d6277ce8a549e26d54")
|
||||||
elseif(arch STREQUAL "aarch64" OR arch STREQUAL "armv8b" OR arch STREQUAL "armv8l")
|
elseif(arch STREQUAL "aarch64" OR arch STREQUAL "armv8b" OR arch STREQUAL "armv8l")
|
||||||
set(toolchain_url "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-aarch64-arm-none-linux-gnueabihf.tar.xz")
|
set(toolchain_url "https://developer.arm.com/-/media/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-aarch64-arm-none-linux-gnueabihf.tar.xz")
|
||||||
set(toolchain_sha256 "fccd7af76988da2b077f939eb2a78baa9935810918d2bf3f837bc74f52efa825")
|
set(toolchain_sha256 "ac2806f4c1ba772817aded18a5b730b5004592b1f1224d8296de69942e3704bd")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Unable To Download Prebuilt ARMHF Toolchain")
|
message(FATAL_ERROR "Unable To Download Prebuilt ARMHF Toolchain")
|
||||||
endif()
|
endif()
|
||||||
|
@ -14,14 +14,15 @@
|
|||||||
// Read Asset File
|
// Read Asset File
|
||||||
static AppPlatform_readAssetFile_return_value AppPlatform_readAssetFile_injection(__attribute__((unused)) unsigned char *app_platform, std::string const& path) {
|
static AppPlatform_readAssetFile_return_value AppPlatform_readAssetFile_injection(__attribute__((unused)) unsigned char *app_platform, std::string const& path) {
|
||||||
// Read File
|
// Read File
|
||||||
std::string full_path("data/");
|
std::ifstream stream("data/" + path, std::ios_base::binary | std::ios_base::ate);
|
||||||
full_path.append(path);
|
long len = stream.tellg();
|
||||||
std::ifstream stream(full_path);
|
char *buf = new char[len];
|
||||||
std::string str((std::istreambuf_iterator<char>(stream)), std::istreambuf_iterator<char>());
|
stream.seekg(0, stream.beg);
|
||||||
|
stream.read(buf, len);
|
||||||
// Return String
|
// Return String
|
||||||
AppPlatform_readAssetFile_return_value ret;
|
AppPlatform_readAssetFile_return_value ret;
|
||||||
ret.length = str.length();
|
ret.length = len;
|
||||||
ret.data = strdup(str.c_str());
|
ret.data = strdup(buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user