Windows 开箱即用支持的语言

发布于 2024-12-08 09:34:49 字数 578 浏览 6 评论 0原文

我被要求为一组 Windows 机器(我认为是 XP)编写一个(非常)简单的程序 - 如此简单以至于语言的选择并不是真正的问题。但是,我希望能够分发直接在 Windows 计算机上运行的二进制文件/脚本,而不需要预先安装任何解释器或虚拟机。我正在 Linux 机器上进行开发,但我不知道 Windows 支持哪些语言“开箱即用”。有人可以建议吗?

例如

  • Perl 就很好,但我不相信 Windows 机器上预装了 Perl?要求用户安装 Perl 来使用我的脚本是不可接受的。
  • 我相信Python也有同样的问题? (虽然也许我可以使用PyInstaller? - 如这个问题
  • 同样是Java?大多数 Windows 发行版上都预装了虚拟机吗? (我知道它在与 Sun Microsystems 发生争执后被删除了?)

到目前为止我能想到的唯一选择是

  • 带有 MinGW 交叉编译器的 c/c++。

虽然我很高兴用 C++ 编写代码,但我想首先检查我的语言选项。

I have been asked to write a (very) simple program for a set of Windows machines (XP I think) - so simple that the choice of language isn't really an issue. However, I want to be able to distribute a binary/script that will run straight away on the Windows machine, without the need to pre-install any interpretor or virtual machine. I'm developing on a Linux machine and I have no idea what languages Windows supports 'out of the box'. Can anyone advise?

For example

  • Perl would be great but I don't believe windows machines come with Perl pre-installed? Asking the user to install Perl to use my script is not acceptable.
  • I believe Python has the same problem? (although maybe I can use the PyInstaller? -- as in this question)
  • Likewise Java? Is the virtual machine pre-installed on most Windows distributions? (I understand it got removed after a dispute with Sun Microsystems?)

The only option I can think of so far is

  • c/c++ with MinGW cross-compiler.

While I'm happy to write the code in c++, I wanted to check my language options first.

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

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

发布评论

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

评论(4

深爱不及久伴 2024-12-15 09:34:49

唯一支持开箱即用的脚本语言是批处理解释器、vbscript 和 jscript。除此之外,您还喜欢编译语言。 C# 是一个不错的选择,但请确保您的目标是 XP 附带的 .net 版本。

The only scripting languages supported out of the box are the batch interpreter, vbscript and jscript. Other than that you are into compiled languages. A good option could be C# but make sure you target the .net version that shipped with XP.

圈圈圆圆圈圈 2024-12-15 09:34:49

我认为 Windows 上没有预装 Java。

我已经有好几年没有使用 Windows 了,但如果我没记错的话,您可以使用 VBScript 或 JScript 开发脚本并部署它们,而无需客户端安装任何内容。

I don't think that Java comes pre-installed on Windows.

I'm not using Windows for some years now, but if I correctly remember you can develop scripts with VBScript or JScript and deploy them without need for clients to install anything.

苄①跕圉湢 2024-12-15 09:34:49

Delphi 和 Lazarus/FreePascal 生成甚至不需要 MSVCRT 的本机应用程序。

其他一些系统对相对较新的 MSVCRT 版本有要求,这可能会对旧 Windows 版本造成负担。

然而,最近的 Lazarus 和 Delphi 版本停止支持 Windows NT4 和 Win9x,win2000 处于灰色区域(不支持,但可以工作)。

拥有内部 win32/64 链接器使其成为从 *nix 到 Windows 交叉编译的绝佳选择。

Delphi and Lazarus/FreePascal generate native applications that don't even need on MSVCRT

Some of the other systems have requirements on relatively new MSVCRT versions that might be a burden on older windows versions.

However recent Lazarus and Delphi versions stop supporting windows NT4 and Win9x, with win2000 in a gray area (not supported but works afaik)

Having an internal win32/64 linker makes it also an excellent choice for crosscompiling from *nix to Windows.

墨离汐 2024-12-15 09:34:49

任何编译为纯本机程序集(没有特殊的运行时依赖项)的语言都应该没问题。例如:许多 C 变体(但不是全部)、Microsoft Visual C++、Microsoft Visual Basic 6、OCaml、Haskell 等。

需要 .NET Framework(它还为您提供 C#、VB.NET 和 F#)是合理的,而且 JVM 也相当标准(因此您可以获得 Java、Closure 和 Scala)。

Any language which compiled to pure native assembly (without special run-time dependencies) should be fine. For example: many C variations (but not all), Microsoft Visual C++, Microsoft Visual Basic 6, OCaml, Haskell and more.

Requiring the .NET Framework (which gives you also C#, VB.NET and F#) is reasonable, and also JVM is pretty standard (and so you get Java, Closure and Scala).

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