-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.bat
More file actions
52 lines (45 loc) · 1.94 KB
/
Copy pathinstall.bat
File metadata and controls
52 lines (45 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echo off
setlocal EnableDelayedExpansion
set KMP_DUPLICATE_LIB_OK=TRUE
:: =====================================================
:: 1. Scarica ed installa Tesseract-OCR-w64 (ultima versione)
:: =====================================================
echo Vuoi scaricare ed installare Tesseract-OCR-w64 (ultima versione)? (S/N)
set /p ansTesseract=
if /I "!ansTesseract!"=="S" (
echo Scaricando Tesseract-OCR-w64...
powershell -Command "Invoke-WebRequest -Uri 'https://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-w64-setup-5.3.1.20230401.exe' -OutFile 'TesseractInstaller.exe' -UserAgent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)'"
echo Installazione in corso...
start /wait TesseractInstaller.exe /SILENT
del TesseractInstaller.exe
echo Tesseract installato.
) else (
echo Salto installazione Tesseract.
)
echo.
:: =====================================================
:: 3. Scarica ed installa FFmpeg
:: =====================================================
echo Vuoi scaricare ed installare FFmpeg? (S/N)
set /p ansFFmpeg=
if /I "!ansFFmpeg!"=="S" (
echo Scaricando FFmpeg...
powershell -Command "Invoke-WebRequest -Uri 'https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip' -OutFile 'ffmpeg.zip' -UserAgent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)'"
echo Estrazione in corso...
powershell -Command "Expand-Archive -Path 'ffmpeg.zip' -DestinationPath 'ffmpeg_temp'"
move "ffmpeg_temp\ffmpeg-*-essentials_build" "C:\ffmpeg" >nul 2>&1
rmdir /s /q ffmpeg_temp
echo Aggiunta di C:\ffmpeg\bin al PATH...
setx PATH "%PATH%;C:\ffmpeg\bin"
echo.
echo Attenzione:
echo 1. Riavvia il sistema per applicare le modifiche al PATH.
echo 2. Se C:\ffmpeg\bin non esiste, controlla manualmente la cartella estratta.
del ffmpeg.zip
) else (
echo Salto installazione FFmpeg.
)
echo.
echo Operazione completata.
pause
endlocal