【商业化】【msix打包】生成初始安装程序

【背景】

发现用msix打包工具打包python做的exe时总找不到程序入口点,后来理了一下才发现自己误会了,需要先生成一个基本的setup.exe,msix的打包是基于这个初始的安装程序进行的。

【初始安装程序的生成方法】

可以使用免费工具inno setup来创建初始安装包。
样例脚本如下:

[Setup]
AppName=SimpleScreenShot
AppVersion=1.0.2.0
DefaultDirName={pf}\SimpleScreenShot
DefaultGroupName=SimpleScreenShot
OutputBaseFilename=SimpleScreenShotInstaller
Compression=lzma
SolidCompression=yes

[Files]
; 将路径替换为你的应用文件夹路径
Source: "D:\MSIX\SimpleScreenShot\SimpleScreenShot.exe"; DestDir: "C:\Program Files (x86)\SimpleScreenShot"; Flags: ignoreversion
Source: "D:\MSIX\SimpleScreenShot\*"; DestDir: "C:\Program Files (x86)\SimpleScreenShot"; Flags: ignoreversion recursesubdirs

[Icons]
Name: "{group}\SimpleScreenShot"; Filename: "{app}\SimpleScreenShot.exe"

[Run]
Filename: "D:\MSIX\install\SimpleScreenShot.exe"; Description: "Launch SimpleScreenShot"; Flags: nowait postinstall skipifsilent

其中{group}这样的变量会自动匹配,不用自己指定。
只需要点击Buile-》Compile,然后Open Output Folder就可以得到exe安装程序了。
如果点击Run会运行安装程序。
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_41697242/article/details/143364074