Projekt

Allgemein

Profil

RunLocal Flow » Historie » Version 2

[E] Rocco Kreutz, 06.08.2026 12:25

1 2 [E] Rocco Kreutz
h1. RunLocal flow
2
3
This page documents the two ways RunLocal can be entered and what each side checks or starts.
4
5
*Remote* means the normal network installation of @ProdatERP.exe@.
6
*Local* means the copied installation under @C:\ProdatERP\@ with @Administration\RunLocal@ beside it.
7
8
{{drawio(RunLocal_Flow.drawio)}}
9
10
h2. Short version
11
12
* The login dialog in the remote @ProdatERP.exe@ has the *RunLocal* button.
13
* That button starts @ProdatRunLocal.exe@ from the network installation with @SILENT_INSTALL_DEFAULT@.
14
* @ProdatRunLocal.exe@ checks whether it must self-update, then either runs the installer batch or the shortcut/update batch.
15
* The batch files create or refresh the local copy, the shortcuts, and the scheduled task.
16
* On later starts, @ProdatERP.exe@ can also verify that the local RunLocal copy is current and, if needed, switch into the local launcher.
17
18
h2. Entry points and behavior
19
20
|_. Side |_. Launch point |_. What is checked |_. What is initiated |
21
| Remote | Login dialog button in @ProdatERP.exe@ | Button is enabled only when the app is not already running from a local installation, unless dev/debug mode is active. | Launches @ProdatRunLocal.exe@ with @SILENT_INSTALL_DEFAULT@. |
22
| Remote | Startup path in @ProdatERP.exe@ | Checks whether RunLocal must be updated and whether the remote source is accessible. Compares marker data and the configured remote root. | If needed, copies the current @ProdatRunLocal.exe@ to the local RunLocal folder and starts the local launcher. |
23
| Remote or Local | @ProdatRunLocal.exe@ startup | Refuses to run from network/UNC without the silent-install parameter. Performs its own update check against the remote RunLocal copy. | Starts @RunLocal_Setup.bat@ for the initial install, or @RunLocal_ShortcutScript.bat@ for normal use. |
24
| Local | @RunLocal_Setup.bat@ | Reads or writes @RunLocal_SetCfgVariables.bat@, validates directories, and checks Robocopy availability. | Creates the local directory tree, syncs files, creates the task script, and creates shortcuts. |
25
| Local | @RunLocal_UpdateLocal.bat@ | Uses @Prodat.INSTALL.MARKER@ and the configured paths to decide the sync mode. | Mirrors remote to local, kills running @ProdatERP.exe@ instances, and optionally starts the local app again. |
26
27
h2. Remote login button flow
28
29
# User is in the remote installation and clicks *RunLocal* in the login dialog.
30
# The login dialog checks whether the current executable is local or remote.
31
# If the current executable is remote, the button is enabled and @ProdatRunLocal.exe@ is started with @SILENT_INSTALL_DEFAULT@.
32
# @ProdatRunLocal.exe@ then runs the setup batch and creates or refreshes the local installation.
33
34
h2. Startup update flow in ProdatERP.exe
35
36
# @ProdatERP.exe@ starts from either the network share or the local copy.
37
# The startup code checks whether it is running in the remote or local case.
38
# It reads the configured remote root from @RunLocal_SetCfgVariables.bat@.
39
# It checks accessibility with the safe-check helper.
40
# It compares @Prodat.INSTALL.MARKER@ content and timestamp between local and remote.
41
# If the local copy is outdated and the remote root matches the configuration, it copies the current @ProdatRunLocal.exe@ into the local RunLocal folder.
42
# It then launches the local @ProdatRunLocal.exe@ to continue the local flow.
43
44
h2. What the batch files do
45
46
* @RunLocal_Setup.bat@
47
** Writes @RunLocal_SetCfgVariables.bat@.
48
** Creates the local @Administration\RunLocal@ structure.
49
** Creates the shortcut helper script and the scheduled-task script.
50
** Calls @RunLocal_UpdateLocal.bat SYNC@ to mirror the installation.
51
** Creates the desktop shortcut and the local restart/update shortcut.
52
53
* @RunLocal_UpdateLocal.bat@
54
** Reads the config file.
55
** Validates source and destination paths.
56
** Runs Robocopy mirror operations.
57
** Uses @Prodat.INSTALL.MARKER@ as a content/timestamp identity marker.
58
** Restarts @ProdatERP.exe@ unless @DONTSTARTPRODAT@ was passed.
59
60
* @RunLocal_Setup_Task.bat@
61
** Creates or deletes the scheduled task @CIMPCS\ProdatERP - Run Lokal - Update@.
62
63
* @RunLocal_Setup_Shortcut.vbs@
64
** Creates or deletes the @.lnk@ files for the local restart and the desktop entry.
65
66
h2. Important files
67
68
* @PRODAT\Application\ProdatRunLocal\280\ProdatRunLocal.dpr@
69
* @PRODAT\Application\ProdatRunLocal\USelfUpdate.pas@
70
* @PRODAT\Prodat\Prodat-SQL\udbs.pas@
71
* @PRODAT\Prodat\Prodat-SQL\UP2005Start.pas@
72
* @ExternKomponenten\RUNTIME-Dirs\Administration\RunLocal\RunLocal_Setup.bat@
73
* @ExternKomponenten\RUNTIME-Dirs\Administration\RunLocal\RunLocal_UpdateLocal.bat@
74
* @ExternKomponenten\RUNTIME-Dirs\Administration\RunLocal\RunLocal_Setup_Task.bat@
75
* @ExternKomponenten\RUNTIME-Dirs\Administration\RunLocal\RunLocal_Setup_Shortcut.vbs@