mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-28 17:16:29 +03:00
Fix Linux x86_64 nightly build.
Fix and set up to date Android builds.
This commit is contained in:
10
.github/workflows/ecode-nightly.yml
vendored
10
.github/workflows/ecode-nightly.yml
vendored
@@ -70,9 +70,19 @@ jobs:
|
||||
run: |
|
||||
sudo add-apt-repository -y universe
|
||||
sudo add-apt-repository -y multiverse
|
||||
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y gcc-11 g++-11
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10
|
||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 10
|
||||
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
|
||||
sudo update-alternatives --set cc /usr/bin/gcc
|
||||
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
|
||||
sudo update-alternatives --set c++ /usr/bin/g++
|
||||
sudo update-alternatives --config gcc
|
||||
sudo update-alternatives --config g++
|
||||
sudo apt-get install -y libfuse2 fuse premake4 mesa-common-dev libgl1-mesa-dev
|
||||
bash projects/linux/scripts/install_sdl2.sh
|
||||
- name: Build ecode
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <eepp/config.hpp>
|
||||
|
||||
namespace EE {
|
||||
using ios_size = long;
|
||||
using ios_size = long long;
|
||||
}
|
||||
|
||||
namespace EE { namespace System {
|
||||
|
||||
@@ -13,11 +13,11 @@ def getProcessesCountArg() {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 33
|
||||
buildToolsVersion "33.0.0"
|
||||
namespace "com.ensoft.eepp"
|
||||
defaultConfig {
|
||||
applicationId "com.ensoft.eepp"
|
||||
minSdk 27
|
||||
compileSdk 34
|
||||
targetSdkVersion 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
@@ -33,7 +33,8 @@ android {
|
||||
}
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
flavorDimensions "eepp"
|
||||
flavorDimensions += "eepp"
|
||||
buildFeatures { buildConfig true }
|
||||
productFlavors {
|
||||
ecode {
|
||||
buildConfigField "String", "SO_NAME", "\"ecode\""
|
||||
@@ -99,14 +100,14 @@ android {
|
||||
path 'jni/Android.mk'
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
ndkVersion '25.1.8937393'
|
||||
ndkVersion "27.2.12479018"
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -62,6 +62,7 @@ LOCAL_C_INCLUDES := $(EEPP_C_INCLUDES)
|
||||
CORE_SRCS := tools/ecode/*.cpp \
|
||||
tools/ecode/plugins/*.cpp \
|
||||
tools/ecode/plugins/autocomplete/*.cpp \
|
||||
tools/ecode/plugins/git/*.cpp \
|
||||
tools/ecode/plugins/linter/*.cpp \
|
||||
tools/ecode/plugins/formatter/*.cpp \
|
||||
tools/ecode/plugins/lsp/*.cpp \
|
||||
|
||||
@@ -22,6 +22,7 @@ EEPP_C_INCLUDES := \
|
||||
$(EEPP_THIRD_PARTY_PATH)/libogg/include \
|
||||
$(EEPP_THIRD_PARTY_PATH)/mbedtls/include \
|
||||
$(EEPP_THIRD_PARTY_PATH)/mojoAL \
|
||||
$(EEPP_THIRD_PARTY_PATH)/pcre2/src \
|
||||
$(EEPP_THIRD_PARTY_PATH)/efsw/include \
|
||||
$(EEPP_BASE_PATH)/modules/eterm/include \
|
||||
$(EEPP_BASE_PATH)/modules/eterm/src \
|
||||
@@ -45,7 +46,9 @@ EEPP_C_FLAGS := \
|
||||
-D$(EE_SDL_VERSION) \
|
||||
-DAL_LIBTYPE_STATIC \
|
||||
-I$(EEPP_INC_PATH) \
|
||||
-I$(EEPP_BASE_PATH)
|
||||
-I$(EEPP_BASE_PATH) \
|
||||
-DPCRE2_STATIC \
|
||||
-DPCRE2_CODE_UNIT_WIDTH=8
|
||||
|
||||
EEPP_LDLIBS := $(APP_LDLIBS)
|
||||
|
||||
@@ -99,7 +102,7 @@ LOCAL_C_INCLUDES := $(EEPP_C_INCLUDES)
|
||||
|
||||
LOCAL_SRC_FILES := $(foreach F, $(CODE_SRCS), $(addprefix $(dir $(F)),$(notdir $(wildcard $(LOCAL_PATH)/$(F)))))
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := freetype libpng
|
||||
LOCAL_STATIC_LIBRARIES := freetype libpng pcre2 harfbuzz
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := SDL2
|
||||
|
||||
@@ -170,6 +173,66 @@ LOCAL_SRC_FILES := $(foreach F, $(LIBPNG_SRCS), $(addprefix $(dir $(F)),$(notd
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
#*************** LIBPNG ***************
|
||||
|
||||
#**************** PCRE2 ***************
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_PATH := $(EEPP_THIRD_PARTY_PATH)
|
||||
|
||||
LOCAL_MODULE := pcre2
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/pcre2/src
|
||||
LOCAL_CFLAGS := -Os -DHAVE_CONFIG_H -DPCRE2_STATIC -DPCRE2_CODE_UNIT_WIDTH=8
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
pcre2/src/pcre2_auto_possess.c \
|
||||
pcre2/src/pcre2_chartables.c \
|
||||
pcre2/src/pcre2_chkdint.c \
|
||||
pcre2/src/pcre2_compile.c \
|
||||
pcre2/src/pcre2_config.c \
|
||||
pcre2/src/pcre2_context.c \
|
||||
pcre2/src/pcre2_convert.c \
|
||||
pcre2/src/pcre2_dfa_match.c \
|
||||
pcre2/src/pcre2_error.c \
|
||||
pcre2/src/pcre2_extuni.c \
|
||||
pcre2/src/pcre2_find_bracket.c \
|
||||
pcre2/src/pcre2_maketables.c \
|
||||
pcre2/src/pcre2_match.c \
|
||||
pcre2/src/pcre2_match_data.c \
|
||||
pcre2/src/pcre2_newline.c \
|
||||
pcre2/src/pcre2_ord2utf.c \
|
||||
pcre2/src/pcre2_pattern_info.c \
|
||||
pcre2/src/pcre2_script_run.c \
|
||||
pcre2/src/pcre2_serialize.c \
|
||||
pcre2/src/pcre2_string_utils.c \
|
||||
pcre2/src/pcre2_study.c \
|
||||
pcre2/src/pcre2_substitute.c \
|
||||
pcre2/src/pcre2_substring.c \
|
||||
pcre2/src/pcre2_tables.c \
|
||||
pcre2/src/pcre2_ucd.c \
|
||||
pcre2/src/pcre2_valid_utf.c \
|
||||
pcre2/src/pcre2_xclass.c \
|
||||
pcre2/src/pcre2_jit_compile.c
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
#**************** PCRE2 ***************
|
||||
|
||||
#*************** HARFBUZZ *************
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_PATH := $(EEPP_THIRD_PARTY_PATH)
|
||||
|
||||
LOCAL_MODULE := harfbuzz
|
||||
|
||||
HARFBUZZ_SRCS := harfbuzz/**.cc
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/harfbuzz/
|
||||
LOCAL_CFLAGS := -Os -DHAVE_CONFIG_H -I$(LOCAL_PATH)/freetype2/include
|
||||
|
||||
LOCAL_SRC_FILES := $(foreach F, $(HARFBUZZ_SRCS), $(addprefix $(dir $(F)),$(notdir $(wildcard $(LOCAL_PATH)/$(F)))))
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
#*************** HARFBUZZ *************
|
||||
|
||||
#**************** SDL 2 ***************
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.4.0'
|
||||
classpath 'com.android.tools.build:gradle:8.4.2'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/sh
|
||||
adb devices
|
||||
adb devices || exit
|
||||
|
||||
cd $(dirname "$0")
|
||||
cd "$(dirname "$0")" || exit
|
||||
|
||||
./assets.sh
|
||||
./assets.sh || exit
|
||||
|
||||
./gradlew build
|
||||
./gradlew build || exit
|
||||
|
||||
adb install -r app/build/outputs/apk/debug/app-debug.apk
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#Tue Oct 22 20:55:49 ART 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -14,6 +14,14 @@
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
#if __GNUC__ >= 11 || ( __clang__ && __clang_major__ >= 12 )
|
||||
#define STD_SUPPORTS_FIXED_TO_CHARS
|
||||
#endif
|
||||
|
||||
#ifndef STD_SUPPORTS_FIXED_TO_CHARS
|
||||
#include <sstream>
|
||||
#endif
|
||||
|
||||
namespace EE {
|
||||
|
||||
template <typename T> static bool _fromString( T& t, const std::string& s, int base = 10 ) {
|
||||
@@ -55,9 +63,15 @@ template <typename T> static bool _fromString( T& t, const std::string& s, int b
|
||||
template <class T> static std::string _toString( const T& value, size_t digitsAfterComma = 2 ) {
|
||||
char buffer[32];
|
||||
if constexpr ( (std::is_same_v<T, float> || std::is_same_v<T, double>)) {
|
||||
#ifdef STD_SUPPORTS_FIXED_TO_CHARS
|
||||
auto [ptr, ec] = std::to_chars( buffer, buffer + sizeof( buffer ), value,
|
||||
std::chars_format::fixed, digitsAfterComma );
|
||||
return ec == std::errc() ? std::string( buffer, ptr ) : std::string{};
|
||||
#else
|
||||
std::ostringstream ss;
|
||||
ss << std::fixed << value;
|
||||
return ss.str();
|
||||
#endif
|
||||
} else {
|
||||
auto [ptr, ec] = std::to_chars( buffer, buffer + sizeof( buffer ), value );
|
||||
return ec == std::errc() ? std::string( buffer, ptr ) : std::string{};
|
||||
|
||||
@@ -265,7 +265,7 @@ bool Pak::addFile( const Uint8* data, const Uint32& dataSize, const std::string&
|
||||
|
||||
// Update the new pakEntrys on pakFile
|
||||
mPak.fs->write( reinterpret_cast<const char*>( &pakE[0] ),
|
||||
( std::streamsize )( sizeof( pakEntry ) * pakE.size() ) );
|
||||
(ios_size)( sizeof( pakEntry ) * pakE.size() ) );
|
||||
|
||||
mPakFiles.push_back( pakE[mPak.pakFilesNum] );
|
||||
mPak.pakFilesNum += 1;
|
||||
@@ -357,12 +357,11 @@ bool Pak::eraseFiles( const std::vector<std::string>& paths ) {
|
||||
if ( extractFileToMemory( std::string( uEntry[i].filename ), data ) ) {
|
||||
uEntry[i].file_position = nPf.fs->tell();
|
||||
uEntry[i].file_length = (Uint32)data.size();
|
||||
nPf.fs->write( reinterpret_cast<const char*>( &data[0] ),
|
||||
(std::streamsize)data.size() );
|
||||
nPf.fs->write( reinterpret_cast<const char*>( &data[0] ), (ios_size)data.size() );
|
||||
}
|
||||
|
||||
nPf.fs->write( reinterpret_cast<const char*>( &uEntry[0] ),
|
||||
( std::streamsize )( sizeof( pakEntry ) * uEntry.size() ) );
|
||||
(ios_size)( sizeof( pakEntry ) * uEntry.size() ) );
|
||||
|
||||
eeSAFE_DELETE( nPf.fs );
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ SDL_ANDROID_SensorOpen(SDL_Sensor *sensor, int device_index)
|
||||
sensor->hwdata = hwdata;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor)
|
||||
{
|
||||
@@ -162,7 +162,7 @@ SDL_ANDROID_SensorUpdate(SDL_Sensor *sensor)
|
||||
ASensorEvent event;
|
||||
struct android_poll_source* source;
|
||||
|
||||
if (ALooper_pollAll(0, NULL, &events, (void**)&source) == LOOPER_ID_USER) {
|
||||
if (ALooper_pollOnce(0, NULL, &events, (void **)&source) == LOOPER_ID_USER) {
|
||||
SDL_zero(event);
|
||||
while (ASensorEventQueue_getEvents(sensor->hwdata->eventqueue, &event, 1) > 0) {
|
||||
SDL_PrivateSensorUpdate(sensor, event.data, SDL_arraysize(event.data));
|
||||
|
||||
2
src/thirdparty/imageresampler/resampler.cpp
vendored
2
src/thirdparty/imageresampler/resampler.cpp
vendored
@@ -330,7 +330,7 @@ static double bessel0(double x)
|
||||
return sum;
|
||||
}
|
||||
|
||||
static const Resample_Real KAISER_ALPHA = 4.0;
|
||||
//static const Resample_Real KAISER_ALPHA = 4.0;
|
||||
static double kaiser(double alpha, double half_width, double x)
|
||||
{
|
||||
const double ratio = (x / half_width);
|
||||
|
||||
2
src/thirdparty/pcre2/src/config.h
vendored
2
src/thirdparty/pcre2/src/config.h
vendored
@@ -319,7 +319,7 @@ sure both macros are undefined; an emulation function will then be used. */
|
||||
/* Define to any non-zero number to enable support for SELinux compatible
|
||||
executable memory allocator in JIT. Note that this will have no effect
|
||||
unless SUPPORT_JIT is also defined. */
|
||||
#if defined( linux ) || defined( __linux__ ) || defined( __ANDROID__ ) || defined( ANDROID )
|
||||
#if (defined( linux ) || defined( __linux__ )) && !(defined( __ANDROID__ ) || defined( ANDROID ))
|
||||
#define SLJIT_PROT_EXECUTABLE_ALLOCATOR 1
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user