(Windows) Added the Poppler library to the dependency setup scripts

Also changed all dependencies to not include version numbers in their directory names and updated curl to 8.1.2, FreeType to 2.13.0, libgit2 to 1.6.4 and pugixml to 1.13
This commit is contained in:
Leon Styhre 2023-06-24 13:27:42 +02:00
parent 07f98f1737
commit a58eaa83b5
4 changed files with 141 additions and 55 deletions

View file

@ -434,14 +434,14 @@ if(APPLE)
${CMAKE_CURRENT_SOURCE_DIR}/external/SDL)
elseif(WIN32)
set(COMMON_INCLUDE_DIRS ${COMMON_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/external/curl-7.86.0-win64-mingw/include
${CMAKE_CURRENT_SOURCE_DIR}/external/glew-2.1.0/include
${CMAKE_CURRENT_SOURCE_DIR}/external/ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1/include
${CMAKE_CURRENT_SOURCE_DIR}/external/curl/include
${CMAKE_CURRENT_SOURCE_DIR}/external/glew/include
${CMAKE_CURRENT_SOURCE_DIR}/external/ffmpeg/include
${CMAKE_CURRENT_SOURCE_DIR}/external/FreeImage/Dist/x64
${CMAKE_CURRENT_SOURCE_DIR}/external/freetype/include
${CMAKE_CURRENT_SOURCE_DIR}/external/libgit2/include
${CMAKE_CURRENT_SOURCE_DIR}/external/pugixml/src
${CMAKE_CURRENT_SOURCE_DIR}/external/SDL2-2.26.5)
${CMAKE_CURRENT_SOURCE_DIR}/external/SDL2)
elseif(EMSCRIPTEN)
set(COMMON_INCLUDE_DIRS ${COMMON_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/external/curl/include

View file

@ -30,12 +30,12 @@ echo "Building all dependencies in the ./external directory..."
echo -e "\nBuilding GLEW"
if [ ! -d glew-2.1.0 ]; then
if [ ! -d glew ]; then
echo "GLEW directory is missing, aborting."
exit
fi
cd glew-2.1.0
cd glew
make clean
make -j${JOBS} 2>/dev/null
cp lib/glew32.dll ../..

View file

@ -35,20 +35,26 @@ cd external
echo Setting up curl
if exist curl-7.86.0-win64-mingw\ (
rmdir /S /Q curl-7.86.0-win64-mingw
if exist curl-8.1.2_3-win64-mingw\ (
rmdir /S /Q curl-8.1.2_3-win64-mingw
)
curl -O https://curl.se/windows/dl-7.86.0/curl-7.86.0-win64-mingw.zip
7z x curl-7.86.0-win64-mingw.zip
if exist curl\ (
rmdir /S /Q curl
)
if not exist curl-7.86.0-win64-mingw\bin\ (
curl -O https://curl.se/windows/dl-8.1.2_3/curl-8.1.2_3-win64-mingw.zip
7z x curl-8.1.2_3-win64-mingw.zip
if not exist curl-8.1.2_3-win64-mingw\bin\ (
echo curl directory is missing, aborting.
cd ..
goto end
)
cd curl-7.86.0-win64-mingw\bin
rename curl-8.1.2_3-win64-mingw curl
cd curl\bin
dumpbin /exports libcurl-x64.dll > exports.txt
echo LIBRARY libcurl-x64 > libcurl-x64.def
@ -67,6 +73,10 @@ if exist glew-2.1.0\ (
rmdir /S /Q glew-2.1.0
)
if exist glew\ (
rmdir /S /Q glew
)
curl -LO https://downloads.sourceforge.net/project/glew/glew/2.1.0/glew-2.1.0-win32.zip
7z x glew-2.1.0-win32.zip
@ -76,8 +86,10 @@ if not exist glew-2.1.0\ (
goto end
)
copy /Y glew-2.1.0\bin\Release\x64\glew32.dll ..
copy /Y glew-2.1.0\lib\Release\x64\glew32.lib ..
rename glew-2.1.0 glew
copy /Y glew\bin\Release\x64\glew32.dll ..
copy /Y glew\lib\Release\x64\glew32.lib ..
echo:
echo Setting up FreeType
@ -95,7 +107,7 @@ if not exist freetype\ (
)
cd freetype
git checkout VER-2-12-1
git checkout VER-2-13-0
mkdir build
cd ..
@ -134,10 +146,51 @@ if not exist libgit2\ (
)
cd libgit2
git checkout v1.6.3
git checkout v1.6.4
mkdir build
cd ..
echo:
echo Setting up Poppler
if exist poppler-23.05.0\ (
rmdir /S /Q poppler-23.05.0
)
if exist poppler\ (
rmdir /S /Q poppler
)
curl -LO https://github.com/oschwartz10612/poppler-windows/releases/download/v23.05.0-0/Release-23.05.0-0.zip
7z x Release-23.05.0-0.zip
if not exist poppler-23.05.0\Library\ (
echo Poppler directory is missing, aborting.
cd ..
goto end
)
rename poppler-23.05.0 poppler
copy /Y poppler\Library\lib\poppler-cpp.lib ..\es-pdf-converter
copy /Y poppler\Library\bin\charset.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\deflate.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\freetype.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\iconv.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\jpeg8.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\lcms2.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\Lerc.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\libcrypto-3-x64.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\libcurl.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\liblzma.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\libssh2.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\openjp2.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\poppler.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\poppler-cpp.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\tiff.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\zlib.dll ..\es-pdf-converter
copy /Y poppler\Library\bin\zstd.dll ..\es-pdf-converter
echo:
echo Setting up pugixml
@ -154,7 +207,7 @@ if not exist pugixml\ (
)
cd pugixml
git checkout v1.12.1
git checkout v1.13
cd ..
echo:
@ -164,6 +217,10 @@ if exist SDL2-2.26.5\ (
rmdir /S /Q SDL2-2.26.5
)
if exist SDL2\ (
rmdir /S /Q SDL2
)
curl -LO https://libsdl.org/release/SDL2-devel-2.26.5-VC.zip
7z x SDL2-devel-2.26.5-VC.zip
@ -174,12 +231,14 @@ if not exist SDL2-2.26.5\ (
goto end
)
cd SDL2-2.26.5
rename SDL2-2.26.5 SDL2
cd SDL2
rename include SDL2
cd ..
copy /Y SDL2-2.26.5\lib\x64\SDL2.dll ..
copy /Y SDL2-2.26.5\lib\x64\SDL2.lib ..
copy /Y SDL2-2.26.5\lib\x64\SDL2main.lib ..
copy /Y SDL2\lib\x64\SDL2.dll ..
copy /Y SDL2\lib\x64\SDL2.lib ..
copy /Y SDL2\lib\x64\SDL2main.lib ..
echo:
echo Setting up FFmpeg
@ -188,6 +247,10 @@ if exist ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\ (
rmdir /S /Q ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1
)
if exist ffmpeg\ (
rmdir /S /Q ffmpeg
)
:: This package should be available for download for two years.
curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-09-30-12-41/ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1.zip
7z x ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1.zip
@ -198,19 +261,21 @@ if not exist ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\ (
goto end
)
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\bin\avcodec-59.dll ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\bin\avfilter-8.dll ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\bin\avformat-59.dll ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\bin\avutil-57.dll ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\bin\postproc-56.dll ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\bin\swresample-4.dll ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\bin\swscale-6.dll ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\lib\avcodec.lib ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\lib\avfilter.lib ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\lib\avformat.lib ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\lib\avutil.lib ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\lib\swresample.lib ..
copy /Y ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1\lib\swscale.lib ..
rename ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1 ffmpeg
copy /Y ffmpeg\bin\avcodec-59.dll ..
copy /Y ffmpeg\bin\avfilter-8.dll ..
copy /Y ffmpeg\bin\avformat-59.dll ..
copy /Y ffmpeg\bin\avutil-57.dll ..
copy /Y ffmpeg\bin\postproc-56.dll ..
copy /Y ffmpeg\bin\swresample-4.dll ..
copy /Y ffmpeg\bin\swscale-6.dll ..
copy /Y ffmpeg\lib\avcodec.lib ..
copy /Y ffmpeg\lib\avfilter.lib ..
copy /Y ffmpeg\lib\avformat.lib ..
copy /Y ffmpeg\lib\avutil.lib ..
copy /Y ffmpeg\lib\swresample.lib ..
copy /Y ffmpeg\lib\swscale.lib ..
echo:
echo Setting up OpenSSL

View file

@ -20,20 +20,22 @@ echo -e "Setting up dependencies in the ./external directory..."
cd external
echo -e "\nSetting up curl"
rm -rf curl-*
rm -rf curl*
curl -O https://curl.se/windows/dl-7.86.0/curl-7.86.0-win64-mingw.zip
unzip curl-7.86.0-win64-mingw.zip
curl -O https://curl.se/windows/dl-8.1.2_3/curl-8.1.2_3-win64-mingw.zip
unzip curl-8.1.2_3-win64-mingw.zip
if [ ! -d curl-7.86.0-win64-mingw ]; then
if [ ! -d curl-8.1.2_3-win64-mingw ]; then
echo "curl directory is missing, aborting."
exit
fi
cp -p curl-7.86.0-win64-mingw/bin/libcurl-x64.dll ..
mv curl-8.1.2_3-win64-mingw curl
cp -p curl/bin/libcurl-x64.dll ..
echo -e "\nSetting up GLEW"
rm -rf glew-*
rm -rf glew*
curl -LO https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip
unzip glew-2.1.0.zip
@ -43,6 +45,8 @@ if [ ! -d glew-2.1.0 ]; then
exit
fi
mv glew-2.1.0 glew
echo -e "\nSetting up FreeType"
rm -rf freetype
@ -54,7 +58,7 @@ if [ ! -d freetype ]; then
fi
cd freetype
git checkout VER-2-12-1
git checkout VER-2-13-0
mkdir build
cd ..
@ -82,10 +86,23 @@ if [ ! -d libgit2 ]; then
fi
cd libgit2
git checkout v1.6.3
git checkout v1.6.4
mkdir build
cd ..
echo -e "\nSetting up Poppler"
rm -rf poppler*
curl -JO https://gitlab.com/es-de/emulationstation-de/-/package_files/83268133/download
unzip Poppler_Windows_MinGW_23.06.0-1.zip
if [ ! -d poppler ]; then
echo "Poppler directory is missing, aborting."
exit
fi
cp -p poppler/Library/bin/*.dll ../es-pdf-converter
echo -e "\nSetting up pugixml"
rm -rf pugixml
@ -97,11 +114,11 @@ if [ ! -d pugixml ]; then
fi
cd pugixml
git checkout v1.12.1
git checkout v1.13
cd ..
echo -e "\nSetting up SDL"
rm -rf SDL2-*
rm -rf SDL2*
curl -O https://libsdl.org/release/SDL2-devel-2.26.5-mingw.tar.gz
@ -114,12 +131,14 @@ if [ ! -d SDL2-2.26.5 ]; then
exit
fi
mv SDL2-2.26.5/x86_64-w64-mingw32/include/SDL2 SDL2-2.26.5/
cp -p SDL2-2.26.5/x86_64-w64-mingw32/lib/libSDL2main.a ..
cp -p SDL2-2.26.5/x86_64-w64-mingw32/bin/SDL2.dll ..
mv SDL2-2.26.5 SDL2
mv SDL2/x86_64-w64-mingw32/include/SDL2 SDL2/
cp -p SDL2/x86_64-w64-mingw32/lib/libSDL2main.a ..
cp -p SDL2/x86_64-w64-mingw32/bin/SDL2.dll ..
echo -e "\nSetting up FFmpeg"
rm -rf ffmpeg-*
rm -rf ffmpeg*
# This package should be available for download for two years.
curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-09-30-12-41/ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1.zip
@ -130,13 +149,15 @@ if [ ! -d ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1 ]; then
exit
fi
cp -p ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1/bin/avcodec-59.dll ..
cp -p ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1/bin/avfilter-8.dll ..
cp -p ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1/bin/avformat-59.dll ..
cp -p ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1/bin/avutil-57.dll ..
cp -p ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1/bin/postproc-56.dll ..
cp -p ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1/bin/swresample-4.dll ..
cp -p ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1/bin/swscale-6.dll ..
mv ffmpeg-n5.1.2-1-g05d6157aab-win64-gpl-shared-5.1 ffmpeg
cp -p ffmpeg/bin/avcodec-59.dll ..
cp -p ffmpeg/bin/avfilter-8.dll ..
cp -p ffmpeg/bin/avformat-59.dll ..
cp -p ffmpeg/bin/avutil-57.dll ..
cp -p ffmpeg/bin/postproc-56.dll ..
cp -p ffmpeg/bin/swresample-4.dll ..
cp -p ffmpeg/bin/swscale-6.dll ..
echo -e "\nSetting up OpenSSL"