如何使用 CruiseControl.NET 实现夜间构建

发布于 2024-07-11 03:26:22 字数 405 浏览 5 评论 0原文

我已经为我的项目设置了 Cruisecontrol.net cs,该项目有许多模块和组件,这些模块和组件可以在构建机器上按日期构建并存储在文件夹中。问题是我需要为应用程序进行设置(wpf 非 web ),问题是,因为有许多模块和不同的解决方案可以构建并最终制造产品(dll)等。关于制定将创建夜间安装的安装策略以及要使用的安装包的任何建议(更简单的东西或者根据你的说法,需要更少的时间)我计划在构建机器上安装一些东西,它会从文件夹(什么文件夹?)中获取文件并进行设置......

一个说明这一点的链接是Firefox 的夜间版本

任何建议伙计们

提前致谢。

I have set up cruisecontrol.net cs for my project that has a number of modules and components that get build and get stored in folder by date on the build machine.The thing is that I need to make setup for the application(wpf non web) and the thing is that since there are a number of module and different solutions that build and finally make the product (dlls) etc.Any suggestion on comming up with a setup strategy that will create a nightly setup and also what setup package to use (something simpler or according to you that would take less time) I was planning to install something on the build machine that would pick up the files from the folder (what folder?) and make the setup...

A link to illustrate the point is Firefox's nightly build.

Any advice guys

Thanks in advance.

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

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

发布评论

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

评论(3

一向肩并 2024-07-18 03:26:22

我发现这个系统对我来说运行得很好。 我假设使用 VS 2005/2008 和 C#,但同样的原理也适用于其他编译器和语言,只需替换您自己的调味即可。

使用 CC.NET 使用

  • scheduleTrigger检查所有源代码,如果多个位置使用
  • 使用MSBuild构建所需的每个解决方案(假设VS 2005/2008),或nant,或任何最适合编译的构建工具您的组件项目
  • 使用 MSBuild 创建 WIX 安装程序,尽管我也使用 MSBuild 创建 InnoSetup 和 Wise Installation Studio 安装
  • 使用 MSBuild 更新您希望构建脚本控制的任何项目的 AssemblyInfo.cs 文件
  • 使用源代码管理命令行签入更新的 AssemblyInfo.ca 文件
  • 最后使用 MSBuild 将输出安装程序复制到放置服务器中的新文件夹。 我使用主产品可执行文件中的时间戳来制作时间戳以及生成的版本号来命名文件夹(../Builds/Product/vMmrp - DATE TIME/)

我还喜欢在最后生成构建通知电子邮件。

至于安装程序建议,需要权衡。

为了快速生成,请使用 NSIS 或 Inno Setup 等脚本安装程序。 缺点是不兼容 Windows Installer。

对于 Windows Installer 产品,使用 Wise 或 InstallShield 首次生成速度更快,但工具昂贵,而且我发现安装脚本的维护成本很高。 第一次使用 WIX 往往要昂贵得多(学习曲线 + 尖括号税),但之后更容易维护,因为它都是 XML 并且命令行工具易于使用。

我在使用 Inno Setup 进行安装捆绑方面取得了一些成功,因为 Windows Installer 捆绑和链接(至少对于 Windows XP)确实很痛苦。

I am finding that this system is working pretty well for me. I assume VS 2005/2008 and C#, but the same principle works for other compilers and languages just substitute your own flavoring.

Using CC.NET

  • Check out all source with scheduleTrigger, if multiple locations use
  • Use MSBuild to build each solution that is required (assuming VS 2005/2008), or nant, or whatever build tool works best for compiling your component projects
  • Use MSBuild to create WIX installers, though I have also used MSBuild to create InnoSetup and Wise Installation Studio installations
  • Use MSBuild to update the AssemblyInfo.cs files for any projects that you want the build script to control
  • Use your source control command line to check-in updated AssemblyInfo.ca files
  • Finally use MSBuild to copy your output installer to a new folder in your drop server. I use the time stamp from the primary product executable to make a timestamp along with the generated version number to name the folder (../Builds/Product/v.M.m.r.p - DATE TIME/)

I also like to generate a build notice email at the end.

As for installer recommendations, there is a trade-off.

For fast generation, use a script installer like NSIS or Inno Setup. The drawback is not being Windows Installer compatible.

For Windows Installer products, using Wise or InstallShield are faster to generate the first time, but expensive tools and I find the maintenance on my installation scripts is high. Using WIX tends to be much more expensive the first time (learning curve + angle bracket-tax), but then easier to maintain as it is all XML and the command line tools are easy to use.

I have had some success with installation bundling with Inno Setup as Windows Installer bundling and chaining (at least for Windows XP) is a real pain.

信仰 2024-07-18 03:26:22

我们使用 Visual Build 和 Wise 来创建安装程序,并发现创建该集非常直观且容易UPS 与。 实际的 CC.NET 项目做了一些事情,第一件事是检查以确保自上次我们创建安装程序以来所有需要的部分都已成功构建(我们允许按需安装程序以及每晚安排的安装程序)如果它们还没有成功构建,我们重建所有组件,一旦它们已经(或者已经)成功构建,我们然后调用 VisualBUildPro 并让它创建安装程序。 Visual Build Pro 为实际安装程序处理所有 Wise 的复制和调用。 创建安装程序后,我们会将其发布到每个人都期望的目的地。 我们还修改了构建服务器上电子邮件发布者的 XSL,因此每个人都可以在最新安装程序发布后获得链接。

关于夜间构建的一些事情,如果可以的话,您应该尝试设置一个符号服务器,并让每个安装程序上传带有源代码信息的符号。 这也是创建任何文档(D'Oxygen;SandCastle)以及运行可用的全套测试的好时机。

We used Visual Build and Wise for our installer creation and find that highly intuitive and easy to create the set ups with. The actual CC.NET project does a few things, first thing is it checks to make sure all of the needed parts have been built successfully since the last time we created an installer (we allow installers on demand as well as scheduled every night) if they haven't been build successfully we rebuild all the componenets, once they have been (or if they already were) built successfully we then call VisualBUildPro and let it create the installer. Visual Build Pro, handles all the copying and the calling of Wise for the actual installer. Once the installer is created we publish it out to the destination where everyone expects it to be. We also have modified the XSL for the email publisher on the builds server, so everyone gets a link to the newest installer once it is published.

A few things about the nightly builds if you can you should try setting up a symbol server and have every installer upload symbols with source code information up to them. This is also a good point to have any documentation (D'Oxygen; SandCastle) Create and the time to run your FULL suite of testing that you have available.

Spring初心 2024-07-18 03:26:22

看看 WiX。 该工具集允许以 XML 形式定义安装项目,然后从该 XML 生成 msi。 该项目是用 XML 定义的,这一事实为您提供了很大的灵活性,可以在构建过程中动态修改此 XML(如果需要)。

它与 MSBuild 集成 - 请参阅本文,并且还可以与NAnt - 请参阅本文

Take a look at WiX. This toolset allows the setup project to be defined in XML form, and then generates the msi from this XML. The fact that the project is defined in XML gives you alot of flexibility to modify this XML on the fly during the build (if needed).

It integrates with MSBuild - see this article, and also works well with NAnt - see this article.

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