InstallShield LE-文件的相对路径 [英] InstallShield LE - Relative paths to file

查看:123
本文介绍了InstallShield LE-文件的相对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我向安装程序添加依赖项时,总是会留下文件的硬编码路径.

When I add a dependency to my installer, I'm always left with a hard coded path to the file.

根据此博客,绕过此问题的唯一方法是使用ISProjectFolder变量手动更改ISL文件中的硬编码路径.这并没有什么好处,因为每次我重新构建安装程序时,该文件都会被烧毁.

According to this blog, the only way around this is to manually change the hard coded paths in the ISL file with the ISProjectFolder variable. This isn't any good as the file will get blitzed every time I rebuild the installer.

我也看到了提到的路径变量,但是InstallShield LE中似乎没有这些变量.

I've also seen path variables mentioned but there seems to be no feature for them in InstallShield LE.

有人有什么主意吗?

推荐答案

  • 修复了要由Install Shield Limited Edition复制到输出目录的文件内容的相对路径(Visual Studio 2012) 步骤:
  • 在解决方案资源管理器中扩展您的安装项目,以使您看到1,2,3,4,5,6部分
  • 展开"2",然后双击文件" 您将看到一个四个面板的页面:带有源计算机的文件"和目标计算机的文件"
  • 从目标计算机的文件"中删除硬编码的路径和文件
  • 在将您的文件作为内容文件"的项目上,单击左上角的面板
  • 右上方的面板将显示来自MyProject的内容文件"
  • 单击并拖动到右下角的面板(目标计算机的文件")
    • fixed relative paths for file content to be copied by the Install Shield Limited Edition to the output directory ( Visual Studio 2012 ) Steps:
    • Expand your install project in the Solution Explorer so you see the 1,2,3,4,5,6 sections
    • Expand '2' and double click on 'Files' You will see a four panel page: with 'Source computer's files' and 'Destination computer's files'
    • delete your hard coded paths and files from the 'Destination computer's files'
    • Click in the top left panel, on the project that has your files as 'Content Files'
    • the top right panel will show 'Content Files from MyProject'
    • click and drag this to the bottom right panel (the 'Destination computer's files')
    • 返回您的项目,并确保要复制的所有文件都具有属性: 建立动作=内容 和 复制到输出目录=始终复制

      Go back into your project and make sure all your files you want copied have properties: Build Action=Content and Copy to output directory=Copy Always

      这篇关于InstallShield LE-文件的相对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