zoukankan      html  css  js  c++  java
  • [Tool]Inno Setup创建软件安装程序。

    这篇博客将介绍如何使用Inno Setup创建一个软件安装程序。

    Inno Setup官网:http://www.jrsoftware.org/isinfo.php。 可以下载到最新的Inno Setup,目前最新的版本5.5.9. Inno Setup的安装程序支持非常广泛,从Windows 2000到Windows 10都支持。目前的版本中没有官方出品的中文语言包,不过国内有开发者提供了中文的语言包,请参考:http://www.cnblogs.com/shiningrise/p/5662249.html

    将下载好的语言包,放置在Inno Setup安装目录Languages文件夹下即可。

    下面是一个Inno Setup制作的安装包脚本,

    ; Script generated by the Inno Setup Script Wizard.
    ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
    
    #define MyAppName "Smart NST"
    #define MyAppVersion "1.0"
    #define MyAppPublisher "NST.inc"
    #define MyAppURL "http://www.nst.com"
    #define MyAppExeName "Aries.Presentation.exe"
    
    [Setup]
    ; NOTE: The value of AppId uniquely identifies this application.
    ; Do not use the same AppId value in installers for other applications.
    ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
    AppId={{26AEFF50-EC0D-4EBE-A2E4-12184EAF1DED}
    AppName={#MyAppName}
    AppVersion={#MyAppVersion}
    ;AppVerName={#MyAppName} {#MyAppVersion}
    AppPublisher={#MyAppPublisher}
    AppPublisherURL={#MyAppURL}
    AppSupportURL={#MyAppURL}
    AppUpdatesURL={#MyAppURL}
    DefaultDirName={pf}{#MyAppName}
    DefaultGroupName={#MyAppName}
    InfoBeforeFile=C:UsersV-CHENFYDesktopinit.rtf
    OutputDir=C:UsersV-CHENFYDesktop
    OutputBaseFilename=NST
    SetupIconFile=D:DevelopmentNSTLibsNST.ico
    Compression=lzma
    SolidCompression=yes
    
    [Languages]
    Name: "chinese"; MessagesFile: "compiler:LanguagesChinese.isl"
    
    [Tasks]
    Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
    Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
    
    [Files]
    Source: "C:UsersV-CHENFYDesktopBaseAries.Presentation.exe"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:UsersV-CHENFYDesktopBaseAries.Common.dll"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:UsersV-CHENFYDesktopBaseAries.Framework.dll"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:UsersV-CHENFYDesktopBaseAries.Presentation.exe"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:UsersV-CHENFYDesktopBaseAries.Presentation.exe.config"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:UsersV-CHENFYDesktopBaseMahApps.Metro.dll"; DestDir: "{app}"; Flags: ignoreversion
    Source: "C:UsersV-CHENFYDesktopBaseSystem.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion
    ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
    
    [Icons]
    Name: "{group}{#MyAppName}"; Filename: "{app}{#MyAppExeName}"
    Name: "{group}{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
    Name: "{commondesktop}{#MyAppName}"; Filename: "{app}{#MyAppExeName}"; Tasks: desktopicon
    Name: "{userappdata}MicrosoftInternet ExplorerQuick Launch{#MyAppName}"; Filename: "{app}{#MyAppExeName}"; Tasks: quicklaunchicon
    
    [Run]
    Filename: "{app}{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait shellexec postinstall skipifsilent

    注意最后加粗的shellexec,当需要执行的程序是需要管理员权限时,记得一定要加上这个命令。

  • 相关阅读:
    data guard switchover切换异常
    oracle dataguard
    建立信任关系
    sqlplus 打印很乱,而且很短就换行
    老友记英语
    每天读一遍
    extern的用法
    linux信号处理
    http server v0.1_http_parse.c
    http server v0.1_http_webapp.c
  • 原文地址:https://www.cnblogs.com/yang-fei/p/6211933.html
Copyright © 2011-2022 走看看