diff --git a/.ecode/project_build.json b/.ecode/project_build.json index 337a0c564..2e783344b 100644 --- a/.ecode/project_build.json +++ b/.ecode/project_build.json @@ -2,7 +2,7 @@ "ecode-linux": { "build": [ { - "args": "--disable-static-build --with-text-shaper gmake", + "args": "--disable-static-build gmake", "command": "premake4", "working_dir": "${project_root}" }, @@ -172,7 +172,7 @@ "eepp-linux": { "build": [ { - "args": "--disable-static-build --with-text-shaper --with-mold-linker --with-debug-symbols --address-sanitizer gmake", + "args": "--disable-static-build --with-mold-linker --with-debug-symbols --address-sanitizer gmake", "command": "premake4", "working_dir": "${project_root}" }, @@ -337,7 +337,7 @@ "eepp-linux-cmake": { "build": [ { - "args": "--disable-static-build --with-text-shaper cmake", + "args": "--disable-static-build cmake", "command": "premake5", "working_dir": "${project_root}" }, @@ -423,7 +423,7 @@ "eepp-linux-ninja": { "build": [ { - "args": "--disable-static-build --with-text-shaper --with-debug-symbols ninja", + "args": "--disable-static-build --with-debug-symbols ninja", "command": "premake5", "working_dir": "${project_root}" }, diff --git a/.github/workflows/eepp-linux-build-check.yml b/.github/workflows/eepp-linux-build-check.yml index 4c1ba2703..e2bd3cf3c 100644 --- a/.github/workflows/eepp-linux-build-check.yml +++ b/.github/workflows/eepp-linux-build-check.yml @@ -24,7 +24,7 @@ jobs: tar xvzf premake-5.0.0-beta6-linux.tar.gz - name: Build run: | - ./premake5 --with-text-shaper --disable-static-build gmake + ./premake5 --disable-static-build gmake cd make/linux make all -j$(nproc) -e config=release_x86_64 - name: Unit Tests diff --git a/.github/workflows/eepp-macos-build-check.yml b/.github/workflows/eepp-macos-build-check.yml index 9a207d736..bf01834a4 100644 --- a/.github/workflows/eepp-macos-build-check.yml +++ b/.github/workflows/eepp-macos-build-check.yml @@ -19,7 +19,7 @@ jobs: brew install wget SDL2 premake - name: Build run: | - premake5 --with-text-shaper --disable-static-build gmake + premake5 --disable-static-build gmake make -C make/macosx/ -e config=release_arm64 - name: Unit Tests run: | diff --git a/.github/workflows/eepp-windows-build-check.yml b/.github/workflows/eepp-windows-build-check.yml index 8db68298b..070ec1eed 100644 --- a/.github/workflows/eepp-windows-build-check.yml +++ b/.github/workflows/eepp-windows-build-check.yml @@ -28,7 +28,7 @@ jobs: - name: Create project shell: powershell run: | - ./premake5.exe --windows-vc-build --with-text-shaper --disable-static-build vs2022 + ./premake5.exe --windows-vc-build --disable-static-build vs2022 - name: Build shell: cmd run: | diff --git a/bin/assets/i18n/en.xml b/bin/assets/i18n/en.xml index d6fa3067f..6f9e02b67 100644 --- a/bin/assets/i18n/en.xml +++ b/bin/assets/i18n/en.xml @@ -394,7 +394,7 @@ Restart ecode to see the changes. Go To Line in Current Document gone Group - Treat .h files as C++ code. + Treat .h files as C++ code. Help Hide Hide tabbar on single tab diff --git a/premake4.lua b/premake4.lua index 6eb4ce0a1..2b63d5e44 100644 --- a/premake4.lua +++ b/premake4.lua @@ -166,7 +166,7 @@ newoption { trigger = "thread-sanitizer", description ="Compile with ThreadSanit newoption { trigger = "address-sanitizer", description = "Compile with AddressSanitizer." } newoption { trigger = "time-trace", description = "Compile with time trace." } newoption { trigger = "disable-static-build", description = "Disables eepp static build project, this is just a helper to avoid rebuilding twice eepp while developing the library." } -newoption { trigger = "with-text-shaper", description = "Enables text-shaping capabilities by relying on harfbuzz." } +newoption { trigger = "without-text-shaper", description = "Disables text-shaping capabilities." } newoption { trigger = "with-backend", description = "Select the backend to use for window and input handling.\n\t\t\tIf no backend is selected or if the selected is not installed the script will search for a backend present in the system, and will use it.", @@ -588,7 +588,7 @@ function build_link_configuration( package_name, use_ee_icon ) end end - if _OPTIONS["with-text-shaper"] then + if not _OPTIONS["without-text-shaper"] then defines { "EE_TEXT_SHAPER_ENABLED" } end @@ -746,7 +746,7 @@ function add_static_links() links { "freetype-static" } end - if _OPTIONS["with-text-shaper"] then + if not _OPTIONS["without-text-shaper"] then links { "harfbuzz-static", "SheenBidi-static" } includedirs { "src/thirdparty/SheenBidi/Headers" } defines { "EE_TEXT_SHAPER_ENABLED" } @@ -1259,7 +1259,7 @@ solution "eepp" includedirs { "src/thirdparty/oniguruma" } build_base_configuration( "oniguruma" ) - if _OPTIONS["with-text-shaper"] then + if not _OPTIONS["without-text-shaper"] then project "harfbuzz-static" kind "StaticLib" language "C++" diff --git a/premake5.lua b/premake5.lua index c381ab90e..83d515bcf 100644 --- a/premake5.lua +++ b/premake5.lua @@ -18,7 +18,7 @@ newoption { trigger = "thread-sanitizer", description = "Compile with ThreadSani newoption { trigger = "address-sanitizer", description = "Compile with AddressSanitizer." } newoption { trigger = "time-trace", description = "Compile with time tracing." } newoption { trigger = "disable-static-build", description = "Disables eepp static build project, this is just a helper to avoid rebuilding twice eepp while developing the library." } -newoption { trigger = "with-text-shaper", description = "Enables text-shaping capabilities by relying on harfbuzz." } +newoption { trigger = "without-text-shaper", description = "Disables text-shaping capabilities." } newoption { trigger = "with-backend", description = "Select the backend to use for window and input handling.\n\t\t\tIf no backend is selected or if the selected is not installed the script will search for a backend present in the system, and will use it.", @@ -386,7 +386,7 @@ function build_link_configuration( package_name, use_ee_icon ) end end - if _OPTIONS["with-text-shaper"] then + if not _OPTIONS["without-text-shaper"] then defines { "EE_TEXT_SHAPER_ENABLED" } end @@ -581,7 +581,7 @@ function add_static_links() links { "freetype-static" } end - if _OPTIONS["with-text-shaper"] then + if not _OPTIONS["without-text-shaper"] then links { "harfbuzz-static", "SheenBidi-static" } includedirs { "src/thirdparty/SheenBidi/Headers" } defines { "EE_TEXT_SHAPER_ENABLED" } @@ -1150,7 +1150,7 @@ workspace "eepp" incdirs { "src/thirdparty/oniguruma" } build_base_configuration( "oniguruma" ) - if _OPTIONS["with-text-shaper"] then + if not _OPTIONS["without-text-shaper"] then project "harfbuzz-static" kind "StaticLib" language "C++" diff --git a/projects/freebsd/ecode/build.app.sh b/projects/freebsd/ecode/build.app.sh index 2bc258992..69672a121 100755 --- a/projects/freebsd/ecode/build.app.sh +++ b/projects/freebsd/ecode/build.app.sh @@ -34,11 +34,11 @@ done CONFIG_NAME= if command -v premake5 &> /dev/null then - premake5 --with-text-shaper gmake || exit + premake5 gmake || exit CONFIG_NAME=release_x86_64 elif command -v premake4 &> /dev/null then - premake4 --with-text-shaper gmake || exit + premake4 gmake || exit CONFIG_NAME=release else echo "Neither premake5 nor premake4 is available. Please install one." diff --git a/projects/haiku/ecode/build.app.sh b/projects/haiku/ecode/build.app.sh index 13fa5445b..77eced5a3 100755 --- a/projects/haiku/ecode/build.app.sh +++ b/projects/haiku/ecode/build.app.sh @@ -3,7 +3,7 @@ CANONPATH=$(readlink -f "$0") DIRPATH="$(dirname "$CANONPATH")" cd "$DIRPATH" || exit cd ../../../ || exit -premake5 --with-text-shaper gmake +premake5 gmake cd make/haiku || exit make -j"$(nproc)" config=release_x86_64 ecode cd "$DIRPATH" || exit diff --git a/projects/linux/ecode/build.app.sh b/projects/linux/ecode/build.app.sh index e2dfee5fa..9dfb66553 100755 --- a/projects/linux/ecode/build.app.sh +++ b/projects/linux/ecode/build.app.sh @@ -43,11 +43,11 @@ fi CONFIG_NAME= if command -v premake4 &> /dev/null then - premake4 $DEBUG_SYMBOLS --with-text-shaper $STATIC_CPP gmake || exit + premake4 $DEBUG_SYMBOLS $STATIC_CPP gmake || exit CONFIG_NAME=release elif command -v premake5 &> /dev/null then - premake5 $DEBUG_SYMBOLS --with-text-shaper $STATIC_CPP gmake || exit + premake5 $DEBUG_SYMBOLS $STATIC_CPP gmake || exit CONFIG_NAME=release_"$ARCH" else echo "Neither premake5 nor premake4 is available. Please install one." diff --git a/projects/macos/ecode/cross.build.app.sh b/projects/macos/ecode/cross.build.app.sh index 182c6d72d..438858b49 100755 --- a/projects/macos/ecode/cross.build.app.sh +++ b/projects/macos/ecode/cross.build.app.sh @@ -22,7 +22,7 @@ done RESOURCES_PATH="ecode.app/Contents/Resources" -premake5 --file=../../../premake5.lua --disable-static-build --with-text-shaper --use-frameworks gmake || exit +premake5 --file=../../../premake5.lua --disable-static-build --use-frameworks gmake || exit make -C ../../../make/macosx/ -j$(sysctl -n hw.ncpu) -e verbose=true -e config=release_x86_64 ecode || exit diff --git a/projects/macos/make.sh b/projects/macos/make.sh index a438da43b..e6fb95133 100755 --- a/projects/macos/make.sh +++ b/projects/macos/make.sh @@ -4,10 +4,10 @@ cd $(dirname "$0") USE_ARCH= if command -v premake4 &> /dev/null then - premake4 --file=../../premake4.lua --use-frameworks --disable-static-build --with-text-shaper gmake + premake4 --file=../../premake4.lua --use-frameworks --disable-static-build gmake elif command -v premake5 &> /dev/null then - premake5 --file=../../premake5.lua --use-frameworks --disable-static-build --with-text-shaper gmake + premake5 --file=../../premake5.lua --use-frameworks --disable-static-build gmake USE_ARCH=arm64/ else echo "Neither premake5 nor premake4 is available. Please install one." diff --git a/projects/macos/make_no_fw.sh b/projects/macos/make_no_fw.sh index 39aa5bf80..bd143fb7b 100755 --- a/projects/macos/make_no_fw.sh +++ b/projects/macos/make_no_fw.sh @@ -4,10 +4,10 @@ cd $(dirname "$0") USE_ARCH= if command -v premake4 &> /dev/null then - premake4 --file=../../premake4.lua --disable-static-build --with-text-shaper gmake + premake4 --file=../../premake4.lua --disable-static-build gmake elif command -v premake5 &> /dev/null then - premake5 --file=../../premake5.lua --disable-static-build --with-text-shaper gmake + premake5 --file=../../premake5.lua --disable-static-build gmake USE_ARCH=arm64 else echo "Neither premake5 nor premake4 is available. Please install one." diff --git a/projects/mingw32/make.sh b/projects/mingw32/make.sh index 5c6ba16d2..a20a77ae8 100755 --- a/projects/mingw32/make.sh +++ b/projects/mingw32/make.sh @@ -52,7 +52,7 @@ elif [[ "$CONFIG" == *"arm64"* && "$(uname -m)" == "x86_64" ]]; then fi fi -PREMAKE5_ARGS="--file=../../premake5.lua --os=windows --cc=mingw --windows-mingw-build --with-text-shaper $PREMAKE5_ARCH gmake" +PREMAKE5_ARGS="--file=../../premake5.lua --os=windows --cc=mingw --windows-mingw-build $PREMAKE5_ARCH gmake" if command -v premake5 &> /dev/null then diff --git a/projects/windows/ecode/build.app.ps1 b/projects/windows/ecode/build.app.ps1 index 17b5234e7..d6c45e7f7 100644 --- a/projects/windows/ecode/build.app.ps1 +++ b/projects/windows/ecode/build.app.ps1 @@ -20,7 +20,7 @@ $archSuffix = if ($isArm64) { "arm64" } else { "x86_64" } $premakeExtra = if ($isArm64) { "--arch=arm64" } else { "" } $msbuildPlat = if ($isArm64) { "ARM64" } else { "x64" } -& $premakeCmd --windows-vc-build --with-text-shaper $(if ($premakeExtra) { $premakeExtra }) --disable-static-build vs2022 +& $premakeCmd --windows-vc-build $(if ($premakeExtra) { $premakeExtra }) --disable-static-build vs2022 & "$env:MSBUILD_PATH/MSBuild.exe" .\make\windows\eepp.sln -m /t:ecode /p:Platform=$msbuildPlat /p:Configuration=release .\projects\scripts\copy_ecode_assets.ps1 .\bin .\projects\windows\ecode\ecode diff --git a/src/eepp/graphics/fonttruetype.cpp b/src/eepp/graphics/fonttruetype.cpp index 784bbfeca..f151bc721 100644 --- a/src/eepp/graphics/fonttruetype.cpp +++ b/src/eepp/graphics/fonttruetype.cpp @@ -1601,7 +1601,7 @@ bool FontTrueType::isIdentifiedAsMonospace() const { } bool FontTrueType::isScalable() const { - return FT_IS_SCALABLE( static_cast( mFace ) ); + return mFace ? FT_IS_SCALABLE( static_cast( mFace ) ) : false; } bool FontTrueType::isEmojiFont() const { diff --git a/src/eepp/system/sys.cpp b/src/eepp/system/sys.cpp index 30a49057e..f64295856 100644 --- a/src/eepp/system/sys.cpp +++ b/src/eepp/system/sys.cpp @@ -836,7 +836,7 @@ std::string Sys::getConfigPath( const std::string& appname ) { } std::string Sys::getTempPath() { - char path[EE_MAX_CFG_PATH_LEN]; + char path[EE_MAX_CFG_PATH_LEN + 1]; #if EE_PLATFORM == EE_PLATFORM_WIN DWORD dwRetVal = GetTempPathA( EE_MAX_CFG_PATH_LEN, path );