Qt Release程序 发布过程

    技术2025-02-02  7

    1.1 用 windeplyqt 提取 dll

    提取应用程序依赖.dll文件 cd ......./release windeplyqt xxxxx.exe 查找潜在依赖 .dll ldd xxxxx.exe 创建桌面快捷方式: setup.bat, (文件保存编码为 “中文ANSI”,快捷方式就可以是中文了) mshta VBScript:Execute("Set a=CreateObject(""WScript.Shell""):Set b=a.CreateShortcut(a.SpecialFolders(""Desktop"") & ""\xxxxx.lnk""):b.TargetPath=""%~dp0\xxxxx.exe"":b.WorkingDirectory=""%~dp0"":b.Save:close") 压缩整个文件夹: xxx.rar. 到新机零环境测试OK

    1.2 用 NSIS 制作安装程序

    基本使用参考: https://www.cnblogs.com/modou/p/3573772.html NSIS语法解析: https://blog.csdn.net/mfkjq/article/details/53307987 制作卸载器时注意 1、设置所有用户皆有操作权限 (在Section Uninstall函数中) 2、检查是否正在运行 (在Function un.onInit函数中) 3、创建桌面快捷方式 (在Section -AdditionalIcons函数中)

    SetShellVarContext all KillProcDLL::KillProc "${PRODUCT_NAME}.exe" CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\${PRODUCT_NAME}.exe"

    — end —

    Processed: 0.009, SQL: 9