Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Recommended Project Structure

Süleyman Yasir KULA edited this page Dec 23, 2018 · 15 revisions
  1. If your project has a self patcher, then it is recommended that you put it and any of its dependencies inside a subdirectory called SPPatcher (determined by PatchParameters.SELF_PATCHER_DIRECTORY) in your application directory. SimplePatchTool will always patch the contents of this directory manually (i.e. it doesn't use the self patcher to patch that directory). This way, you will be able to patch the self patcher itself.

  2. If you are planning to update/launch the main app via a launcher app that can self patch itself, then it is recommended that you put the main app (together with any of its files/dependencies) inside a subdirectory (let's say MainApp) in the launcher's directory while distributing your app. While creating patch(es) for the launcher, you should add MainApp/ to the ignored paths list. This way, MainApp will not be seen as an obsolete directory while self patching the launcher. Finally, while updating the main app via the launcher, you should use {APPLICATION_DIRECTORY}\MainApp as the root path.

So, here's how your builds should be structured:

Builds/
├── Launcher/
│   ├── Version1/
│   │   ├── ...Launcher files and directories (v1)...
│   │   └── SPPatcher/
│   │       └── ...Self patcher executable files and directories...
│   └── Version2/
│       ├── ...Launcher files and directories (v2)...
│       └── SPPatcher/
│           └── ...Self patcher executable files and directories...
└── MainApp/
    ├── Version1/
    │   └── ...Main app files and directories (v1)...
    ├── Version2/
    │   └── ...Main app files and directories (v2)...
    └── Version3/
        └── ...Main app files and directories (v3)...

And here's how you should distribute your app to the clients:

LauncherRootPath/
├── ...Launcher files and directories (v2)...
├── SPPatcher/
│   └── ...Self patcher executable files and directories...
└── MainApp/
    └── ...Main app files and directories (v3)...

In conclusion:

  • (for self patching apps) put the self patcher executable and any of its dependencies inside SPPatcher subdirectory
  • (for launchers) put your main app and all its files inside a subdirectory (e.g. MainApp) while distributing your app
  • (for self patching launchers) maintain two different patches: one for the launcher and one for the main app
    • add MainApp/ to the ignored paths of the launcher's patch
  • (for self patching launchers) inside your launcher, first check if a new version of the launcher is available. If so, patch it using self patching
  • (for launchers) if launcher is up-to-date, check if a new version of the main app is available (using LauncherRootPath\MainApp as main app's root path). If so, patch it without using self patching
Clone this wiki locally