RunLocal Flow » Historie » Version 9
[E] Rocco Kreutz, 07.08.2026 13:37
| 1 | 4 | [E] Rocco Kreutz | h1. RunLocal Ablauf |
|---|---|---|---|
| 2 | 2 | [E] Rocco Kreutz | |
| 3 | 4 | [E] Rocco Kreutz | Diese Seite beschreibt die beiden Einstiegspunkte fuer RunLocal und welche Pruefungen bzw. Aktionen auf jeder Seite ausgefuehrt werden. |
| 4 | 2 | [E] Rocco Kreutz | |
| 5 | 4 | [E] Rocco Kreutz | *Remote* bedeutet die normale Netzwerkinstallation von @ProdatERP.exe@. |
| 6 | *Lokal* bedeutet die kopierte Installation unter @C:\ProdatERP\@ mit @Administration\RunLocal@ daneben. |
||
| 7 | 2 | [E] Rocco Kreutz | |
| 8 | 8 | [E] Rocco Kreutz | {{drawio_attach(RunLocal_Flow_TwoTrees.drawio)}} |
| 9 | 7 | [E] Rocco Kreutz | |
| 10 | 4 | [E] Rocco Kreutz | h2. Kurzfassung |
| 11 | 2 | [E] Rocco Kreutz | |
| 12 | 4 | [E] Rocco Kreutz | * Im entfernten @ProdatERP.exe@ gibt es im Login-Dialog den Button *RunLocal*. |
| 13 | * Dieser startet @ProdatRunLocal.exe@ aus der Netzwerkinstallation mit @SILENT_INSTALL_DEFAULT@. |
||
| 14 | * @ProdatRunLocal.exe@ prueft zuerst das eigene Update und startet danach entweder das Installations-Batch oder das Shortcut-/Update-Batch. |
||
| 15 | 1 | [E] Rocco Kreutz | * Die Batch-Dateien erzeugen oder aktualisieren die lokale Kopie, die Shortcuts und den geplanten Task. |
| 16 | 9 | [E] Rocco Kreutz | * Wenn @ProdatERP.exe@ spaeter direkt aus der lokalen Kopie gestartet wird, prueft der Splash-/Startcode beim ersten echten Start, ob die lokale RunLocal-Kopie noch passt. |
| 17 | * Diese lokale Pruefung vergleicht @Prodat.INSTALL.MARKER@ und entscheidet dann, ob der lokale Launcher aktualisiert werden muss oder ob der lokale Betrieb weiterlaeuft. |
||
| 18 | 2 | [E] Rocco Kreutz | |
| 19 | 4 | [E] Rocco Kreutz | h2. Einstiegspunkte und Verhalten |
| 20 | 2 | [E] Rocco Kreutz | |
| 21 | 1 | [E] Rocco Kreutz | |_. Seite |_. Startpunkt |_. Was wird geprueft |_. Was wird ausgeloest | |
| 22 | 4 | [E] Rocco Kreutz | | Remote | Login-Dialog-Button in @ProdatERP.exe@ | Der Button ist nur aktiv, wenn die App nicht bereits lokal laeuft, ausser im Dev-/Debug-Modus. | Startet @ProdatRunLocal.exe@ mit @SILENT_INSTALL_DEFAULT@. | |
| 23 | 9 | [E] Rocco Kreutz | | Remote oder lokal | Startpfad in @ProdatERP.exe@ | Prueft, ob RunLocal aktualisiert werden muss und ob die entfernte Quelle erreichbar ist. Vergleicht Marker-Daten und den konfigurierten Remote-Root. | Kopiert bei Bedarf die aktuelle @ProdatRunLocal.exe@ in den lokalen RunLocal-Ordner und startet den lokalen Launcher. | |
| 24 | | Lokal | Direkter Start von @ProdatERP.exe@ ohne RunLocal | Der Startcode erkennt den lokalen Modus ueber den Programmpfad und ruft beim ersten echten Start die RunLocal-Pruefung auf. | Verwendet @RunLocal_SetCfgVariables.bat@, prueft @Prodat.INSTALL.MARKER@ und aktualisiert bei Bedarf den lokalen Launcher. | |
||
| 25 | 4 | [E] Rocco Kreutz | | Remote oder lokal | Start von @ProdatRunLocal.exe@ | Verweigert den Start von Netzwerk-/UNC-Pfaden ohne Silent-Install-Parameter. Fuehrt den eigenen Update-Check gegen die entfernte RunLocal-Kopie aus. | Startet @RunLocal_Setup.bat@ fuer die Erstinstallation oder @RunLocal_ShortcutScript.bat@ fuer den Normalfall. | |
| 26 | | Lokal | @RunLocal_Setup.bat@ | Liest oder schreibt @RunLocal_SetCfgVariables.bat@, prueft die Verzeichnisse und kontrolliert die Robocopy-Verfuegbarkeit. | Erzeugt die lokale Verzeichnisstruktur, synchronisiert Dateien, erzeugt Task- und Shortcut-Skripte. | |
||
| 27 | | Lokal | @RunLocal_UpdateLocal.bat@ | Nutzt @Prodat.INSTALL.MARKER@ und die konfigurierten Pfade zur Entscheidung ueber den Sync-Modus. | Spiegelt remote nach lokal, beendet laufende @ProdatERP.exe@-Instanzen und startet die App optional erneut. | |
||
| 28 | 2 | [E] Rocco Kreutz | |
| 29 | 4 | [E] Rocco Kreutz | h2. Laufzeit von der Login-Maske |
| 30 | 2 | [E] Rocco Kreutz | |
| 31 | 4 | [E] Rocco Kreutz | # Der Benutzer ist in der entfernten Installation und klickt im Login-Dialog auf *RunLocal*. |
| 32 | # Der Login-Dialog prueft, ob das aktuelle Programm lokal oder remote laeuft. |
||
| 33 | 1 | [E] Rocco Kreutz | # Wenn das Programm remote laeuft, wird der Button aktiviert und @ProdatRunLocal.exe@ mit @SILENT_INSTALL_DEFAULT@ gestartet. |
| 34 | # @ProdatRunLocal.exe@ fuehrt danach das Setup-Batch aus und erzeugt bzw. aktualisiert die lokale Installation. |
||
| 35 | |||
| 36 | 9 | [E] Rocco Kreutz | h2. Lokaler Start ohne RunLocal |
| 37 | |||
| 38 | # @ProdatERP.exe@ startet direkt aus @C:\ProdatERP\@ oder einer lokalen Kopie darunter. |
||
| 39 | # Beim ersten echten Start ruft der Start-Splash @TFormStartLogo.CheckAndUpdateProdatRunLocal@ auf. |
||
| 40 | # Der Code entscheidet anhand von @ParamStr(0)@, ob der aktuelle Start als lokal oder remote behandelt wird. |
||
| 41 | # Im lokalen Fall wird der lokale Root aus dem Programmverzeichnis abgeleitet. |
||
| 42 | # Der konfigurierte Remote-Root wird aus @RunLocal_SetCfgVariables.bat@ gelesen. |
||
| 43 | # Dann versucht ein Safe-Check-Helper, den entfernten RunLocal-Bereich zu erreichen und den Marker zu lesen. |
||
| 44 | # Anschliessend werden Inhalt und Zeitstempel von @Prodat.INSTALL.MARKER@ lokal und remote verglichen. |
||
| 45 | # Fehlt der Marker lokal oder weicht er ab, gilt die lokale Kopie als veraltet. |
||
| 46 | # Wenn die konfigurierte Remote-Quelle zur erwarteten Umgebung passt, wird die aktuelle @ProdatRunLocal.exe@ in den lokalen RunLocal-Ordner kopiert. |
||
| 47 | # Danach startet @ProdatERP.exe@ den lokalen Launcher und laesst den lokalen Installations-/Updatepfad weiterlaufen. |
||
| 48 | # Wenn der Marker gleich ist, bleibt der Start einfach lokal und der Launcher wird nicht umgeschaltet. |
||
| 49 | |||
| 50 | 1 | [E] Rocco Kreutz | h2. Start- und Updatepfad in ProdatERP.exe |
| 51 | |||
| 52 | 4 | [E] Rocco Kreutz | # @ProdatERP.exe@ startet entweder von der Netzfreigabe oder aus der lokalen Kopie. |
| 53 | 9 | [E] Rocco Kreutz | # Der relevante Startcode ist @TFormStartLogo.FormShow@, der beim ersten echten Start @TFormStartLogo.CheckAndUpdateProdatRunLocal@ aufruft. |
| 54 | # @CheckAndUpdateProdatRunLocal@ unterscheidet zuerst zwischen Remote- und Lokalstart anhand von @ParamStr(0)@. |
||
| 55 | # Bei einem lokalen Start wird der lokale Root aus dem Programmverzeichnis abgeleitet und der konfigurierte Remote-Root aus @RunLocal_SetCfgVariables.bat@ gelesen. |
||
| 56 | # Danach prueft ein Safe-Check-Helper, ob der Remote-Root erreichbar ist und ob daraus der Marker gelesen werden kann. |
||
| 57 | # Anschliessend wird @Prodat.INSTALL.MARKER@ lokal gegen remote verglichen: Inhalt und Zeitstempel muessen uebereinstimmen. |
||
| 58 | # Wenn der Marker auf der lokalen Kopie fehlt oder abweicht, ist die lokale Kopie aus Sicht des Launchers veraltet. |
||
| 59 | # Ist die lokale Kopie veraltet und die konfigurierte Remote-Quelle passt zur erwarteten Umgebung, wird die aktuelle @ProdatRunLocal.exe@ in den lokalen RunLocal-Ordner kopiert. |
||
| 60 | 4 | [E] Rocco Kreutz | # Danach wird der lokale @ProdatRunLocal.exe@ gestartet, damit der lokale Ablauf weiterlaeuft. |
| 61 | 9 | [E] Rocco Kreutz | # Wenn die Marker gleich sind, bleibt @ProdatERP.exe@ im lokalen Betrieb und es wird nichts umgeschaltet. |
| 62 | # Der Installationsmarker kommt aus dem Setup: @Setup\ProdatERP-Setup.iss@ liefert @Prodat.INSTALL.MARKER@ in die installierte Struktur, und genau dieser Marker wird spaeter fuer die Abgleichentscheidung benutzt. |
||
| 63 | 2 | [E] Rocco Kreutz | |
| 64 | h2. Was die Batch-Dateien tun |
||
| 65 | 4 | [E] Rocco Kreutz | |
| 66 | * @RunLocal_Setup.bat@ |
||
| 67 | ** Schreibt @RunLocal_SetCfgVariables.bat@. |
||
| 68 | ** Erzeugt die lokale Struktur @Administration\RunLocal@. |
||
| 69 | ** Erzeugt das Shortcut-Hilfsskript und das Task-Skript. |
||
| 70 | 2 | [E] Rocco Kreutz | ** Ruft @RunLocal_UpdateLocal.bat SYNC@ auf, um die Installation zu spiegeln. |
| 71 | ** Erzeugt den Desktop-Shortcut und den lokalen Neustart-/Update-Shortcut. |
||
| 72 | 4 | [E] Rocco Kreutz | |
| 73 | * @RunLocal_UpdateLocal.bat@ |
||
| 74 | ** Liest die Konfigurationsdatei. |
||
| 75 | ** Prueft Quell- und Zielpfade. |
||
| 76 | ** Fuehrt Robocopy-Mirroring aus. |
||
| 77 | 2 | [E] Rocco Kreutz | ** Nutzt @Prodat.INSTALL.MARKER@ als Inhalts-/Zeitstempel-Markierung. |
| 78 | ** Startet @ProdatERP.exe@ erneut, ausser @DONTSTARTPRODAT@ wurde uebergeben. |
||
| 79 | 4 | [E] Rocco Kreutz | |
| 80 | 2 | [E] Rocco Kreutz | * @RunLocal_Setup_Task.bat@ |
| 81 | ** Erstellt oder loescht den geplanten Task @CIMPCS\ProdatERP - Run Lokal - Update@. |
||
| 82 | 4 | [E] Rocco Kreutz | |
| 83 | 2 | [E] Rocco Kreutz | * @RunLocal_Setup_Shortcut.vbs@ |
| 84 | 4 | [E] Rocco Kreutz | ** Erstellt oder loescht die @.lnk@-Dateien fuer den lokalen Neustart und den Desktop-Eintrag. |
| 85 | 2 | [E] Rocco Kreutz | |
| 86 | h2. Wichtige Dateien |
||
| 87 | |||
| 88 | * @PRODAT\Application\ProdatRunLocal\280\ProdatRunLocal.dpr@ |
||
| 89 | * @PRODAT\Application\ProdatRunLocal\USelfUpdate.pas@ |
||
| 90 | * @PRODAT\Prodat\Prodat-SQL\udbs.pas@ |
||
| 91 | * @PRODAT\Prodat\Prodat-SQL\UP2005Start.pas@ |
||
| 92 | * @ExternKomponenten\RUNTIME-Dirs\Administration\RunLocal\RunLocal_Setup.bat@ |
||
| 93 | * @ExternKomponenten\RUNTIME-Dirs\Administration\RunLocal\RunLocal_UpdateLocal.bat@ |
||
| 94 | 1 | [E] Rocco Kreutz | * @ExternKomponenten\RUNTIME-Dirs\Administration\RunLocal\RunLocal_Setup_Task.bat@ |
| 95 | * @ExternKomponenten\RUNTIME-Dirs\Administration\RunLocal\RunLocal_Setup_Shortcut.vbs@ |