2022-01-02 17:34:11 +00:00
|
|
|
:: SPDX-License-Identifier: MIT
|
|
|
|
::
|
2024-04-17 15:32:04 +00:00
|
|
|
:: ES-DE Frontend
|
2023-12-19 16:38:21 +00:00
|
|
|
:: Windows_dependencies_setup.bat
|
2022-01-02 17:34:11 +00:00
|
|
|
::
|
|
|
|
:: Downloads and prepares the external dependencies for building in-tree using MSVC.
|
|
|
|
:: If the directories already exist they will be removed and the libraries will be downloaded again.
|
|
|
|
::
|
|
|
|
:: This script needs to run from the root of the repository and 7z.exe and curl.exe need to be
|
|
|
|
:: reachable via the Path environment variable.
|
|
|
|
::
|
|
|
|
@echo off
|
|
|
|
|
|
|
|
if not exist .clang-format (
|
|
|
|
echo You need to run this script from the root of the repository.
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
where /Q 7z.exe
|
|
|
|
if %ERRORLEVEL% neq 0 (
|
|
|
|
echo Can't find 7z.exe and it's required by this script, aborting.
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
where /Q curl.exe
|
|
|
|
if %ERRORLEVEL% neq 0 (
|
|
|
|
echo Can't find curl.exe and it's required by this script, aborting.
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
echo Setting up dependencies in the .\external directory...
|
|
|
|
echo:
|
|
|
|
|
|
|
|
cd external
|
|
|
|
|
2024-06-30 17:47:43 +00:00
|
|
|
echo Setting up gettext
|
|
|
|
|
|
|
|
if exist gettext\ (
|
|
|
|
rmdir /S /Q gettext
|
|
|
|
)
|
|
|
|
|
|
|
|
mkdir gettext
|
|
|
|
cd gettext
|
|
|
|
|
|
|
|
curl -LO https://github.com/vslavik/gettext-tools-windows/releases/download/v0.22.5/gettext-tools-windows-0.22.5.zip
|
|
|
|
7z x gettext-tools-windows-0.22.5.zip
|
|
|
|
|
|
|
|
if not exist bin\msgfmt.exe (
|
|
|
|
echo msgfmt.exe is missing, aborting.
|
|
|
|
cd ..\..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
mkdir include
|
|
|
|
copy ..\..\es-app\assets\libintl_Windows.h include\libintl.h
|
|
|
|
|
|
|
|
cd bin
|
|
|
|
|
|
|
|
dumpbin /exports libintl-8.dll > exports.txt
|
|
|
|
echo LIBRARY libintl-8 > libintl-8.def
|
|
|
|
echo EXPORTS >> libintl-8.def
|
|
|
|
for /f "skip=90 tokens=4" %%A in (exports.txt) do echo %%A >> libintl-8.def
|
|
|
|
echo DllMain >> libintl-8.def
|
|
|
|
lib /def:libintl-8.def /out:libintl-8.lib /machine:x64
|
|
|
|
|
|
|
|
copy /Y libintl-8.dll ..\..\..
|
|
|
|
copy /Y libintl-8.lib ..\..\..
|
2024-07-20 13:58:39 +00:00
|
|
|
copy /Y libiconv-2.dll ..\..\..
|
2024-06-30 17:47:43 +00:00
|
|
|
cd ..\..
|
|
|
|
|
2022-06-29 15:22:50 +00:00
|
|
|
echo Setting up curl
|
2022-01-02 17:34:11 +00:00
|
|
|
|
2023-09-09 08:46:42 +00:00
|
|
|
if exist curl-8.2.1_11-win64-mingw\ (
|
|
|
|
rmdir /S /Q curl-8.2.1_11-win64-mingw
|
2022-01-02 17:34:11 +00:00
|
|
|
)
|
|
|
|
|
2023-06-24 11:27:42 +00:00
|
|
|
if exist curl\ (
|
|
|
|
rmdir /S /Q curl
|
|
|
|
)
|
|
|
|
|
2023-09-09 08:46:42 +00:00
|
|
|
if exist curl-8.2.1_11-win64-mingw.zip (
|
|
|
|
del curl-8.2.1_11-win64-mingw.zip
|
2023-06-25 13:20:56 +00:00
|
|
|
)
|
|
|
|
|
2023-09-09 08:46:42 +00:00
|
|
|
curl -O https://curl.se/windows/dl-8.2.1_11/curl-8.2.1_11-win64-mingw.zip
|
|
|
|
7z x curl-8.2.1_11-win64-mingw.zip
|
2022-10-30 11:34:57 +00:00
|
|
|
|
2023-09-09 08:46:42 +00:00
|
|
|
if not exist curl-8.2.1_11-win64-mingw\bin\ (
|
2022-10-30 11:34:57 +00:00
|
|
|
echo curl directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
2023-09-09 08:46:42 +00:00
|
|
|
rename curl-8.2.1_11-win64-mingw curl
|
2023-06-24 11:27:42 +00:00
|
|
|
|
|
|
|
cd curl\bin
|
2022-01-02 17:34:11 +00:00
|
|
|
|
|
|
|
dumpbin /exports libcurl-x64.dll > exports.txt
|
|
|
|
echo LIBRARY libcurl-x64 > libcurl-x64.def
|
|
|
|
echo EXPORTS >> libcurl-x64.def
|
|
|
|
for /f "skip=19 tokens=4" %%A in (exports.txt) do echo %%A >> libcurl-x64.def
|
|
|
|
lib /def:libcurl-x64.def /out:libcurl-x64.lib /machine:x64
|
|
|
|
|
|
|
|
copy /Y libcurl-x64.dll ..\..\..
|
|
|
|
copy /Y libcurl-x64.lib ..\..\..
|
|
|
|
cd ..\..
|
|
|
|
|
|
|
|
echo:
|
|
|
|
echo Setting up GLEW
|
|
|
|
|
|
|
|
if exist glew-2.1.0\ (
|
|
|
|
rmdir /S /Q glew-2.1.0
|
|
|
|
)
|
|
|
|
|
2023-06-24 11:27:42 +00:00
|
|
|
if exist glew\ (
|
|
|
|
rmdir /S /Q glew
|
|
|
|
)
|
|
|
|
|
2023-06-25 13:20:56 +00:00
|
|
|
if exist glew-2.1.0-win32.zip (
|
|
|
|
del glew-2.1.0-win32.zip
|
|
|
|
)
|
|
|
|
|
2022-01-02 17:34:11 +00:00
|
|
|
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
|
2022-10-30 11:34:57 +00:00
|
|
|
|
|
|
|
if not exist glew-2.1.0\ (
|
|
|
|
echo GLEW directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
2023-06-24 11:27:42 +00:00
|
|
|
rename glew-2.1.0 glew
|
|
|
|
|
|
|
|
copy /Y glew\bin\Release\x64\glew32.dll ..
|
|
|
|
copy /Y glew\lib\Release\x64\glew32.lib ..
|
2022-01-02 17:34:11 +00:00
|
|
|
|
2024-07-31 17:15:59 +00:00
|
|
|
echo:
|
|
|
|
echo Setting up HarfBuzz
|
|
|
|
|
|
|
|
if exist harfbuzz\ (
|
|
|
|
rmdir /S /Q harfbuzz
|
|
|
|
)
|
|
|
|
|
|
|
|
git clone https://github.com/harfbuzz/harfbuzz.git
|
|
|
|
|
|
|
|
if not exist harfbuzz\ (
|
|
|
|
echo harfbuzz directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
cd harfbuzz
|
|
|
|
git checkout 9.0.0
|
|
|
|
mkdir build
|
|
|
|
cd ..
|
|
|
|
|
2022-01-02 17:34:11 +00:00
|
|
|
echo:
|
|
|
|
echo Setting up FreeType
|
|
|
|
|
2022-01-11 16:33:34 +00:00
|
|
|
if exist freetype\ (
|
|
|
|
rmdir /S /Q freetype
|
2022-01-02 17:34:11 +00:00
|
|
|
)
|
|
|
|
|
2022-01-11 16:33:34 +00:00
|
|
|
git clone https://github.com/freetype/freetype.git
|
2022-10-30 11:34:57 +00:00
|
|
|
|
|
|
|
if not exist freetype\ (
|
|
|
|
echo FreeType directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
2022-01-11 16:33:34 +00:00
|
|
|
cd freetype
|
2023-06-24 11:27:42 +00:00
|
|
|
git checkout VER-2-13-0
|
2022-01-02 17:34:11 +00:00
|
|
|
mkdir build
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo:
|
|
|
|
echo Setting up FreeImage
|
|
|
|
|
|
|
|
if exist FreeImage\ (
|
|
|
|
rmdir /S /Q FreeImage
|
|
|
|
)
|
|
|
|
|
2023-06-25 13:20:56 +00:00
|
|
|
if exist FreeImage3180Win32Win64.zip (
|
|
|
|
del FreeImage3180Win32Win64.zip
|
|
|
|
)
|
|
|
|
|
2022-01-02 17:34:11 +00:00
|
|
|
curl -LO https://downloads.sourceforge.net/project/freeimage/Binary%%20Distribution/3.18.0/FreeImage3180Win32Win64.zip
|
|
|
|
7z x FreeImage3180Win32Win64.zip
|
2022-10-30 11:34:57 +00:00
|
|
|
|
|
|
|
if not exist FreeImage\ (
|
|
|
|
echo FreeImage directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
2022-01-02 17:34:11 +00:00
|
|
|
copy /Y FreeImage\Dist\x64\FreeImage.dll ..
|
|
|
|
copy /Y FreeImage\Dist\x64\FreeImage.lib ..
|
|
|
|
|
2023-03-21 22:22:07 +00:00
|
|
|
echo:
|
|
|
|
echo Setting up libgit2
|
|
|
|
|
|
|
|
if exist libgit2\ (
|
|
|
|
rmdir /S /Q libgit2
|
|
|
|
)
|
|
|
|
|
|
|
|
git clone https://github.com/libgit2/libgit2.git
|
|
|
|
|
|
|
|
if not exist libgit2\ (
|
|
|
|
echo libgit2 directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
|
|
|
cd libgit2
|
2023-11-05 11:00:11 +00:00
|
|
|
git checkout v1.7.1
|
2023-03-21 22:22:07 +00:00
|
|
|
mkdir build
|
|
|
|
cd ..
|
|
|
|
|
2023-06-24 11:27:42 +00:00
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2023-06-25 13:20:56 +00:00
|
|
|
if exist Release-23.05.0-0.zip (
|
|
|
|
del Release-23.05.0-0.zip
|
|
|
|
)
|
|
|
|
|
2023-06-24 11:27:42 +00:00
|
|
|
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
|
2023-06-24 12:16:31 +00:00
|
|
|
copy /Y poppler\Library\bin\libpng16.dll ..\es-pdf-converter
|
2023-06-24 11:27:42 +00:00
|
|
|
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
|
|
|
|
|
2022-01-02 17:34:11 +00:00
|
|
|
echo:
|
|
|
|
echo Setting up pugixml
|
|
|
|
|
|
|
|
if exist pugixml\ (
|
|
|
|
rmdir /S /Q pugixml
|
|
|
|
)
|
|
|
|
|
2022-01-11 16:33:34 +00:00
|
|
|
git clone https://github.com/zeux/pugixml.git
|
2022-10-30 11:34:57 +00:00
|
|
|
|
|
|
|
if not exist pugixml\ (
|
|
|
|
echo pugixml directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
2022-01-02 17:34:11 +00:00
|
|
|
cd pugixml
|
2023-06-24 11:27:42 +00:00
|
|
|
git checkout v1.13
|
2022-01-02 17:34:11 +00:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
echo:
|
|
|
|
echo Setting up SDL
|
|
|
|
|
2024-07-09 20:40:36 +00:00
|
|
|
if exist SDL2-2.30.5\ (
|
|
|
|
rmdir /S /Q SDL2-2.30.5
|
2022-01-02 17:34:11 +00:00
|
|
|
)
|
|
|
|
|
2023-06-24 11:27:42 +00:00
|
|
|
if exist SDL2\ (
|
|
|
|
rmdir /S /Q SDL2
|
|
|
|
)
|
|
|
|
|
2024-07-09 20:40:36 +00:00
|
|
|
if exist SDL2-devel-2.30.5-VC.zip (
|
|
|
|
del SDL2-devel-2.30.5-VC.zip
|
2023-06-25 13:20:56 +00:00
|
|
|
)
|
|
|
|
|
2024-07-09 20:40:36 +00:00
|
|
|
curl -LO https://libsdl.org/release/SDL2-devel-2.30.5-VC.zip
|
2022-09-27 15:49:51 +00:00
|
|
|
|
2024-07-09 20:40:36 +00:00
|
|
|
7z x SDL2-devel-2.30.5-VC.zip
|
2022-10-30 11:34:57 +00:00
|
|
|
|
2024-07-09 20:40:36 +00:00
|
|
|
if not exist SDL2-2.30.5\ (
|
2022-10-30 11:34:57 +00:00
|
|
|
echo SDL directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
2024-07-09 20:40:36 +00:00
|
|
|
rename SDL2-2.30.5 SDL2
|
2023-06-24 11:27:42 +00:00
|
|
|
|
|
|
|
cd SDL2
|
2022-01-02 17:34:11 +00:00
|
|
|
rename include SDL2
|
|
|
|
cd ..
|
2023-06-24 11:27:42 +00:00
|
|
|
copy /Y SDL2\lib\x64\SDL2.dll ..
|
|
|
|
copy /Y SDL2\lib\x64\SDL2.lib ..
|
|
|
|
copy /Y SDL2\lib\x64\SDL2main.lib ..
|
2022-01-02 17:34:11 +00:00
|
|
|
|
|
|
|
echo:
|
|
|
|
echo Setting up FFmpeg
|
|
|
|
|
2023-06-25 10:42:16 +00:00
|
|
|
if exist ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0\ (
|
|
|
|
rmdir /S /Q ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0
|
2022-01-02 17:34:11 +00:00
|
|
|
)
|
|
|
|
|
2023-06-24 11:27:42 +00:00
|
|
|
if exist ffmpeg\ (
|
|
|
|
rmdir /S /Q ffmpeg
|
|
|
|
)
|
|
|
|
|
2023-06-25 13:20:56 +00:00
|
|
|
if exist ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0.zip (
|
|
|
|
del ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0.zip
|
|
|
|
)
|
|
|
|
|
2022-09-27 15:49:51 +00:00
|
|
|
:: This package should be available for download for two years.
|
2023-06-25 10:42:16 +00:00
|
|
|
curl -LO https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2023-05-31-12-47/ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0.zip
|
|
|
|
7z x ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0.zip
|
2022-10-30 11:34:57 +00:00
|
|
|
|
2023-06-25 10:42:16 +00:00
|
|
|
if not exist ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0\ (
|
2022-10-30 11:34:57 +00:00
|
|
|
echo FFmpeg directory is missing, aborting.
|
|
|
|
cd ..
|
|
|
|
goto end
|
|
|
|
)
|
|
|
|
|
2023-06-25 10:42:16 +00:00
|
|
|
rename ffmpeg-n6.0-22-g549430e14d-win64-gpl-shared-6.0 ffmpeg
|
2023-06-24 11:27:42 +00:00
|
|
|
|
2023-06-25 10:42:16 +00:00
|
|
|
copy /Y ffmpeg\bin\avcodec-60.dll ..
|
|
|
|
copy /Y ffmpeg\bin\avfilter-9.dll ..
|
|
|
|
copy /Y ffmpeg\bin\avformat-60.dll ..
|
|
|
|
copy /Y ffmpeg\bin\avutil-58.dll ..
|
|
|
|
copy /Y ffmpeg\bin\postproc-57.dll ..
|
2023-06-24 11:27:42 +00:00
|
|
|
copy /Y ffmpeg\bin\swresample-4.dll ..
|
2023-06-25 10:42:16 +00:00
|
|
|
copy /Y ffmpeg\bin\swscale-7.dll ..
|
2023-06-24 11:27:42 +00:00
|
|
|
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 ..
|
2022-01-02 17:34:11 +00:00
|
|
|
|
|
|
|
echo:
|
|
|
|
echo Setting up OpenSSL
|
|
|
|
|
2023-06-25 13:20:56 +00:00
|
|
|
if exist fWin64OpenSSL_Light-1_1_1m.exe (
|
|
|
|
del Win64OpenSSL_Light-1_1_1m.exe
|
|
|
|
)
|
|
|
|
|
2024-04-17 15:32:04 +00:00
|
|
|
if not exist "C:\Program Files\OpenSSL-Win64\libcrypto-3-x64.dll" (
|
|
|
|
curl -O https://slproweb.com/download/Win64OpenSSL_Light-3_3_0.exe
|
2022-01-02 17:34:11 +00:00
|
|
|
:: Run the installer.
|
2024-04-17 15:32:04 +00:00
|
|
|
.\Win64OpenSSL_Light-3_3_0.exe
|
2022-01-02 17:34:11 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
:: Return to the root of the repository.
|
|
|
|
cd ..
|
|
|
|
|
2024-04-17 15:32:04 +00:00
|
|
|
if exist "C:\Program Files\OpenSSL-Win64\libcrypto-3-x64.dll" (
|
|
|
|
copy /Y "C:\Program Files\OpenSSL-Win64\libcrypto-3-x64.dll"
|
|
|
|
copy /Y "C:\Program Files\OpenSSL-Win64\libssl-3-x64.dll"
|
2022-01-02 17:34:11 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
echo:
|
|
|
|
echo Copying DLL files from Windows\System32
|
|
|
|
|
2023-11-02 15:35:40 +00:00
|
|
|
copy /Y C:\Windows\System32\vcomp140.dll
|
2022-01-02 17:34:11 +00:00
|
|
|
|
2022-10-30 11:34:57 +00:00
|
|
|
echo:
|
|
|
|
echo Done setting up all dependencies.
|
|
|
|
|
2022-01-02 17:34:11 +00:00
|
|
|
:end
|