PortableApps Compiler v3.0 released!

PortableApps Compiler

PortableApps Compiler & Management (PortableApps Compiler or PAC-MAN for short) is an enhanced, compatibility-aware launcher framework inspired by the PortableApps.com Launcher (PAL). It is designed to support complex, modern and legacy Windows applications that PAL intentionally does not target. PAC-MAN's framework is built on top of PAL and still produces packages that follow the PortableApps.com Format.

PAC-MAN does not replace PAL. It augments PAL by adding:

  • Structured lifecycle segments
  • Crash-recovery guarantees
  • Explicit rollback journaling
  • Windows 10/11 compliant integration patterns

PAC-MAN is designed to behave like a transactional runtime environment, not an installer. It exists to solve a different class of problems than PAL.

Download

Design Principles

  1. No permanent system mutation
  2. Every mutation must be reversible
  3. Recovery must not depend on successful startup
  4. User scope first, system scope only when required
  5. Deterministic execution order
  6. Fail closed, not open

The one deliberate exception to the first two is installing a shared runtime (Visual C++ or .NET) system-wide: it can't safely be removed again, because other programs may start using it. The Runtime segment only does that when the user agrees in a prompt that says it is permanent, and prefers a portable copy whenever one is available.

Functional Comparison

FeaturePALPAC-MAN
Crash RecoveryLimitedJournal-based
File AssociationsNot supportedUser-scoped
URL ProtocolsNot supportedSupported
Windows ServicesNot supportedTemporary
Firewall RulesNot supportedReversible
Scheduled TasksNot supportedSession-bound
COM RegistrationMinimalFully tracked
FontsLimitedFully reversible
Hosts FileNot supportedTransactional
Windows 11 CompliancePartialExplicit

The PAC-MAN column describes the target behavior. The implementation status table shows how far each row has got.

Crash Recovery Model

Crash recovery in PAC-MAN is:

  • Deterministic, not heuristic
  • Journal-driven, not best-effort
  • Idempotent, safe to re-run

If PAC-MAN detects that a previous session ended unexpectedly, it recovers first, before any new changes are made. The check runs right after the instance mutex checks, so only the primary instance can recover: if another launcher for the same app is alive, its journal is not stale and is left alone.

A segment cleans up after itself with the same rollback call that crash recovery uses, so the normal shutdown path and the recovery path are one and the same code. The Unload step also rolls back anything a segment left behind, as a safety net.

When [Launch]:WaitForProgram=false the launcher exits while the app is still running, so its changes have to outlive the launcher. In that case the session is marked detached and the next launch rolls it back quietly.

Intended Use Cases

PAC-MAN is suitable for portable developer tools, security tooling, controlled enterprise environments and forensic or sandbox workflows. It is not intended for silent system takeover, persistent background services or circumventing OS security policies.

Documentation

Check out the Wiki section for various related articles related to creating PortableApps. The Wiki serves who need a quick reminder on certain functions and macros for use within the custom.nsh file. As an added bonus, all (not yet but most) of the source code I've used here is outlined and better explained/documented there as well. For instance, a short guide on registering DLLs and all the macros I used to create the RegisterDLL.nsh segment can be found in the Wiki. You can also find an exhaustive tutorial on dealing with Windows Services; plus it explains what each macro is and does within the Services.nsh segment and how to use them in action.

Visit the Wiki: PAC-MAN Wiki

Contributors

This project has been started by daemon.devin and hopefully maintained on a regular basis. However, if you would like to be a part of this then please do not hesitate on getting involved! I'm always open to new ideas and a willingness for the betterment of all things code. =)

A special thanks to FukenGruven. His codebase was the skeleton which was used to start this project.


=)