Which programming languages that can generate self contained windows .exes?

佐手、 提交于 2019-12-03 23:53:30

Delphi compiles to one executable, and generates native windows executables. So no dependencies to any kind of framework. If you use Free Pascal (fpc) and the Lazarus IDE, you could even develop for Linux and Apple from the same source.

If your using external dll's this would become a bit more tricky, but you could pack them up in your resource file and still maintain the one exe property.

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.

Stephen Kellett

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)

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.

Tcl can do this, especially through producing starpacks. They can be produced for all platforms from the same code. Note that this also includes all the necessary runtime libraries (except for things like the C library, but you don't want to make that static under normal circumstances).

JavaFX 2.2 supports that. It allows creation of self-contained applications targeting Windows, Mac OS, and Linux.

Please follow this link for more information: http://docs.oracle.com/javafx/2/deployment/self-contained-packaging.htm.

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!

c/c++ purebasic delphi vb6

i hope this help :)

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

You can use Liberty Basic which is easy and cheap, you can easily make stand alone programs for windows but not possible to transfer to MacOS or Linux.

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.

QBasic can :-)

I wrote a few command line tools using it!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!