Example Applications: - Yattabyte/nSuite GitHub Wiki

Example Applications

The applications listed below are tied to nSuite Wizard in one fashion or another, either consuming files generated by nSuite or are written and modified by the wizard itself.

Installer

This program is a fully-fledged installation application, made to run on Windows. It generates an uninstaller, and links it up in the user's registry.

It uses the Windows GDI library for rendering.

This application has 3 (three) resources embedded within it:

  • IDI_ICON1 the application icon
  • IDR_ARCHIVE the package to be installed
  • IDR_MANIFEST the installer manifest (attributes, strings, instructions)

The raw version of this application is useless on its own, and is intended to be fullfilled by nSuite using the -installer command. The following is how nSuite uses this application:

  • writes out a copy of this application to disk
  • packages a directory, embedding the package resource into this application's IDR_ARCHIVE resource
  • tries to find an installer manifest, embedding it into this application's IDR_MANIFEST resource

This installer has several screens it displays to the user. It starts off with a welcome screen, and requires that the user accept a EULA in order to proceed. If at any point an error occurs, the program enters a failure state and dumps its entire operation log to disk (next to the program, error_log.txt).

The installer manifest has optional strings the developer can implement to customize the installation process. Quotes are required

  • name "string"
  • version "string"
  • description "string"
  • eula "string"
  • shortcut "\relative path within installation directory"
  • icon "\relative path within installation directory"

Any and all of these manifest values can be omitted.

Uninstaller

This program is a fully-fledged uninstallation application, made to run on Windows. It is generated by the installer application, and removes itself from the user's registry on completion.

It uses the Windows GDI library for rendering.

This application has 2 (two) resources embedded within it:

  • IDI_ICON1 the application icon
  • IDR_MANIFEST the installer manifest (attributes, strings, instructions)

The raw version of this application is useless on its own, and is intended to be fullfilled by the Installer application. The following is how the Installer uses this application:

  • writes out a copy of this application to disk
  • embedds its own manifest into this application's IDR_MANIFEST resource (to facilitate uninstallation)

This uninstaller has several screens it displays to the user. If at any point an error occurs, the program enters a failure state and dumps its entire operation log to disk (next to the program, error_log.txt).

The uninstaller may reuse several of the manifest strings provided by its proceeding installer, such as name, version, and where shortcuts may be located (to remove them).

Unpacker

This program is a mini portable installation application. It doesn't modify the registry, nor generates any further applications. Its goal is to be a quick means of dumping some package into the directory it runs from.

It doesn't use any fancy rendering library, it instead runs in a terminal and requires no user input.

This application has 2 (two) resources embedded within it:

  • IDI_ICON1 the application icon
  • IDR_ARCHIVE the package to be installed

The raw version of this application is useless on its own, and is intended to be fullfilled by nSuite using the -packager command. The following is how nSuite uses this application:

  • writes out a copy of this application to disk
  • packages a directory, embedding the package resource into this application's IDR_ARCHIVE resource

Updater

This program is a naive upadater application. It consumes .ndiff files found next to it, and applies them automatically if it can.

Its goal is to be a quick means of updating a directory for a user.

It attempts to provide reasonable security against corruption by comparing hashes before/after patching, and aborts before any actual changes are made to disk.

The tool applies all .ndiff files it can find in the same folder it runs from, and if successfull, deletes them afterwards.

The tool and diff files should be kept at the root of an affected directory. It will attempt to apply all patches it can find, even if the patched version is technically 'older'.

Notes:

.ndiff files are generated by nSuite using the -diff command.

This program essentially encapsulates nSuite's -patch command.

It doesn't use any fancy rendering library, it instead runs in a terminal and requires minimal user input.

This application has 1 (one) resource embedded within it:

  • IDI_ICON1 the application icon