Which programming languages that can generate self

2020-07-02 09:16发布

I want to make an easy to deploy Windows application and was was wondering which programming systems can create totally self contained Windows .exe files?

As a plus, if the same can be done with MacOSX and Linux from the same source this would be a bonus. I took a look at Realbasic but they have since abandoned the single .exe concept.

update: i am looking for something that can run from Windows XP up to Windows 7, no matter what version of .NET is installed. Is this even possible?

标签: windows exe
12条回答
我欲成王,谁敢阻挡
2楼-- · 2020-07-02 09:51

Here's a good source for a number of basic-like programming languages that build small stand-alone EXEs. Some are cross-platform for Windows and Linux:

www.basic.mindteq.com

查看更多
疯言疯语
3楼-- · 2020-07-02 09:55

You can do this for Windows with .NET languages using ILMerge

ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly. It works on executables and DLLs alike and comes with several options for controlling the processing and format of the output. See the accompanying documentation for details.

However:

Currently, ILMerge works only on Windows-based platforms. It does not yet support Rotor or Mono.

查看更多
倾城 Initia
4楼-- · 2020-07-02 09:59

I would recommend taking a look at AutoIt. It is an easy-to-use scripting language that will compile into an exe, so there are no runtimes needed. This would be for windows only though.

http://www.autoitscript.com/autoit3/index.shtml

From the website:

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. ... AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required!

查看更多
一纸荒年 Trace。
5楼-- · 2020-07-02 10:00

You can certainly do this with C/C++. Technically the runtime libraries are required, but they should already be installed on any windows, mac or linux system.

With .NET you can compile to an EXE, but of course the .NET framework is required. For newer versions of windows it should be installed by default, but on older versions (XP or older?) it may or may not be there. And of course you couldn't expect mono to be there by default on linux or mac either.

查看更多
【Aperson】
6楼-- · 2020-07-02 10:03

For Windows the following languages are viable:

  • C (MS, gcc)
  • C++ (MS, g++, Digital Mars)
  • D (Digital Mars)
  • Delphi (Embarcadero??? how do you spell that? just trips off the tongue doesn't it?)
  • Fortran (Intel, Salford Software)
  • Visual Basic 6 (MS)
  • Lua (you'll need a special tool to do it, but it is doable)
  • C#, VB.Net, F#, J#, etc (assuming that you don't mind using .Net technology)
查看更多
来,给爷笑一个
7楼-- · 2020-07-02 10:06

You can use Tcl/tk. The technology you should research is a "starpack", which combines a runtime executable (a starkit) with a platform-specific runtime (a "tclkit") to create a single-file executable. It's remarkable in the fact that it's not just compiled code, but an entire self-contained virtual filesystem that can include images, sound, data, etc.

This same technology works for many platforms from the same code base. The only thing that is different is the platform-specific runtime. You can even "cross compile" in that you can copy the runtime for multiple platforms onto your dev box and then build starpacks for each platform without having to actually be on each platform.

查看更多
登录 后发表回答