发布时间:2024-03-06 11:01
目录
一 编译OK
二 编译脚本修改
三 参考链接
脚本编译可以直接得到部署安装包。
:set-windows-env.bat
@echo off
if \"%Qt_DIR%\"==\"\" goto SetEnv
if \"%NSIS_DIR%\"==\"\" goto SetEnv
goto Exit
:SetEnv
:set Qt_DIR=C:\\Qt\\Qt5.4.0\\5.4
:set NSIS_DIR=C:\\Program Files (x86)\\NSIS
:set MINGW_VER=mingw491_32
set Qt_DIR=C:\\Qt\\5.15.2
set NSIS_DIR=C:\\Program Files (x86)\\NSIS
set MINGW_VER=mingw81_32
if exist custom-windows.bat call custom-windows.bat
set PATH=%Qt_DIR%\\%MINGW_VER%\\bin;%Qt_DIR%\\..\\Tools\\%MINGW_VER%\\bin;%NSIS_DIR%;%PATH%
:Exit
echo on
:custom-windows.bat
set Qt_DIR=C:\\Qt\\5.15.2
set NSIS_DIR=C:\\PROGRA~2\\NSIS
set MINGW_VER=mingw81_32
set LC_NSIS_FILE=nsis-5.4.nsi
:custom.nsh
!define Qt_Dir \"C:\\Qt\"
!define Qt_Version \"5.15.2\"
!define Mingw_Ver \"mingw81_32\"
:build-windows.bat
call set-windows-env.bat
pushd ..
qmake.exe librecad.pro -r -spec win32-g++
if not _%1==_NoClean (
mingw32-make.exe clean
)
mingw32-make.exe -j4
if NOT exist windows\\LibreCAD.exe (
echo \"Building windows\\LibreCAD.exe failed!\"
exit /b /1
)
windeployqt.exe windows\\LibreCAD.exe
popd
call build-win-setup.bat
Build from source - LibreCAD wiki
Build from source · LibreCAD/LibreCAD Wiki (github.com)