项目场景:
提示:这里简述项目相关背景:
将winform程序打包成安装程序以及将多个安装程序打包成一个安装程序,顺序安装
打包软件
1.HM NIS Edit
2.NSIS
3.Inno Setup Compiler
解决方案:
提示:这里填写该问题的具体解决方案:
1.HM NIS Edit+NSIS,依据教程打包单个程序,添加winforn主程序/bin/release下的所有文件及其他资源文件,并设置启动程序即exe程序
2.Inno Setup Compiler打包多个程序
[Files]
Source: "D:\Users\project\安装文件\dotnetfx45_full_x86_x64.exe"; DestDir: "{app}";
Source: "D:\Users\project\安装文件\读写器V2.1.3.0Setup.exe"; DestDir: "{app}";
Source: "D:\Users\project\安装文件\CDM v2.12.00 WHQL Certified.exe"; DestDir: "{app}";
Source: "D:\Users\project\安装文件\1000Moons(BlueSoleil) 10.2.474.0\install\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename:"{app}\dotnetfx45_full_x86_x64.exe";
Filename:"{app}\读写器V2.1.3.0Setup.exe";
Filename:"{app}\CDM v2.12.00 WHQL Certified.exe";
Filename: "{app}\setup.exe"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Files]指要安装的所有执行文件及所需资源;
[Run]依次添加安装程序,会依次安装;注意安装程序的路径,files会将所有资源放在同一个文件夹下,路径选择该文件夹就行,不必根据Files里的添加路径填写