16,210
社区成员
发帖
与我相关
我的任务
分享
@echo off
set path=R:\mingw64\bin;R:\Perl\bin;
set QTDIR=%cd%
echo -- 配置 debug-and-release --
time /t
configure -platform win32-g++ -opensource -debug-and-release -no-exceptions -no-style-plastique -no-
style-cleanlooks -no-style-motif -no-style-cde -no-qt3support -no-script -no-scripttools -no-webkit -
nomake examples -nomake demos
echo -- 编译 debug-and-release --
jom -f Makefile
echo -- 编译结束,开始优化 debug dll 文件 --
time /t
pause
cd %QTDIR%\bin
for /f "delims=" %%i in ('dir /b /a-d /s "*d4.dll"') do strip %%i
cd %QTDIR%\lib
for /f "delims=" %%i in ('dir /b /a-d /s "*d4.dll"') do strip %%i
cd %QTDIR%\imports
for /f "delims=" %%i in ('dir /b /a-d /s "*d4.dll"') do strip %%i
cd %QTDIR%\plugins
for /f "delims=" %%i in ('dir /b /a-d /s "*d4.dll"') do strip %%i
echo -- 生成 include 文件 --
copy /y "%QTDIR%\src\corelib\global\qconfig.h" "%QTDIR%\qconfig.h"
rd /s /q "%QTDIR%\include"
perl.exe %QTDIR%\bin\syncqt -copy
copy /y "%QTDIR%\qconfig.h" "%QTDIR%\QtCore\qconfig.h"
copy /y "%QTDIR%\mkspecs\win32-g++\*.*" "%QTDIR%\mkspecs\default\*.*"
echo -- 开始清理无用的文件 --
time /t
pause
echo -- 删除目录,文件 --
del /q "%QTDIR%\bin\*d4.dll"
del /q "%QTDIR%\bin\createpackage"
del /q "%QTDIR%\bin\createpackage.bat"
del /q "%QTDIR%\bin\createpackage.pl"
del /q "%QTDIR%\bin\elf2e32_qtwrapper"
del /q "%QTDIR%\bin\elf2e32_qtwrapper.bat"
del /q "%QTDIR%\bin\elf2e32_qtwrapper.pl"
del /q "%QTDIR%\bin\patch_capabilities"
del /q "%QTDIR%\bin\patch_capabilities.bat"
del /q "%QTDIR%\bin\patch_capabilities.pl"
del /q "%QTDIR%\bin\syncqt"
del /q "%QTDIR%\bin\syncqt.bat"
del /q "%QTDIR%\bin\findtr"
del /q "%QTDIR%\bin\setcepaths.bat"
rd /s /q "%QTDIR%\translations\debug"
rd /s /q "%QTDIR%\translations\release"
del /q "%QTDIR%\translations\*.ts"
del /q "%QTDIR%\translations\check-ts.pl"
del /q "%QTDIR%\translations\check-ts.xq"
del /q "%QTDIR%\translations\polish.qph"
del /q "%QTDIR%\translations\README"
rd /s /q "%QTDIR%\lib\fonts"
rd /s /q "%QTDIR%\lib\pkgconfig"
rd /s /q "%QTDIR%\config.profiles"
rd /s /q "%QTDIR%\config.tests"
rd /s /q "%QTDIR%\demos"
rd /s /q "%QTDIR%\doc"
rd /s /q "%QTDIR%\examples"
rd /s /q "%QTDIR%\qmake"
rd /s /q "%QTDIR%\templates"
rd /s /q "%QTDIR%\tools"
rd /s /q "%QTDIR%\util"
rd /s /q "%QTDIR%\tmp"
del /s /q "%QTDIR%\*.pro"
del /s /q "%QTDIR%\Makefile"
del /s /q "%QTDIR%\Makefile.*"
del /s /q "%QTDIR%\*LICENSE*"
echo -- 结束 --
echo 如果不想重新生成include文件,请手动删除 "%QTDIR%\qconfig.h"
time /t
pause