OSDN Git Service

Update Turkish.po
[winmerge-jp/winmerge-jp.git] / BuildArc.cmd
index bc4d3fd..34da0cc 100644 (file)
-cd /d "%~dp0"
+pushd "%~dp0"
 
+setlocal
 call SetVersion.cmd
-set DISTDIR=\Web Page\geocities
+if "%2" == "-ci" (
+  if exist .hg (
+    for /F "delims=" %%i in ('hg id') do set SAFEAPPVER=%SAFEAPPVER%-%%i
+  ) else if exist .git (
+    for /F "delims=" %%i in ('git rev-parse --short head') do set SAFEAPPVER=%SAFEAPPVER%-%%i
+  ) else (
+    set SAFEAPPVER=%SAFEAPPVER%-%APPVEYOR_BUILD_VERSION%
+  )
+)
+set DISTDIR=.\Build\Releases
 set path="%ProgramFiles%\7-zip";"%ProgramFiles(x86)%\7-zip";%path%
 
-copy "Build\WinMerge-%RCVER%-Setup.exe" "WinMerge-%APPVER%-Setup.exe"
-copy "Build\WinMerge-%RCVER%-x64-Setup.exe" "WinMerge-%APPVER%-x64-Setup.exe"
-7z.exe a -tzip "%DISTDIR%\WinMerge-%SAFEAPPVER%-Setup.exe.zip" "WinMerge-%APPVER%-Setup.exe"
-7z.exe a -tzip "%DISTDIR%\WinMerge-%SAFEAPPVER%-x64-Setup.exe.zip" "WinMerge-%APPVER%-x64-Setup.exe"
-
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\" 2> NUL
-
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\Languages" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\Languages" 2> NUL
+if "%1" == "" (
+  call :BuildZip 
+  call :BuildZip x64
+  call :BuildZip ARM64
+) else (
+  call :BuildZip %1 
+)
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\Filters" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\Filters" 2> NUL
+del "%DISTDIR%\winmerge-%SAFEAPPVER%-full-src.7z" 2> NUL
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\MergePlugins" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\MergePlugins" 2> NUL
+7z.exe a -t7z -xr!*.gcno -xr!*.gcda -xr!*.gcov -xr!*.orig -xr!*.o -xr!*.a -xr!.dep -xr!*.asm -xr!*.out -xr!debug_static* -xr!debug_shared* -xr!release_static* -xr!release_shared* -xr!*.bak -xr!*.lang -xr!*.db -xr!*.ncb  -xr!*.sdf -xr!*.bsc -xr!*.opt -xr!*.plg -xr!*.suo -xr!*.obj -xr!*.ilk -xr!*.pdb -xr!*.pch -xr!*.res -xr!*.exe -xr!*.sbr -xr!.vs -xr!*.VC.db-* -xr!*.zip -xr!WinMergeSplash.psd -xr!*.lib -xr!*.exp -xr!*.idb -xr!*.%COMPUTERNAME%.%USERNAME%.user -xr!BuildLog.htm -xr!ipch -xr!*.tlb -xr!*.tlog -xr!*.*~ -xr!CVS -xr!.svn -xr!.hg -xr!*.log -xr!*.lastbuildstate -xr!FreeImage*.dll -xr!WinIMergeLib.dll -xr!WinIMerge.exe -xr!BuildTmp -xr!Docs\Manual\Tools "%DISTDIR%\winmerge-%SAFEAPPVER%-full-src.7z" ArchiveSupport ColorSchemes Docs Externals Filters Installer Plugins ShellExtension Src Testing Tools Translations Web readme.txt Version.h Version.in *.cmd *.bat *.inf *.sln *.vbs
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\Docs" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\Docs" 2> NUL
+(
+echo "%DISTDIR%\WinMerge-%SAFEAPPVER%-Setup.exe"
+echo "%DISTDIR%\WinMerge-%SAFEAPPVER%-x64-Setup.exe"
+echo "%DISTDIR%\WinMerge-%SAFEAPPVER%-x64-PerUser-Setup.exe"
+echo "%DISTDIR%\WinMerge-%SAFEAPPVER%-ARM64-Setup.exe"
+echo "%DISTDIR%\winmerge-%SAFEAPPVER%-exe.zip"
+echo "%DISTDIR%\winmerge-%SAFEAPPVER%-x64-exe.zip"
+echo "%DISTDIR%\winmerge-%SAFEAPPVER%-ARM64-exe.zip"
+echo "%DISTDIR%\winmerge-%SAFEAPPVER%-pdb.7z"
+echo "%DISTDIR%\winmerge-%SAFEAPPVER%-x64-pdb.7z"
+echo "%DISTDIR%\winmerge-%SAFEAPPVER%-ARM64-pdb.7z"
+echo "%DISTDIR%\winmerge-%SAFEAPPVER%-full-src.7z"
+) > "%DISTDIR%\files.txt"
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\frhed" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed" 2> NUL
+popd
+goto :eof
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\frhed\Docs" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\Docs" 2> NUL
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\frhed\Languages" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\Languages" 2> NUL
+:BuildZip
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\WinIMerge" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\WinIMerge" 2> NUL
+set PLATFORM=%1
+if "%1" == "" (
+  set PLATFORMH=%1
+) else (
+  set PLATFORMH=%1-
+)
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\Merge7z" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\Merge7z" 2> NUL
+echo.
+echo ============================================================
+echo BUILD winmerge-%SAFEAPPVER%-%PLATFORMH%exe.zip...
+echo ============================================================
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\Merge7z\Lang" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\Merge7z\Lang" 2> NUL
+rmdir /q /s "%DISTDIR%\%PLATFORMH%zip-version" > NUL 2> NUL
+mkdir "%DISTDIR%" 2> NUL
 
