如何在 Inno Setup 中从同一脚本构建两个不同的安装程序?

发布于 2024-09-05 07:53:19 字数 296 浏览 2 评论 0原文

我想进行“标准”安装以供外部使用,但我也想使用相同的脚本并告诉它(也许使用命令行参数?)为我们的实验室安装包含另一组文件(用于调试的 PDB 文件) 。 (并制作一个完全不同的安装exe)

我该怎么做?是否可以?

我不知道如何在 [Files] 部分中设置它(根据某些值/参数有条件地添加文件)

注意 – 这不是为了允许用户在安装过程中选择。我想要在我的 hudson 构建或批处理文件中设置构建时选项。

我想我可以为 pdb 创建一个单独的安装程序,但我宁愿只用一个文件来完成所有操作。

I want to make a "standard" install for external use, but I also want to use the same script and tell it (with a command line param perhaps?) to include another set of files (PDB files for debugging) for our lab installations. (And make a totally different install exe)

How can I do this? Is it possible?

I don't see how to set this in the [Files] section (conditionally add files based on some value/param)

Note – this is not for allowing the user an option DURING the install. I want a build-time option to set in my hudson build or batch file.

I suppose I can just create a separate installer for the pdbs, but I'd rather just have one file to do everything.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

东京女 2024-09-12 07:53:19

您可以简单地使用

#ifdef DebugVersion
File: *.pdb ...
#endif

然后调用 Inno 编译器,如下所示:

iscc.exe -DDebugVersion ...

我还添加了类似的内容,以便您获得不同的输出文件名:

#ifdef DebugVersion
OutputBaseFileName=mysetup-dbg
#else
OutputBaseFileName=mysetup
#endif

请注意,您可能需要 InnoSetup 预编译器,出于某种莫名其妙的原因,它是不是默认 InnoSetup 包的一部分。获取它的最简单方法是从 InnoSetup 下载页面获取“快速启动包”。

You can simply use

#ifdef DebugVersion
File: *.pdb ...
#endif

and then call the Inno compiler like this:

iscc.exe -DDebugVersion ...

I'd also add something like this so you get different output file names:

#ifdef DebugVersion
OutputBaseFileName=mysetup-dbg
#else
OutputBaseFileName=mysetup
#endif

Note that you'll probably need the InnoSetup precompiler for this, which, for some inexplicable reason, is not part of the default InnoSetup package. The easiest way to get it is to get the "Quick Start Pack" from the InnoSetup download page.

输什么也不输骨气 2024-09-12 07:53:19

答案很简单:为每个版本创建两个文件,但将常用内容放在第三个文件中,并在另外两个文件中 #include 。

http://rickborup.blogspot.com/2006/09/ inno-setup-include-directive.html

The answer is simple: create two files for each release, but put the common stuff in a third file and #include it in the other two.

http://rickborup.blogspot.com/2006/09/inno-setup-include-directive.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文