OSDN Git Service

UnitTests: Add DiffItemListTest
[winmerge-jp/winmerge-jp.git] / DownloadDeps.cmd
1 @echo off
2 setlocal
3 set path="%ProgramFiles%\7-zip";"%ProgramFiles(x86)%\7-zip";%path%
4 7z > NUL
5 if not %ERRORLEVEL% == 0 (
6   echo 7-Zip is not installed
7   goto :eof
8 )
9 @echo on
10
11 set downloadsdir=%~dp0\build\WinMergeDownloadDeps
12 set urls_destdirs=^
13 https://github.com/WinMerge/winmerge/releases/download/winmerge_manual_another_build_tools_v2/winmerge_manual_another_build_tools_v2.zip!Docs\Manual\Tools ^
14 https://github.com/WinMerge/winmerge/releases/download/ShellExtension-1.17.14.0/ShellExtension-1.17.14.0.zip!Build ^
15 https://github.com/WinMerge/winmerge/releases/download/Merge7z1900.5/Merge7z1900.5-win32.zip!Build ^
16 https://github.com/WinMerge/winmerge/releases/download/Merge7z1900.5/Merge7z1900.5-x64.zip!Build\X64 ^
17 https://github.com/WinMerge/winmerge/releases/download/Merge7z1900.5/Merge7z1900.5-ARM64.zip!Build\ARM64 ^
18 https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.7-win32.zip!Build ^
19 https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.7-x64.zip!Build\X64 ^
20 https://github.com/WinMerge/frhed/releases/download/0.10904.2017/frhed-0.10904.2017.7-ARM64.zip!Build\ARM64 ^
21 https://github.com/WinMerge/winimerge/releases/download/v1.0.30/winimerge-1.0.30.0-exe.zip!Build ^
22 https://github.com/WinMerge/patch/releases/download/v2.5.9-7/patch-2.5.9-7-bin.zip!Build\GnuWin32 ^
23 https://github.com/htacg/tidy-html5/releases/download/5.4.0/tidy-5.4.0-w32-mt-XP.zip!Build\tidy-html5 ^
24 https://github.com/htacg/tidy-html5/archive/refs/tags/5.4.0.zip!Build\tidy-html5 ^
25 https://github.com/stedolan/jq/releases/download/jq-1.4/jq-win32.exe!Build\jq ^
26 https://github.com/stedolan/jq/archive/refs/tags/jq-1.4.zip!Build\jq ^
27 http://www.magicnotes.com/steelbytes/SBAppLocale_ENG.zip!Docs\Manual\Tools
28
29 pushd "%~dp0"
30 mkdir %downloadsdir% 2> NUL
31
32 for %%p in (%urls_destdirs%) do (
33   for /F "tokens=1,2 delims=!" %%u in ("%%p") do (
34     if not exist %downloadsdir%\%%~nxu (
35       powershell -command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest %%u -Outfile %downloadsdir%\%%~nxu"
36     )
37     if "%%~xu" == ".zip" (
38       7z x %downloadsdir%\%%~nxu -aoa -o%%v
39     ) else (
40       mkdir %%v > NUL
41       copy %downloadsdir%\%%~nxu %%v
42     )
43   )
44 )
45
46 for /d %%i in (build\tidy-html5\tidy-5.4.0-w32-mt-XP\*) do move %%i build\tidy-html5\
47
48 for %%i in (Build Build\X64 Build\ARM64) do (
49   for %%j in (Release Debug Test) do (
50     mkdir %%i\%%j\Merge7z 2> NUL
51     mkdir %%i\%%j\WinIMerge 2> NUL
52     mkdir %%i\%%j\Frhed 2> NUL
53     mkdir %%i\%%j\Filters 2> NUL
54     mkdir %%i\%%j\ColorSchemes 2> NUL
55     mkdir %%i\%%j\MergePlugins 2> NUL
56     mkdir %%i\%%j\Commands\jq 2> NUL
57     mkdir %%i\%%j\Commands\tidy-html5 2> NUL
58     mkdir %%i\%%j\Commands\GnuWin32 2> NUL
59     xcopy /s/y %%i\Merge7z %%i\%%j\Merge7z\
60     xcopy /s/y %%i\Frhed %%i\%%j\Frhed\
61     xcopy /s/y Build\GnuWin32 %%i\%%j\Commands\GnuWin32\
62     copy Build\jq\jq-win32.exe %%i\%%j\Commands\jq\jq.exe
63     copy Build\jq\jq-jq-1.4\COPYING %%i\%%j\Commands\jq\
64     copy Build\tidy-html5\bin\tidy.* %%i\%%j\Commands\tidy-html5\
65     copy Build\tidy-html5\tidy-html5-5.4.0\README\LICENSE.md %%i\%%j\Commands\tidy-html5\
66     xcopy /s/y Plugins\Commands %%i\%%j\Commands
67     xcopy /s/y Filters %%i\%%j\Filters\
68     xcopy /s/y ColorSchemes %%i\%%j\ColorSchemes\
69     xcopy /s/y Plugins\dlls\*.sct %%i\%%j\MergePlugins\
70     xcopy /s/y Plugins\Plugins.xml %%i\%%j\MergePlugins\
71     if "%%i" == "Build" (
72       copy Build\WinIMerge\bin\WinIMergeLib.dll %%i\%%j\WinIMerge\
73       copy Plugins\dlls\*.dll %%i\%%j\MergePlugins\
74     ) else if "%%i" == "Build\X64" (
75       copy Build\WinIMerge\bin64\WinIMergeLib.dll %%i\%%j\WinIMerge\
76       copy Plugins\dlls\X64\*.dll %%i\%%j\MergePlugins\
77     ) else if "%%i" == "Build\ARM64" (
78       copy Build\WinIMerge\binARM64\WinIMergeLib.dll %%i\%%j\WinIMerge\
79       copy Plugins\dlls\ARM64\*.dll %%i\%%j\MergePlugins\
80     )
81   )
82 )
83
84 popd