mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
Android build issues fixed
(except i fixed the wrong stuff first...)
This commit is contained in:
13
build.ps1
13
build.ps1
@@ -220,14 +220,15 @@ if (-not $NoCpp -and -not $NoBuild) {
|
|||||||
Write-Step "NDK build (arm64-v8a)"
|
Write-Step "NDK build (arm64-v8a)"
|
||||||
# NDK r14b on Windows hits the 32K CreateProcess limit with long paths.
|
# NDK r14b on Windows hits the 32K CreateProcess limit with long paths.
|
||||||
# Work around it by building through a short junction C:\m -> repo root.
|
# Work around it by building through a short junction C:\m -> repo root.
|
||||||
$junctionBase = "C:\m"
|
# Use forward slashes in the build paths to prevent the NDK toolchain from stripping backslashes.
|
||||||
if (-not (Test-Path $junctionBase)) {
|
$junctionBase = "C:/m"
|
||||||
& cmd.exe /c "mklink /J `"$junctionBase`" `"$repo`"" | Out-Null
|
if (-not (Test-Path "C:\m")) {
|
||||||
|
& cmd.exe /c "mklink /J `"C:\m`" `"$repo`"" | Out-Null
|
||||||
}
|
}
|
||||||
Push-Location "$junctionBase\project\android\jni"
|
Push-Location "$junctionBase/project/android/jni"
|
||||||
$env:NDK_MODULE_PATH = "$junctionBase\project\lib_projects"
|
$env:NDK_MODULE_PATH = "$junctionBase/project/lib_projects"
|
||||||
# run ndk-build and capture everything; let user see full output for debugging
|
# run ndk-build and capture everything; let user see full output for debugging
|
||||||
$ndkOutput = & "$ndk\ndk-build.cmd" NDK_PROJECT_PATH="$junctionBase\project\android" APP_BUILD_SCRIPT="$junctionBase\project\android\jni\Android.mk" 2>&1 | Tee-Object -Variable ndkOutput
|
$ndkOutput = & "$ndk\ndk-build.cmd" NDK_PROJECT_PATH="$junctionBase/project/android" APP_BUILD_SCRIPT="$junctionBase/project/android/jni/Android.mk" 2>&1 | Tee-Object -Variable ndkOutput
|
||||||
# dump entire output for diagnosis
|
# dump entire output for diagnosis
|
||||||
Write-Host "---- NDK BUILD OUTPUT BEGIN ----"
|
Write-Host "---- NDK BUILD OUTPUT BEGIN ----"
|
||||||
$ndkOutput | ForEach-Object { Write-Host $_ }
|
$ndkOutput | ForEach-Object { Write-Host $_ }
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
# Convert Windows backslashes to forward slashes so NDK toolchain doesn’t treat them as escapes.
|
||||||
|
LOCAL_PATH := $(subst \,/,$(LOCAL_PATH))
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
@@ -12,6 +14,7 @@ LOCAL_SRC_FILES := ../../../src/main.cpp \
|
|||||||
../../../src/platform/input/Multitouch.cpp \
|
../../../src/platform/input/Multitouch.cpp \
|
||||||
../../../src/platform/time.cpp \
|
../../../src/platform/time.cpp \
|
||||||
../../../src/platform/CThread.cpp \
|
../../../src/platform/CThread.cpp \
|
||||||
|
../../../src/platform/HttpClient.cpp \
|
||||||
../../../src/NinecraftApp.cpp \
|
../../../src/NinecraftApp.cpp \
|
||||||
../../../src/Performance.cpp \
|
../../../src/Performance.cpp \
|
||||||
../../../src/SharedConstants.cpp \
|
../../../src/SharedConstants.cpp \
|
||||||
|
|||||||
@@ -2,4 +2,5 @@ APP_PLATFORM := android-21
|
|||||||
APP_STL := gnustl_static
|
APP_STL := gnustl_static
|
||||||
APP_OPTIM := release
|
APP_OPTIM := release
|
||||||
APP_ABI := arm64-v8a
|
APP_ABI := arm64-v8a
|
||||||
|
APP_SHORT_COMMANDS := true
|
||||||
#APP_ABI := armeabi-v7a x86
|
#APP_ABI := armeabi-v7a x86
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ void LocalPlayer::tick() {
|
|||||||
|
|
||||||
printf("armor %d: %d\n", i, a->getAuxValue());
|
printf("armor %d: %d\n", i, a->getAuxValue());
|
||||||
}
|
}
|
||||||
/**/
|
*/
|
||||||
|
|
||||||
updateArmorTypeHash();
|
updateArmorTypeHash();
|
||||||
#ifndef STANDALONE_SERVER
|
#ifndef STANDALONE_SERVER
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ void HumanoidMobRenderer::additionalRendering(Mob* mob, float a) {
|
|||||||
|
|
||||||
// Render player cape if available
|
// Render player cape if available
|
||||||
{
|
{
|
||||||
Player* player = dynamic_cast<Player*>(mob);
|
Player* player = Player::asPlayer(mob);
|
||||||
if (player) {
|
if (player) {
|
||||||
const std::string capeTex = player->getCapeTexture();
|
const std::string capeTex = player->getCapeTexture();
|
||||||
if (!capeTex.empty()) {
|
if (!capeTex.empty()) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
@@ -176,7 +177,9 @@ bool resolveAndConnect(const std::string& host, int port, int& outSock) {
|
|||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
|
|
||||||
const std::string portStr = std::to_string(port);
|
std::ostringstream portStream;
|
||||||
|
portStream << port;
|
||||||
|
const std::string portStr = portStream.str();
|
||||||
if (getaddrinfo(host.c_str(), portStr.c_str(), &hints, &result) != 0)
|
if (getaddrinfo(host.c_str(), portStr.c_str(), &hints, &result) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user