forked from shekh/VirtualDub2
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwin32_create_package.cmd
87 lines (66 loc) · 3.53 KB
/
win32_create_package.cmd
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@ECHO OFF
SETLOCAL
CD /D %~dp0
REM -------------------------------------
IF NOT EXIST "out\Release\VirtualDub.exe" (
ECHO VirtualDub2 not compiled.
GOTO :END
)
IF NOT EXIST "..\avlib_vdplugin\_bin\Release_x86\avlib-1.vdplugin" (
ECHO avlib_vdplugin not compiled.
GOTO :END
)
IF NOT EXIST "..\avlib_vdplugin\_bin\ffmpeg_win32\avcodec-61.dll" (
ECHO FFmpeg DLLs not downloaded.
GOTO :END
)
IF NOT EXIST "..\scripted_vdplugin\_bin\Release_x86\scripted\scripted.vdplugin" (
ECHO scripted_vdplugin not compiled.
GOTO :END
)
REM -------------------------------------
FOR /F "tokens=2*" %%A IN (
'REG QUERY "HKLM\SOFTWARE\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ" ^|^|
REG QUERY "HKLM\SOFTWARE\Wow6432Node\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ"') DO SET "SEVENZIP=%%B\7z.exe"
IF NOT EXIST "%SEVENZIP%" (
ECHO 7Zip not found.
GOTO :END
)
REM -------------------------------------
SET PCKG_DIR=out\VirtualDub2_v2.1_win32
MKDIR %PCKG_DIR%
MKDIR %PCKG_DIR%\extra
MKDIR %PCKG_DIR%\plugins32
COPY /Y /V "docs\Changes.txt" "%PCKG_DIR%\Changes.txt"
COPY /Y /V "LICENSE.txt" "%PCKG_DIR%\LICENSE.txt"
COPY /Y /V "Readme.md" "%PCKG_DIR%\Readme.md"
COPY /Y /V "out\Release\vdub.exe" "%PCKG_DIR%\vdub.exe"
COPY /Y /V "out\Release\VirtualDub.exe" "%PCKG_DIR%\VirtualDub.exe"
COPY /Y /V "out\Release\VirtualDub.vdi" "%PCKG_DIR%\VirtualDub.vdi"
COPY /Y /V "dist\VirtualDub.chm" "%PCKG_DIR%\VirtualDub.chm"
COPY /Y /V "dist\extra\." "%PCKG_DIR%\extra\."
COPY /Y /V "out\Release\auxsetup.exe" "%PCKG_DIR%\extra\auxsetup.exe"
COPY /Y /V "out\Release\vdicmdrv.dll" "%PCKG_DIR%\extra\vdicmdrv.dll"
COPY /Y /V "out\Release\vdlaunch.exe" "%PCKG_DIR%\extra\vdlaunch.exe"
COPY /Y /V "out\Release\vdremote.dll" "%PCKG_DIR%\extra\vdremote.dll"
COPY /Y /V "out\Release\vdsvrlnk.dll" "%PCKG_DIR%\extra\vdsvrlnk.dll"
COPY /Y /V "dist\plugins32\." "%PCKG_DIR%\plugins32\."
COPY /Y /V "..\avlib_vdplugin\_bin\ffmpeg_win32\avcodec-61.dll" "%PCKG_DIR%\avcodec-61.dll"
COPY /Y /V "..\avlib_vdplugin\_bin\ffmpeg_win32\avformat-61.dll" "%PCKG_DIR%\avformat-61.dll"
COPY /Y /V "..\avlib_vdplugin\_bin\ffmpeg_win32\avutil-59.dll" "%PCKG_DIR%\avutil-59.dll"
COPY /Y /V "..\avlib_vdplugin\_bin\ffmpeg_win32\swresample-5.dll" "%PCKG_DIR%\swresample-5.dll"
COPY /Y /V "..\avlib_vdplugin\_bin\ffmpeg_win32\swscale-8.dll" "%PCKG_DIR%\swscale-8.dll"
COPY /Y /V "..\avlib_vdplugin\_bin\Release_x86\avlib-1.vdplugin" "%PCKG_DIR%\plugins32\avlib-1.vdplugin"
COPY /Y /V "..\avlib_vdplugin\Readme.md" "%PCKG_DIR%\plugins32\avlib-1_Readme.md"
COPY /Y /V "..\avlib_vdplugin\history.txt" "%PCKG_DIR%\plugins32\avlib-1_history.txt"
COPY /Y /V "..\scripted_vdplugin\_bin\Release_x86\scripted\scripted.vdplugin" "%PCKG_DIR%\plugins32\scripted.vdplugin"
COPY /Y /V "..\scripted_vdplugin\Readme.md" "%PCKG_DIR%\plugins32\scripted_Readme.md"
COPY /Y /V "..\scripted_vdplugin\history.txt" "%PCKG_DIR%\plugins32\scripted_history.txt"
REM -------------------------------------
FOR /F "USEBACKQ" %%F IN (`powershell -NoLogo -NoProfile -Command ^(Get-Item "%PCKG_DIR%\VirtualDub.exe"^).VersionInfo.FileVersion`) DO (SET FILE_VERSION=%%F)
SET PCKG_NAME=VirtualDub2_v%FILE_VERSION%_win32
"%SEVENZIP%" a -m0=lzma -mx9 -ms=on "out\%PCKG_NAME%.7z" ".\%PCKG_DIR%"
:END
ENDLOCAL
TIMEOUT /T 5
EXIT /B