-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbuild_microsoft_store_package.bat
More file actions
49 lines (46 loc) · 1.8 KB
/
Copy pathbuild_microsoft_store_package.bat
File metadata and controls
49 lines (46 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@echo off
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: 定义Qt目录
set "QT_DIR=C:/Qt/Qt6.2.0/6.2.0/msvc64/bin"
set "QT_TOOLS_DIR=C:/Qt/Qt6.2.0/Tools/msvc64/bin"
:: 定义Inno Setup目录
set "INNO_SETUP_DIR=C:/Program Files (x86)/Inno Setup 6"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: 定义版本号
set /p QUARDCRT_VERSION=<version.txt
:: 设置环境变量
set "PATH=%QT_DIR%;%QT_TOOLS_DIR%;%INNO_SETUP_DIR%;%PATH%"
:: 编译
del .qmake.stash Makefile
if exist ".\build_debug" (
rmdir /Q /S .\build_debug
)
if exist ".\build_release" (
rmdir /Q /S .\build_release
)
lrelease quardCRT.pro
qmake quardCRT.pro -tp vc CONFIG+=microsoft_store_build
msbuild quardCRT.vcxproj /p:Configuration=Release /p:Platform=x64 /p:BuildInParallel=false
:: clean打包目录
mkdir ".\package"
:: 构建打包目录
xcopy /y .\build_release\out\quardCRT.exe .\package\
:: 使用windeployqt拷贝依赖dll库到打包目录
windeployqt --dir .\package .\package\quardCRT.exe
xcopy /y "%Python3_ROOT_DIR%\python311.dll" ".\package\"
xcopy /y "%Python3_ROOT_DIR%\Lib" ".\package\pythonlib\lib" /E /I
xcopy /y "D:\libssh2\bin\*.dll" ".\package\"
xcopy /y .\scripts\Profile.ps1 .\package\
xcopy /y .\font\inziu-iosevkaCC-SC-regular.ttf .\package\
mkdir ".\package\plugins"
mkdir ".\package\plugins\QuardCRT"
:: 判断是否存在prebuilt_plugins目录
if exist ".\prebuilt_plugins" (
xcopy /y .\prebuilt_plugins\*.dll .\package\plugins\QuardCRT\
)
if exist ".\package\vc_redist.x64.exe" (
del /f /q ".\package\vc_redist.x64.exe"
)
echo "build success!"
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::