LibreCAD+Mingw编译记录

青春须早为,岂能长少年。这篇文章主要讲述LibreCAD+Mingw编译记录相关的知识,希望能为你提供帮助。


目录
??一  编译OK??
??二 编译脚本修改??
??三 参考链接??
一  编译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)??
【LibreCAD+Mingw编译记录】


    推荐阅读