Frage

Wie erstelle ich eine Anwendung, die lautet:

  • leicht: Ich vermute, benötigen keine .NET-Frameworks vielleicht
  • ?
  • tragbar: läuft ohne Installation und speichert die Daten in dem App-Verzeichnis, so dass ich nur den Ordner oder vielleicht sogar die exe bewegen kann?

Das ist nur ein persönliches Experiment: Ich möchte eine einfache ToDo-Liste App versuchen zu erstellen, die die oben genannten Attribute

Ich denke:

  • C # / WPF (aber .NET Framework erfordert, kann ich Client-Profil erforschen thogh)
  • Appcelerator Titanium (ich denke, das leicht und gut genug sein wird? Ich weiß nicht, ob ich eine tragbare Titan App obwohl haben kann)
War es hilfreich?

Lösung

It is almost portable if the target machines have .NET Framework installed.

NDepend is such a product, which is built against .NET 2.0 and runs fine on Windows Vista, Windows 7, and other Windows if you manually install .NET 2.0 before.

Personally, it is not hard to write an application launcher in native languages such as C++/Delphi to detect whether the target machine has .NET. If .NET is not yet installed, this launcher can display a warning or help install the framework automatically. (Even some installers allow you to do this.)

Andere Tipps

If you want to write it in C#, you either need the .NET framework or the Mono framework. Either way you need it. Thankfully .NET 2.0 is pretty ubiquitous.

By default, .NET uses xcopy deployment, so you can just copy the executable and any necessary DLLs around in a directory. It doesn't need to be "installed" unless you explicitly create external dependencies.

@jiewmeng, here i leave a few keys to build an portable application

  1. If the application need save additional data like configuration files o data files , must be saved to the same folder of the exe application or an child folder of the application.

  2. The application should not read/write configuration data to the Windows registry or in the %Appdata% folder.

  3. avoid the use of external dependencies like ocx o dll files, that need to register in the system.

  4. try to use an language wich makes native applications without framerworks dependence a good recomendation is use Delphi.

  5. If you want to use .Net language, choose a version of .Net framework, that is in common use in most of the systems like the Microsoft .Net 2.0

Use Delphi, it's always portable and smaller

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top