• Inno Setup入门(八)——有选择性的安装文件


    这主要使用[Components]段实现,一个演示的代码如下:

    [setup]

    ;全局设置,本段必须

    AppName=Test

    AppVerName=TEST

    DefaultDirName="E:TEST"

    AppVersion=1.0

    Compression=lzma2/max

    ShowLanguageDialog=yes

    [Components]

    Name: main; Description:"主程序(必选)";Types:full compact custom;Flags: fixed

    Name: data; Description:"数据文件";Types:full

    Name: help;Description:"帮助文件";Types:full

    [files]

    Source: "F:desktop estipmsg.exe"; DestDir: "{app}";Components:main

    Source: "F:desktop estin.dat"; DestDir: "{app}";Components:data

    Source: "F:desktop esthelp.chm"; DestDir: "{app}" ;Components:help

    Source: "F:desktop est eadme.txt"; DestDir: "{app}";Flags:isreadme

    运行生成的安装包,效果如下:

    通过标志位设置为fixed,将确保主程序必定安装,另外,中文包中翻译出现了点错误,呵呵,“清除”写成了“清楚”。

  • 相关阅读:
    C#-------------枚举
    C#-------------类型构造器
    C#-内存天下
    线程在C#中的使用
    C#遗忘笔记--品味类型
    二分查找算法(C#实现)
    Linq 表达式树
    javascript中的对象
    this绑定的顺序
    弹出对话框
  • 原文地址:https://www.cnblogs.com/atuo/p/4777582.html
Copyright © 2020-2023  润新知