跨平台构建环境

发布于 2024-07-06 02:27:23 字数 328 浏览 11 评论 0原文

作为优秀的开发人员,我们尽可能使我们的代码符合标准,以帮助在平台之间进行移植。 但是有哪些工具可以帮助我们跨多个平台以统一的方式构建代码。

*nix 系列有 make,但 Windows 需要 nmake

我读过SCons,但从未在愤怒中使用过它。 您最喜欢的构建工具是什么,为什么您发现它有效以及是否有任何限制(支持不良的平台等)。

跨平台 IDE 也是如此。

As good developers we keep our code as standard compliant as possible to help in porting between platforms. But what tools are available that help us build the code in a uniform way across multiple platforms.

*nix family has make but Windows needs nmake.

I have read about SCons but never used it in anger. What is your favorite build tool, why do you find it effective and are there any limitations (i.e. platforms with bad support etc).

Cross platform IDEs as well.

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

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

发布评论

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

评论(8

盗梦空间 2024-07-13 02:27:24

我个人使用ant、rake、maven2。 我最常使用 ant,并发现它很棒,有几个原因:

  • 因为它是 java,所以它可以在很多平台上运行(无需更改任何脚本)

  • 构建文件是用 XML 编写的,并且相当容易编写

  • 有很多可用的第 3 方扩展,并且它是易于编写插件

I personally use ant, rake, and maven2. I have used ant the most and find it great for several reasons:

  • Because it is java it works on lots of platforms (without changing any scripts)

  • The build files are written in XML and fairly easy to write

  • There are lots of 3rd party extensions available for it and it is easy to write plugins for

谁与争疯 2024-07-13 02:27:24

我们进行极限交叉开发,我们的代码可以在linux、windows ce、windows 2K、nucleus和uCOS-II上运行。
因为每个环境使用不同的“make”方法(例如,nucleus 客户要求我们通过 code-warrior GUI 进行编译)。

我将 ANT 与 perl 结合使用了大约 2 年,但这导致构建脚本完全不可维护。

现在我们转而使用Python,这增加了脚本的可维护性。

最重要的是,我没有找到现成的工具,不得不构建自己的工具。 也许,当我有时间(2017 年?)时,我会打包我的脚本并分发它们......

we do extreme cross development, and our code runs on linux, windows ce, windows 2K, nucleus and uCOS-II.
since each environment uses different 'make' methodology (out nucleus customer, for example, require us to compile via code-warrior GUI).

i used ANT combined with perl for about 2 years, but this lead the build script to total non-maintainability.

now we moved to use python, which increase the maintainability of the scripts.

bottom line, i did not find a ready-made tool, and had to build my own. maybe, when i have some time (2017 ?) i will pack my scripts and distribute them ....

旧时模样 2024-07-13 02:27:24

如果您身处 Java 世界,就会发现有很多跨平台的工具。 Apache Ant 和 Maven 都是构建工具,可以在任何支持 Java 的平台上运行。

Cruise Control(持续集成工具)也适用于 Windows 和 Linux(也是用 Java 编写的)。

我对核心工具没有任何真正的问题,我有时遇到的唯一问题来自构建过程之外的事情,即发布工件 - 这在系统之间会有所不同,所以我发现没有单一的方法设置它。

If you're in the Java world, there are quite a few tools which are cross-platform. Apache Ant and Maven are both build tools which will run on any platform which has Java available for it.

Cruise Control (continuous integration tool) also works on Windows and Linux (it's written in Java as well).

I haven't had any real issues with the core tools, the only problems I've sometimes had have come from things external to the build process, i.e. publishing artifacts - this will vary between systems so I've found there's no single way of setting it up.

孤城病女 2024-07-13 02:27:24

对于 C/C++ 开发,我发现 bakefile 效果很好。 相当大的 wxWidgets 项目,一个跨平台的跨平台实用程序和 UI 库,使用它来构建文件生成。

Bakefile 是跨平台、跨编译器的原生 makefile 生成器。 它将构建任务的独立于编译器的描述作为输入并生成本机 makefile(autoconf 的 Makefile.in、Visual C++ 项目、bcc makefile 等)。

Bakefile 的任务是生成本机 makefile,以便人们可以继续使用他们喜欢的工具。 还有其他跨平台 make 解决方案,但它们要么不是本机的,需要用户使用不熟悉的工具 (Boost.Build),要么功能太有限 (qmake)。

For C/C++ development, I've found that bakefile works well. The fairly large wxWidgets project, a cross-platform cross-platform utility and UI library, uses it for their build file generation.

Bakefile is cross-platform, cross-compiler native makefiles generator. It takes compiler-independent description of build tasks as input and generates native makefile (autoconf's Makefile.in, Visual C++ project, bcc makefile etc.).

Bakefile's task is to generate native makefiles, so that people can keep using their favorite tools. There are other cross-platform make solutions, but they either aren't native and require the user to use unfamiliar tools (Boost.Build) or they are too limited (qmake).

煮酒 2024-07-13 02:27:24

您可以在 Windows 上使用 gmake 以及 cygwin/minGW 或在 Linux 上构建 Windows 内容。
http://cdtdoug.blogspot.com/2009/05/ mingw-cross-for-linux.html

You can use gmake on Windows as well with cygwin/minGW or build your windows stuff on Linux.
http://cdtdoug.blogspot.com/2009/05/mingw-cross-for-linux.html

小矜持 2024-07-13 02:27:24

Opus Make 或 MKS Toolkit 等工具可提供多平台和支持。 如果您有 make 脚本的现有代码库,则可以更轻松地迁移到其中之一。 我怀疑您可能会在 DDJ 杂志的广告中寻找类似的工具。

There are tools like Opus Make or MKS Toolkit that offers multiplatform and support. If you have an existing codebase of make script, could be easier migrate to one of there. I suspect you may hunt for similar tools in advertising of DDJ magazine.

爺獨霸怡葒院 2024-07-13 02:27:24

过去 18 个月来,我们一直在运行适用于 Linux、Windows 和 Mac 的 Java 环境。

  • Maven 2 驱动我们的构建,在这里很容易保持一致。 M2 插件不敢涉足的地方,我们使用小型 Ant 脚本。
  • 就 IDE 而言,我们使用 Eclipse & IDEA - 当然,都是多平台的。
  • 测试 - JUnit、Fitnesse、Fest - 都是很好的多平台。
  • 发布脚本是用 Ruby 编写的。 Windows 的问题有点多,但根据需要转换路径的函数通常可以解决问题。
  • TeamCity 执行 CI。 实际上,我们已经将其从 Windows 迁移到 Linux,并且没有遇到任何错误,非常好的软件包。

我们确实使用过 GWT 一段时间,但这确实给我们带来了很大的痛苦。 如果你那样挥杆的话要小心。

We've been running a Java environment for Linux, Windows and the Mac for the last 18 months.

  • Maven 2 drives our builds, it's pretty easy to get things consistent here. Where M2 plugins don't dare to tread, we use small Ant scripts.
  • IDE-wise we're using Eclipse & IDEA - both, of course, multi-platform.
  • Testing - JUnit, Fitnesse, Fest - all nicely multi-platform.
  • Release scripts are written in Ruby. There's a bit more trouble with Windows here, but a function to convert paths as necessary generally does the trick.
  • TeamCity does CI. We've actually migrated this from Windows to Linux and encountered no errors at all, very nice package.

We did use GWT for a while and this did cause us large amounts of pain. Be careful if you swing that way.

森林散布 2024-07-13 02:27:23

用于 c/c++ 环境的 cmake 很好。 http://www.cmake.org/

cmake for c/c++ environments is good. http://www.cmake.org/

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