-mkdir "%DISTDIR%\2.14-zip-version\WinMerge\GnuWin32" 2> NUL
-mkdir "%DISTDIR%\2.14-x64-zip-version\WinMerge\GnuWin32" 2> NUL
+rem Copy platform setups
+copy "Build\WinMerge-%RCVER%-%PLATFORMH%Setup.exe" "%DISTDIR%\WinMerge-%SAFEAPPVER%-%PLATFORMH%Setup.exe" > NUL
+if not "%1" == "" (
+  copy "Build\WinMerge-%RCVER%-%PLATFORMH%PerUser-Setup.exe" "%DISTDIR%\WinMerge-%SAFEAPPVER%-%PLATFORMH%PerUser-Setup.exe" > NUL
+)
 
-rem Readme
-for %%i in (Translations\Docs\Readme\ReadMe-Japanese.txt) do (
-  copy "%%i" "%DISTDIR%\2.14-zip-version\WinMerge\%%~nxi"
-  copy "%%i" "%DISTDIR%\2.14-x64-zip-version\WinMerge\%%~nxi"
+rem Create folder structure
+for %%i in (ColorSchemes Languages\ShellExtension Filters MergePlugins Docs Frhed\Docs Frhed\Languages WinIMerge Merge7z\Lang Commands\Apache-Tika Commands\tidy-html5 Commands\jq Commands\q Commands\GnuWin32) do (
+  mkdir "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\%%i" 2> NUL
 )
 
-rem Help
-copy Build\Manual\htmlhelp\WinMerge.chm "%DISTDIR%\2.14-zip-version\WinMerge\Docs"
-copy Build\Manual\htmlhelp\WinMerge_ja.chm "%DISTDIR%\2.14-zip-version\WinMerge\Docs"
-copy Build\Manual\htmlhelp\WinMerge.chm "%DISTDIR%\2.14-x64-zip-version\WinMerge\Docs"
-copy Build\Manual\htmlhelp\WinMerge_ja.chm "%DISTDIR%\2.14-x64-zip-version\WinMerge\Docs"
+rem Docs
+echo Copy Docs...
+for %%i in (Translations\Docs\Readme\ReadMe-*.txt Build\Manual\htmlhelp\WinMerge*.chm Docs\Users\ReleaseNotes.html Docs\Users\ChangeLog.html) do (
+  copy "%%i" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Docs" > NUL
+)
+for %%i in (Src\COPYING Docs\Users\Contributors.txt Docs\Users\ReadMe.txt) do (
+  copy "%%i" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge" > NUL
+)
 
 rem Excecutables
-copy Build\MergeUnicodeRelease\WinMergeU.exe "%DISTDIR%\2.14-zip-version\WinMerge\"
-copy Build\X64\MergeUnicodeRelease\WinMergeU.exe "%DISTDIR%\2.14-x64-zip-version\WinMerge\"
-copy Plugins\WinMerge32BitPluginProxy\Release\WinMerge32BitPluginProxy.exe "%DISTDIR%\2.14-x64-zip-version\WinMerge\
+echo Copy Excecutables...
+copy Build\%PLATFORM%\Release\WinMergeU.exe "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+if not "%1" == "" (
+  copy Plugins\WinMerge32BitPluginProxy\Release\WinMerge32BitPluginProxy.exe "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+)
 
 rem ShellExtension
-copy "Build\ShellExtensionUnicode Release mindependency\ShellExtensionU.dll" "%DISTDIR%\2.14-zip-version\WinMerge\"
-copy "Build\X64\ShellExtensionUnicode Release mindependency\ShellExtensionX64.dll" "%DISTDIR%\2.14-zip-version\WinMerge\"
-copy "Build\X64\ShellExtensionUnicode Release mindependency\ShellExtensionX64.dll" "%DISTDIR%\2.14-x64-zip-version\WinMerge\"
-copy ShellExtension\*Register.bat "%DISTDIR%\2.14-zip-version\WinMerge\"
-copy ShellExtension\*Register.bat "%DISTDIR%\2.14-x64-zip-version\WinMerge\"
-
-rem Translation
-copy Build\MergeUnicodeRelease\Languages\Japanese.po "%DISTDIR%\2.14-zip-version\WinMerge\Languages\"
-copy Build\MergeUnicodeRelease\MergeLang.dll "%DISTDIR%\2.14-zip-version\WinMerge\"
-copy Build\X64\MergeUnicodeRelease\Languages\Japanese.po "%DISTDIR%\2.14-x64-zip-version\WinMerge\Languages\"
-copy Build\X64\MergeUnicodeRelease\MergeLang.dll "%DISTDIR%\2.14-x64-zip-version\WinMerge\"
+echo Copy ShellExtension...
+if not "%1" == "ARM64" (
+  copy "Build\ShellExtension\ShellExtensionU.dll" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+  copy "Build\ShellExtension\ShellExtensionX64.dll" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+  copy "Build\ShellExtension\x64\WinMergeContextMenu.dll" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+)
+if "%1" == "ARM64" (
+  copy "Build\ShellExtension\ShellExtensionARM64.dll" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+  copy "Build\ShellExtension\ARM64\WinMergeContextMenu.dll" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+)
+copy ShellExtension\Register.bat "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+copy ShellExtension\RegisterPerUser.bat "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+copy ShellExtension\RegisterWinMergeContextMenuPackage.bat "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+copy ShellExtension\UnRegister.bat "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+copy ShellExtension\UnRegisterPerUser.bat "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+copy ShellExtension\UnregisterWinMergeContextMenuPackage.bat "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+copy "Build\ShellExtension\WinMergeContextMenuPackage.msix" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+
+rem Translations
+echo Copy Translations...
+copy Build\%PLATFORM%\Release\Languages\*.po "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Languages\" > NUL
+copy Translations\ShellExtension\*.po "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Languages\ShellExtension" > NUL
+
+rem ColorSchemes
+echo Copy ColorSchemes...
+for %%i in (ColorSchemes\*.ini) do (
+  copy "%%i" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\ColorSchemes" > NUL
+)
 
 rem Filters
-for %%i in (Build\Filters\*.flt Build\Filters\*.tmpl Build\Filters\*.txt) do (
-  copy "%%i" "%DISTDIR%\2.14-zip-version\WinMerge\Filters\%%~nxi"
-  copy "%%i" "%DISTDIR%\2.14-x64-zip-version\WinMerge\Filters\%%~nxi"
+echo Copy Filters...
+for %%i in (Filters\*.flt Filters\*.tmpl Filters\*.txt) do (
+  copy "%%i" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Filters" > NUL
 )
 
 rem Plugins
-copy Plugins\dlls\*.dll "%DISTDIR%\2.14-zip-version\WinMerge\MergePlugins\"
-copy Plugins\dlls\X64\*.dll "%DISTDIR%\2.14-x64-zip-version\WinMerge\MergePlugins\"
-copy Plugins\dlls\*.sct "%DISTDIR%\2.14-zip-version\WinMerge\MergePlugins\"
-copy Plugins\dlls\*.sct "%DISTDIR%\2.14-x64-zip-version\WinMerge\MergePlugins\"
-del "%DISTDIR%\2.14-zip-version\WinMerge\MergePlugins\CompareMS*.dll"
-del "%DISTDIR%\2.14-zip-version\WinMerge\MergePlugins\Watch*OfLog.dll"
-rem del "%DISTDIR%\2.14-zip-version\WinMerge\MergePlugins\DisplayXMLFiles.dll"
-del "%DISTDIR%\2.14-x64-zip-version\WinMerge\MergePlugins\Watch*OfLog.dll"
-rem del "%DISTDIR%\2.14-x64-zip-version\WinMerge\MergePlugins\DisplayXMLFiles.dll"
+echo Copy Plugins...
+copy Plugins\dlls\%PLATFORM%\*.dll "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\MergePlugins\" > NUL
+copy Plugins\dlls\*.sct "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\MergePlugins\" > NUL
+del "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\MergePlugins\CompareMS*.dll" 2> NUL
+del "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\MergePlugins\Watch*OfLog.dll" 2> NUL
+del "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\MergePlugins\DisplayXMLFiles.dll" 2> NUL
 
 rem 7zPlugins
-copy Build\MergeUnicodeRelease\Merge7z\Merge7z*.dll "%DISTDIR%\2.14-zip-version\WinMerge\Merge7z\"
-copy Build\MergeUnicodeRelease\Merge7z\7z.dll "%DISTDIR%\2.14-zip-version\WinMerge\Merge7z\"
-copy Build\MergeUnicodeRelease\Merge7z\*.txt "%DISTDIR%\2.14-zip-version\WinMerge\Merge7z\"
-copy Build\MergeUnicodeRelease\Merge7z\Lang\*.txt "%DISTDIR%\2.14-zip-version\WinMerge\Merge7z\Lang\"
-copy Build\X64\MergeUnicodeRelease\Merge7z\Merge7z*.dll "%DISTDIR%\2.14-x64-zip-version\WinMerge\Merge7z\"
-copy Build\X64\MergeUnicodeRelease\Merge7z\7z.dll "%DISTDIR%\2.14-x64-zip-version\WinMerge\Merge7z\"
-copy Build\X64\MergeUnicodeRelease\Merge7z\*.txt "%DISTDIR%\2.14-x64-zip-version\WinMerge\Merge7z\"
-copy Build\X64\MergeUnicodeRelease\Merge7z\Lang\*.txt "%DISTDIR%\2.14-x64-zip-version\WinMerge\Merge7z\Lang\"
+echo Copy 7zPlugins...
+copy Build\%PLATFORM%\Merge7z\Merge7z.dll "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Merge7z\" > NUL
+copy Build\%PLATFORM%\Merge7z\7z.dll "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Merge7z\" > NUL
+copy Build\%PLATFORM%\Merge7z\*.txt "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Merge7z\" > NUL
+copy Build\%PLATFORM%\Merge7z\Lang\*.txt "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Merge7z\Lang\" > NUL
 
 rem Frhed
-copy Externals\Frhed\GPL.txt "%DISTDIR%\2.14-zip-version\WinMerge\frhed\"
-rem copy Externals\Frhed\Build\FRHED_vc10\Win32\UnicodeRelease\frhed.exe "%DISTDIR%\2.14-zip-version\WinMerge\frhed\"
-copy Externals\Frhed\Build\FRHED_vc10\Win32\UnicodeRelease\hekseditU.dll "%DISTDIR%\2.14-zip-version\WinMerge\frhed\"
-copy Externals\Frhed\Build\FRHED_vc10\Win32\UnicodeRelease\Docs\*.txt "%DISTDIR%\2.14-zip-version\WinMerge\frhed\Docs"
-copy Externals\Frhed\Build\FRHED_vc10\Win32\UnicodeRelease\Docs\Sample.tpl "%DISTDIR%\2.14-zip-version\WinMerge\frhed\Docs"
-copy Externals\Frhed\Build\FRHED_vc10\Win32\UnicodeRelease\Languages\*.po "%DISTDIR%\2.14-zip-version\WinMerge\frhed\Languages"
-copy Externals\Frhed\Build\FRHED_vc10\Win32\UnicodeRelease\Languages\heksedit.lng "%DISTDIR%\2.14-zip-version\WinMerge\frhed\Languages"
-copy Externals\Frhed\GPL.txt "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\"
-rem copy Externals\Frhed\Build\FRHED_vc10\x64\UnicodeRelease\frhed.exe "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\"
-copy Externals\Frhed\Build\FRHED_vc10\x64\UnicodeRelease\hekseditU.dll "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\"
-copy Externals\Frhed\Build\FRHED_vc10\x64\UnicodeRelease\Docs\*.txt "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\Docs"
-copy Externals\Frhed\Build\FRHED_vc10\x64\UnicodeRelease\Docs\Sample.tpl "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\Docs"
-copy Externals\Frhed\Build\FRHED_vc10\x64\UnicodeRelease\Languages\*.po "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\Languages"
-copy Externals\Frhed\Build\FRHED_vc10\x64\UnicodeRelease\Languages\heksedit.lng "%DISTDIR%\2.14-x64-zip-version\WinMerge\frhed\Languages"
+echo Copy Frhed...
+copy Build\%PLATFORM%\Frhed\GPL.txt "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\frhed\" > NUL
+rem copy Build\%PLATFORM%\Frhed\frhed.exe "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\frhed\" > NUL
+copy Build\%PLATFORM%\Frhed\hekseditU.dll "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\frhed\" > NUL
+copy Build\%PLATFORM%\Frhed\Docs\*.txt "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\frhed\Docs" > NUL
+copy Build\%PLATFORM%\Frhed\Docs\Sample.tpl "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\frhed\Docs" > NUL
+copy Build\%PLATFORM%\Frhed\Languages\*.po "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\frhed\Languages" > NUL
+copy Build\%PLATFORM%\Frhed\Languages\heksedit.lng "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\frhed\Languages" > NUL
 
 rem WinIMerge
-copy Externals\WinIMerge\GPL.txt "%DISTDIR%\2.14-zip-version\WinMerge\WinIMerge\"
-copy Externals\WinIMerge\freeimage-license-gplv2.txt "%DISTDIR%\2.14-zip-version\WinMerge\WinIMerge\"
-rem copy Externals\WinIMerge\Build\Release\WinIMerge.exe "%DISTDIR%\2.14-zip-version\WinMerge\WinIMerge\"
-copy Externals\WinIMerge\Build\Release\WinIMergeLib.dll "%DISTDIR%\2.14-zip-version\WinMerge\WinIMerge\"
-copy "%VS140COMNTOOLS%\..\..\VC\redist\x86\Microsoft.VC140.OpenMP\vcomp140.dll" "%DISTDIR%\2.14-zip-version\WinMerge\
-copy Externals\WinIMerge\GPL.txt "%DISTDIR%\2.14-x64-zip-version\WinMerge\WinIMerge\"
-copy Externals\WinIMerge\freeimage-license-gplv2.txt "%DISTDIR%\2.14-x64-zip-version\WinMerge\WinIMerge\"
-rem copy Externals\WinIMerge\Build\x64\Release\WinIMerge.exe "%DISTDIR%\2.14-x64-zip-version\WinMerge\WinIMerge\"
-copy Externals\WinIMerge\Build\x64\Release\WinIMergeLib.dll "%DISTDIR%\2.14-x64-zip-version\WinMerge\WinIMerge\"
-copy "%VS140COMNTOOLS%\..\..\VC\redist\x64\Microsoft.VC140.OpenMP\vcomp140.dll" "%DISTDIR%\2.14-x64-zip-version\WinMerge\
-
-rem Patch
-xcopy /s/y "C:\Program Files\WinMerge\GnuWin32" "%DISTDIR%\2.14-zip-version\WinMerge\GnuWin32\"
-xcopy /s/y "C:\Program Files\WinMerge\GnuWin32" "%DISTDIR%\2.14-x64-zip-version\WinMerge\GnuWin32\"
-
-7z.exe a -tzip "%DISTDIR%\winmerge-%SAFEAPPVER%-exe.zip" "%DISTDIR%\2.14-zip-version\WinMerge\"
-7z.exe a -tzip "%DISTDIR%\winmerge-%SAFEAPPVER%-x64-exe.zip" "%DISTDIR%\2.14-x64-zip-version\WinMerge\"
-
-del "%DISTDIR%\winmerge-%SAFEAPPVER%-full-src.7z"
-
-7z.exe a -t7z -xr!*.gcno -xr!*.gcda -xr!*.gcov -xr!*.orig -xr!*.o -xr!*.a -xr!.dep -xr!*.out -xr!debug_static* -xr!debug_shared* -xr!release_static* -xr!release_shared* -xr!*.bak -xr!*.lang -xr!*.db -xr!*.ncb  -xr!*.sdf -xr!*.bsc -xr!*.opt -xr!*.plg -xr!*.suo -xr!*.obj -xr!*.ilk -xr!*.pdb -xr!*.pch -xr!*.res -xr!*.exe -xr!*.sbr -xr!*.zip -xr!WinMergeSplash.psd -xr!*.lib -xr!*.exp -xr!*.idb -xr!*.%COMPUTERNAME%.%USERNAME%.user -xr!BuildLog.htm -xr!CVS -xr!.svn -xr!ipch -xr!*.tlb -xr!*.tlog -xr!*.un~ -xr!CVS -xr!.hg -xr!*.log -xr!*.lastbuildstate -xr!FreeImage*.dll -xr!WinIMergeLib.dll -xr!WinIMerge.exe -xr!BuildTmp "%DISTDIR%\winmerge-%SAFEAPPVER%-full-src.7z" ArchiveSupport Docs Externals Filters Installer Plugins ShellExtension Src Testing Tools Translations Web readme.txt Version.h *.cmd *.bat *.inf *.sln *.vbs
+echo Copy WinIMerge...
+copy Build\WinIMerge\GPL.txt "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\WinIMerge\" > NUL
+copy Build\WinIMerge\freeimage-license-gplv2.txt "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\WinIMerge\" > NUL
+if "%1" == "" (
+  rem copy Build\WinIMerge\bin\WinIMerge.exe "%DISTDIR%\zip-version\WinMerge\WinIMerge\" > NUL
+  copy Build\WinIMerge\bin\WinIMergeLib.dll "%DISTDIR%\zip-version\WinMerge\WinIMerge\" > NUL
+  copy Build\WinIMerge\bin\vcomp*.dll "%DISTDIR%\zip-version\WinMerge\" > NUL
+) else (
+  rem copy Build\WinIMerge\bin64\WinIMerge.exe "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\WinIMerge\" > NUL
+  copy Build\WinIMerge\bin64\WinIMergeLib.dll "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\WinIMerge\" > NUL
+  copy Build\WinIMerge\bin64\vcomp*.dll "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\" > NUL
+)
 
-(
-echo "%DISTDIR%\WinMerge-%SAFEAPPVER%-Setup.exe.zip"
-echo "%DISTDIR%\WinMerge-%SAFEAPPVER%-x64-Setup.exe.zip"
-echo "%DISTDIR%\winmerge-%SAFEAPPVER%-exe.zip"
-echo "%DISTDIR%\winmerge-%SAFEAPPVER%-x64-exe.zip"
-echo "%DISTDIR%\winmerge-%SAFEAPPVER%-full-src.7z"
-) > "%DISTDIR%\jp_files.txt"
+rem Commands
+echo Copy Commands...
+xcopy /s/y Plugins\Commands "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Commands"
 
-pause
+rem Patch
+echo Copy Patch...
+xcopy /s/y Build\GnuWin32 "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Commands\GnuWin32\" > NUL
+
+rem Copy jq...
+echo Copy jq...
+copy Build\jq\jq-win32.exe "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Commands\jq\jq.exe" > NUL
+copy Build\jq\jq-jq-1.4\COPYING "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Commands\jq\" > NUL
+
+rem Copy tidy-html5...
+echo Copy tidy-html5...
+copy Build\tidy-html5\bin\tidy.* "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Commands\tidy-html5\" > NUL
+copy Build\tidy-html5\tidy-html5-5.4.0\README\LICENSE.md "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Commands\tidy-html5\" > NUL
+
+rem Plugin.xml
+copy Plugins\Plugins.xml "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\MergePlugins\" > NUL
+
+echo.
+echo ------------------------------------------------------------
+echo Pack archive...
+echo ------------------------------------------------------------
+7z.exe a -tzip "%DISTDIR%\winmerge-%SAFEAPPVER%-%PLATFORMH%exe.zip" "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\"
+set PDBFILE="Build\%PLATFORM%\Release\WinMergeU.pdb"
+7z.exe a -t7z  "%DISTDIR%\winmerge-%SAFEAPPVER%-%PLATFORMH%pdb.7z" %PDBFILE:\\=\%
+
+goto :eof