-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathInitDelphiFFMPEG.cmd
More file actions
51 lines (44 loc) · 1.32 KB
/
Copy pathInitDelphiFFMPEG.cmd
File metadata and controls
51 lines (44 loc) · 1.32 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
@echo off
setlocal EnableExtensions
rem Optional override: set FFMPEG_DEV_PATH to your Delphi-FFMPEG clone (see InitDelphiFFMPEG.local.cmd.example)
if exist "%~dp0InitDelphiFFMPEG.local.cmd" call "%~dp0InitDelphiFFMPEG.local.cmd"
if not defined FFMPEG_DEV_PATH set "FFMPEG_DEV_PATH=%~dp0..\..\Delphi-FFMPEG"
echo === JEDI submodule ===
git submodule update --init jedi
if errorlevel 1 goto :error
pushd jedi
git checkout master 2>nul
popd
echo.
echo === Delphi-FFMPEG ===
if exist "%~dp0Delphi-FFMPEG\source\ffmpeg.inc" (
echo Delphi-FFMPEG already available at Delphi-FFMPEG\source
goto :done
)
if exist "%FFMPEG_DEV_PATH%\source\ffmpeg.inc" (
echo Linking Delphi-FFMPEG junction -^> "%FFMPEG_DEV_PATH%"
if exist "%~dp0Delphi-FFMPEG" (
rem empty gitlink dir or stale folder
rmdir "%~dp0Delphi-FFMPEG" 2>nul
if exist "%~dp0Delphi-FFMPEG" (
echo ERROR: remove or rename existing Delphi-FFMPEG folder, then re-run.
goto :error
)
)
mklink /J "%~dp0Delphi-FFMPEG" "%FFMPEG_DEV_PATH%"
if errorlevel 1 (
echo ERROR: mklink failed. Try an elevated command prompt or enable Developer Mode.
goto :error
)
goto :done
)
echo Initializing Delphi-FFMPEG submodule...
git submodule update --init Delphi-FFMPEG
if errorlevel 1 goto :error
:done
echo.
echo Done.
goto :eof
:error
echo Setup failed.
exit /b 1