diff --git a/CMakeLists.txt b/CMakeLists.txt index e84b7155f..3371110d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -476,6 +476,7 @@ if(APPLE) ${CMAKE_CURRENT_SOURCE_DIR}/external/gettext/gettext-runtime/intl ${CMAKE_CURRENT_SOURCE_DIR}/external/libgit2/include ${CMAKE_CURRENT_SOURCE_DIR}/external/harfbuzz/src + ${CMAKE_CURRENT_SOURCE_DIR}/external/icu/icu4c/source/common ${CMAKE_CURRENT_SOURCE_DIR}/external/pugixml/src ${CMAKE_CURRENT_SOURCE_DIR}/external/SDL) elseif(WIN32) @@ -554,6 +555,9 @@ if(APPLE) ${PROJECT_SOURCE_DIR}/libfreetype.6.dylib ${PROJECT_SOURCE_DIR}/libgit2.1.7.dylib ${PROJECT_SOURCE_DIR}/libharfbuzz.dylib + ${PROJECT_SOURCE_DIR}/libicudata.75.dylib + ${PROJECT_SOURCE_DIR}/libicui18n.75.dylib + ${PROJECT_SOURCE_DIR}/libicuuc.75.dylib ${PROJECT_SOURCE_DIR}/libintl.8.dylib ${PROJECT_SOURCE_DIR}/libpugixml.a ${PROJECT_SOURCE_DIR}/libSDL2-2.0.0.dylib) diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index 2d0de13bd..5f42c9b25 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -241,6 +241,12 @@ elseif(APPLE) PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libharfbuzz.dylib PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libicudata.75.dylib + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libicui18n.75.dylib + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) + install(FILES ${CMAKE_SOURCE_DIR}/libicuuc.75.dylib + PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libintl.8.dylib PERMISSIONS ${APPLE_DYLIB_PERMISSIONS} DESTINATION ../MacOS) install(FILES ${CMAKE_SOURCE_DIR}/libjpeg.62.dylib diff --git a/tools/macOS_dependencies_build.sh b/tools/macOS_dependencies_build.sh index 4272314b5..5e802bafc 100755 --- a/tools/macOS_dependencies_build.sh +++ b/tools/macOS_dependencies_build.sh @@ -29,10 +29,11 @@ if [ ! -d FFmpeg ]; then exit fi -echo "Building all dependencies in the ./external directory...\n" +echo "Building all dependencies in the ./external directory..." export PKG_CONFIG_PATH=$(pwd)/../local_install/lib/pkgconfig +echo echo "Building libiconv" if [ ! -d libiconv ]; then @@ -48,6 +49,7 @@ make -j${JOBS} make install cd .. +echo echo "Building gettext" if [ ! -d gettext ]; then @@ -68,6 +70,31 @@ cd ../../../ make install cd .. +echo +echo "Building ICU" + +if [ ! -d icu/icu4c ]; then + echo "icu/icu4c directory is missing, aborting." + exit +fi + +cd icu/icu4c/source +./configure --disable-extras --disable-icuio --disable-samples --disable-tests +make clean +make -j${JOBS} +cd lib +install_name_tool -id "@rpath/libicudata.75.dylib" libicudata.75.1.dylib +install_name_tool -id "@rpath/libicui18n.75.dylib" libicui18n.75.1.dylib +install_name_tool -change $(otool -L libicui18n.75.1.dylib | grep libicuuc | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libicuuc.75.dylib libicui18n.75.1.dylib +install_name_tool -change $(otool -L libicui18n.75.1.dylib | grep libicudata | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libicudata.75.dylib libicui18n.75.1.dylib +install_name_tool -id "@rpath/libicuuc.75.dylib" libicuuc.75.1.dylib +install_name_tool -change $(otool -L libicuuc.75.1.dylib | grep libicudata | cut -f1 -d' ' | sed 's/[[:blank:]]//g') @rpath/libicudata.75.dylib libicuuc.75.1.dylib +cp libicudata.75.1.dylib ../../../../../libicudata.75.dylib +cp libicui18n.75.1.dylib ../../../../../libicui18n.75.dylib +cp libicuuc.75.1.dylib ../../../../../libicuuc.75.dylib +cd ../../../../ + +echo echo "Building libpng" if [ ! -d libpng ]; then @@ -88,7 +115,7 @@ make install cd .. echo -echo "\nBuilding HarfBuzz" +echo "Building HarfBuzz" if [ ! -d harfbuzz/build ]; then echo "harfbuzz directory is missing, aborting." @@ -104,7 +131,7 @@ cp libharfbuzz.dylib ../../../ cd ../.. echo -echo "\nBuilding FreeType" +echo "Building FreeType" if [ ! -d freetype/build ]; then echo "FreeType directory is missing, aborting." @@ -217,7 +244,7 @@ cp cpp/libpoppler-cpp.0.11.0.dylib ../../../libpoppler-cpp.0.dylib cd ../.. echo -echo "\nBuilding FreeImage" +echo "Building FreeImage" if [ ! -d freeimage/FreeImage ]; then echo "FreeImage directory is missing, aborting." @@ -231,7 +258,7 @@ cp libfreeimage.a ../../.. cd ../.. echo -echo "\nBuilding libgit2" +echo "Building libgit2" if [ ! -d libgit2/build ]; then echo "libgit2 directory is missing, aborting." @@ -247,7 +274,7 @@ cp libgit2.1.7.1.dylib ../../../libgit2.1.7.dylib cd ../.. echo -echo "\nBuilding pugixml" +echo "Building pugixml" if [ ! -d pugixml ]; then echo "pugixml directory is missing, aborting." @@ -263,7 +290,7 @@ cp libpugixml.a ../.. cd .. echo -echo "\nBuilding SDL" +echo "Building SDL" if [ ! -d SDL/build ]; then echo "SDL directory is missing, aborting." @@ -279,7 +306,7 @@ cp libSDL2-2.0.0.dylib ../../.. cd ../.. echo -echo "\nBuilding libvpx" +echo "Building libvpx" if [ ! -d libvpx ]; then echo "libvpx directory is missing, aborting." @@ -294,7 +321,7 @@ make install cd .. echo -echo "\nBuilding Ogg" +echo "Building Ogg" if [ ! -d ogg ]; then echo "Ogg directory is missing, aborting." @@ -310,7 +337,7 @@ make install cd .. echo -echo "\nBuilding Vorbis" +echo "Building Vorbis" if [ ! -d vorbis ]; then echo "Vorbis directory is missing, aborting." @@ -328,7 +355,7 @@ cp lib/libvorbis.0.4.9.dylib ../.. cd .. echo -echo "\nBuilding Opus" +echo "Building Opus" if [ ! -d opus ]; then echo "Opus directory is missing, aborting." @@ -344,7 +371,7 @@ make install cd .. echo -echo "\nBuilding FFmpeg" +echo "Building FFmpeg" if [ ! -d FFmpeg ]; then echo "FFmpeg directory is missing, aborting." diff --git a/tools/macOS_dependencies_setup.sh b/tools/macOS_dependencies_setup.sh index d44fbd750..6f28936cb 100755 --- a/tools/macOS_dependencies_setup.sh +++ b/tools/macOS_dependencies_setup.sh @@ -15,12 +15,13 @@ if [ ! -f .clang-format ]; then exit fi -echo "Setting up dependencies in the ./external directory...\n" +echo "Setting up dependencies in the ./external directory..." cd external rm -rf local_install mkdir local_install +echo echo "Setting up libiconv" rm -rf libiconv* curl -LO https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz @@ -34,6 +35,7 @@ fi mv libiconv-1.17 libiconv rm libiconv-1.17.tar.gz +echo echo "Setting up gettext" rm -rf gettext* curl -LO https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.5.tar.gz @@ -47,6 +49,16 @@ fi mv gettext-0.22.5 gettext rm gettext-0.22.5.tar.gz +echo +echo "Setting up ICU" +rm -rf icu +git clone -n --filter=tree:0 https://github.com/unicode-org/icu.git +cd icu +git sparse-checkout set --no-cone icu4c +git checkout release-75-1 +cd .. + +echo echo "Setting up libpng" rm -rf libpng code git clone https://git.code.sf.net/p/libpng/code.git @@ -62,7 +74,7 @@ git checkout v1.6.40 cd .. echo -echo "\nSetting up HarfBuzz" +echo "Setting up HarfBuzz" rm -rf harfbuzz git clone https://github.com/harfbuzz/harfbuzz.git @@ -77,7 +89,7 @@ mkdir build cd .. echo -echo "\nSetting up FreeType" +echo "Setting up FreeType" rm -rf freetype git clone https://github.com/freetype/freetype.git @@ -166,7 +178,7 @@ mkdir build cd .. echo -echo "\nSetting up FreeImage" +echo "Setting up FreeImage" rm -rf freeimage mkdir freeimage cd freeimage @@ -282,7 +294,7 @@ fi cd ../.. echo -echo "\nSetting up libgit2" +echo "Setting up libgit2" rm -rf libgit2 git clone https://github.com/libgit2/libgit2.git @@ -297,7 +309,7 @@ mkdir build cd .. echo -echo "\nSetting up pugixml" +echo "Setting up pugixml" rm -rf pugixml git clone https://github.com/zeux/pugixml.git @@ -311,7 +323,7 @@ git checkout v1.13 cd .. echo -echo "\nSetting up SDL" +echo "Setting up SDL" rm -rf SDL git clone https://github.com/libsdl-org/SDL.git @@ -327,7 +339,7 @@ mkdir build cd .. echo -echo "\nSetting up libvpx" +echo "Setting up libvpx" rm -rf libvpx git clone https://github.com/webmproject/libvpx.git @@ -341,7 +353,7 @@ git checkout v1.13.0 cd .. echo -echo "\nSetting up Ogg" +echo "Setting up Ogg" rm -rf ogg git clone https://github.com/xiph/ogg.git @@ -355,7 +367,7 @@ git checkout v1.3.5 cd .. echo -echo "\nSetting up Vorbis" +echo "Setting up Vorbis" rm -rf vorbis git clone https://gitlab.xiph.org/xiph/vorbis.git @@ -369,7 +381,7 @@ git checkout v1.3.7 cd .. echo -echo "\nSetting up Opus" +echo "Setting up Opus" rm -rf opus git clone https://gitlab.xiph.org/xiph/opus.git @@ -383,7 +395,7 @@ git checkout v1.3.1 cd .. echo -echo "\nSetting up FFmpeg" +echo "Setting up FFmpeg" rm -rf FFmpeg git clone https://github.com/FFmpeg/FFmpeg.git