过去的两年里,我使用 Scoop 管理应用程序,受限于网络,使用体验并不是很好。我决定使用常规安装程序,在程序和功能里管理应用程序。但是,部分好用的开源软件并没有提供安装程序。

之前的文章提到过,使用 Advanced Installer 创建安装包。今天,发现了一款更简单的安装包创建程序:Inno Setup,基于脚本创建安装包,看似复杂,但是学习成本不高。

只需要编写一个 ISS 脚本便可以制作安装包。下面展示制作 Snipaste 的安装包的脚本。

[Setup]
AppName=Snipaste
AppVersion=1.16.2
WizardStyle=modern
DefaultDirName={autopf}\Snipaste
DefaultGroupName=Snipaste
UninstallDisplayIcon={app}\Snipaste.exe
UninstallDisplayName=Snipaste 1.16.2
Compression=lzma2
SolidCompression=yes
PrivilegesRequired=lowest 
OutputDir=.
OutputBaseFilename=SnipasteSetup

[Files]
Source: "C:\Users\Felixmaker\Downloads\Snipaste-1.16.2-x86\*"; DestDir: "{app}"; Flags: recursesubdirs;

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

简单学习后,生产力便可大幅度提升!

最后修改:2024 年 04 月 20 日
如果觉得我的文章对你有用,请随意赞赏