zoukankan      html  css  js  c++  java
  • HOWTO:在安装包运行时指定Component的安装路径

    版权声明: 可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息。

    在某些情况下,安装包需要灵活,动态处理某些文件的安装路径,具体操作方法如下:

    适用工程类型InstallScript 和 InstallScript MSI

    1. 在Setup Design视图中找到相对应的Component 

    2. 点击Destination的路径选择下拉菜单

    3. 在Browse for Directory对话框中,选中Script-defined Folders点击鼠标右键选择New Directory,默认会产生一个<NEW_DIRECTORY1>。

    4. 选中<NEW_DIRECTORY1>点击OK。

    5. 在事件响应函数OnFirstUIBefore或OnBegin中添加如下代码:

    function OnBegin() 
        
    string  szCustomDirectory, szCustomLocation;
    begin
        
    // TODO: Perform custom initialization steps, check requirements, etc.   
        szCustomDirectory = "NEW_DIRECTORY1";
        
    szCustomLocation = "D:\\Kevin Wan";
        
    //(or path of your choice)
        
    FeatureSetTarget(MEDIAszCustomDirectoryszCustomLocation);
    end;

    6. 编译,运行安装包。

    关于Basic MSI类型的工程,见后续文章《HOWTO:在安装包运行时指定Component的安装路径(续) - MSI》。 

  • 相关阅读:
    2019 Multi-University Training Contest 10
    自考新教材-p326_3(1)
    自考新教材-p322
    自考新教材-p321
    自考新教材-p316
    自考新教材-p315
    自考新教材-p313
    自考新教材-p311
    自考新教材-p310
    自考新教材-p309
  • 原文地址:https://www.cnblogs.com/wanbinghong/p/1827845.html
Copyright © 2011-2022 走看看