<commit_before>set PATH=%PATH%;C:\Qt\5.2.0\mingw48_32\bin
set PATH=%PATH%;C:\Qt\Tools\mingw48_32\bin

:: Delete old dist dir; the last thing we need is partial builds
rmdir /s /q dist
mkdir dist
mkdir dist\KanColleTool

:: Build the tool
cd tool
qmake
mingw32-make release
xcopy bin\KanColleTool.exe ..\dist\KanColleTool
mingw32-make clean
rmdir /s /q debug
rmdir /s /q release
cd ..

:: Build the viewer
cd viewer
qmake
mingw32-make release
xcopy release\KCTViewer.exe ..\dist\KanColleTool
mingw32-make clean
rmdir /s /q debug
rmdir /s /q release
cd ..

:: Copy MinGW32 DLLs that Qt doesn't catch automatically
xcopy C:\Qt\5.2.0\mingw48_32\bin\libgcc_s_dw2-1.dll dist\KanColleTool
xcopy C:\Qt\5.2.0\mingw48_32\bin\libstdc++-6.dll dist\KanColleTool
xcopy C:\Qt\5.2.0\mingw48_32\bin\libwinpthread-1.dll dist\KanColleTool

:: Let Qt collect DLLs
windeployqt --no-translations dist\KanColleTool\KCTViewer.exe
windeployqt --no-translations dist\KanColleTool\KanColleTool.exe

:: Delete things we don't need at all
rmdir /s /q dist\playlistformats
rmdir /s /q dist\printsupport
rmdir /s /q dist\qmltooling
rmdir /s /q dist\sqldrivers

:: Delete debug versions of frameworks
del /q dist\accessible\*d.dll
del /q dist\bearer\*d.dll
del /q dist\iconengines\*d.dll
del /q dist\imageformats\*d.dll
del /q dist\mediaservice\*d.dll
del /q dist\platforms\*d.dll

::pause
<commit_msg>Now winbuild.bat works for different Qt versions<commit_after>for /d %%f in (C:\Qt\*) do (set QTDIR=%%f)
for /d %%f in (%QTDIR%) do (set QTDIR2=%%f)
IF NOT DEFINED QTDIR2 set QTDIR2=%QTDIR%
for /d %%f in (%QTDIR2%\5.*) do (set QTBIN=%%f\mingw48_32\bin)

set PATH=%PATH%;%QTBIN%
set PATH=%PATH%;%QTDIR%\Tools\mingw48_32\bin
set PATH=%PATH%;C:\Qt\Tools\mingw48_32\bin

:: Delete old dist dir; the last thing we need is partial builds
rmdir /s /q dist
mkdir dist
mkdir dist\KanColleTool

:: Build the tool
cd tool
qmake
mingw32-make release
xcopy bin\KanColleTool.exe ..\dist\KanColleTool
mingw32-make clean
rmdir /s /q debug
rmdir /s /q release
cd ..

:: Build the viewer
cd viewer
qmake
mingw32-make release
xcopy release\KCTViewer.exe ..\dist\KanColleTool
mingw32-make clean
rmdir /s /q debug
rmdir /s /q release
cd ..

:: Copy MinGW32 DLLs that Qt doesn't catch automatically
xcopy %QTDIR%\mingw48_32\bin\libgcc_s_dw2-1.dll dist\KanColleTool
xcopy %QTDIR%\mingw48_32\bin\libstdc++-6.dll dist\KanColleTool
xcopy %QTDIR%\mingw48_32\bin\libwinpthread-1.dll dist\KanColleTool

:: Let Qt collect DLLs
windeployqt --no-translations dist\KanColleTool\KCTViewer.exe
windeployqt --no-translations dist\KanColleTool\KanColleTool.exe

:: Delete things we don't need at all
rmdir /s /q dist\playlistformats
rmdir /s /q dist\printsupport
rmdir /s /q dist\qmltooling
rmdir /s /q dist\sqldrivers

:: Delete debug versions of frameworks
del /q dist\accessible\*d.dll
del /q dist\bearer\*d.dll
del /q dist\iconengines\*d.dll
del /q dist\imageformats\*d.dll
del /q dist\mediaservice\*d.dll
del /q dist\platforms\*d.dll

::pause

{'fraction_non_alphanumeric': 0.12277759141227776, 'fraction_numerical': 0.029855753102985574, 'mean_word_length': 4.0456852791878175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6906826', 'n_tokens_mistral': 1305, 'n_tokens_neox': 1175, 'n_words': 322}