【Inno Setup】Installation package production, project packaging plan

series of articles

MySQL installation tutorial (detailed)
link to this article: https://blog.csdn.net/youcheng_ge/article/details/126037520

MySQL uninstall tutorial (detailed)
link to this article: https://blog.csdn.net/youcheng_ge/article/details/129279265

Excel data import tool
Link to this article: ​​​​​​​​​https://blog.csdn.net/youcheng_ge/article/details/126427323

automatic code generator

Link to this article: https://blog.csdn.net/youcheng_ge/article/details/126890673


Table of contents

series of articles

foreword

1. Preliminary preparation

1.1 Inno Setup software installation

1.2 Inno Setup Chinese help document

2. Software steps

2.1 New Script Wizard

2.2 Fill in the basic information of the software

2.3 Fill in the software installation path

2.4 Add installation files

2.5 Additional documentation

2.6 Compile Settings and Desktop Icons

3. Resource attachment


foreword

Project packaging solutions, program packaging, software release, installation package production, how to guide users to install software in the next step? It is enough to read this article.

Inno Setup is a free installation and production software (open source). It not only has a script wizard suitable for novices, but also has a good script editing environment. It can quickly create a standard Windows2000-style installation interface, which is enough to complete general installation tasks. In the new version This version of the software has added support for multiple languages. Compared with NSIS, the implementation of this function is much simpler. It is recommended that you use the new version.

You can package the output directory of your project, that is, your project bin, into an installation package, which is convenient for users to install the software you develop.

Inno Setup supports the following features:

① Display of software installation instructions

②Copy the project file

③Customize the software icon and generate a desktop shortcut

④ Check the installation environment, for example: check whether the PC has the Framework runtime library.

⑤ For other customized requirements, it supports writing scripts and can be used for user information configuration.

1. Preliminary preparation

1.1 Inno Setup software installation

Link: https://pan.baidu.com/s/1zo29xYryY3oiY4x3naGtRQ?pwd=ibu0 
Extraction code: ibu0

1.2 Inno Setup Chinese help document

Link: https://pan.baidu.com/s/1-IlWAFtxkeBq_vxGR5iiSw?pwd=7uog 
Extraction code: 7uog

2. Software steps

2.1 New Script Wizard

Inno Setup compiler, [File] - [New], open the script wizard.

2.2 Fill in the basic information of the software

Fill in the application name, application version, application publisher, application website (optional)

2.3 Fill in the software installation path

Application target basic folder: custom D:\Program Files (default C drive, there are permission restrictions for program read and write operations, so I choose to install D drive)

Application folder name: AutomaticPlayer

Application main execution file: the absolute path of the EXE file

2.4 Add installation files

Other application files: Add all program dependencies.

For those with subfolders, introduce and click Edit to create the subfolder name.

2.5 Additional documentation

The next step is the next step. The default settings are fine and there is no need to change them. The following figure shows some instructions before and after installation. You can attach them.

2.6 Compile Settings and Desktop Icons

Custom compiler output folder: generate an installation package in the current directory if not filled

The compiler outputs the base file name: the name of the installed package

Customize the icon file of the installer: the icon style of the installation package, icon file, you can convert the image online.

So far, you have completed the packaging of the project, you can find an installation package in this directory, and send it to the customer.

3. Resource attachment

I finally generated the script as follows. The tool mainly reads the script file and executes the installation process. Of course, you can also edit the file directly:

; 脚本由 Inno Setup 脚本向导 生成!
; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!

#define MyAppName "任务计划程序"
#define MyAppVersion "1.2"
#define MyAppPublisher "geyc"
#define MyAppExeName "AutoPlayer.exe"

[Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (若要生成新的 GUID,可在菜单中点击 "工具|生成 GUID"。)
AppId={
   
   {4AE0DCEE-59A5-4402-8DFA-F0EC1EDEF26B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName=D:\Program Files\AutomaticPlayer
DisableProgramGroupPage=yes
InfoBeforeFile=C:\Users\YS\Desktop\前说明.txt
InfoAfterFile=C:\Users\YS\Desktop\后说明.txt
; 以下行取消注释,以在非管理安装模式下运行(仅为当前用户安装)。
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=commandline
OutputDir=E:\软件安装包
OutputBaseFilename=AutomaticPlayer-Setup
SetupIconFile=E:\【我的项目】\图标ico\桌面软件安装.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern

[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "E:\【程序打包发布】\AutoPlayer.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\app.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\AutoPlayer.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\AutoPlayer.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\AutoPlayer.pdb"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.Data.v18.1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.Data.v18.1.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.Printing.v18.1.Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.Printing.v18.1.Core.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.Utils.v18.1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.Utils.v18.1.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.XtraEditors.v18.1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.XtraEditors.v18.1.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.XtraGrid.v18.1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.XtraGrid.v18.1.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.XtraLayout.v18.1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.XtraLayout.v18.1.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.XtraPrinting.v18.1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DevExpress.XtraPrinting.v18.1.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\Microsoft.Extensions.Logging.Abstractions.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\netstandard.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\Quartz.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\SQLite.Interop.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\System.Data.SQLite.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\System.ValueTuple.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\【程序打包发布】\DB\DBPlayer.sqlite3"; DestDir: "{app}\DB"; Flags: ignoreversion
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”

[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

Guess you like

Origin blog.csdn.net/youcheng_ge/article/details/123665633#comments_28218165