This commit is contained in:
2026-05-16 20:33:36 +02:00
parent 96c1029d91
commit 968bf7d102
212 changed files with 954195 additions and 658 deletions

View File

@@ -1,4 +1,4 @@
#define MyAppName "AZA Desktop"
#define MyAppName "AZA"
#ifndef MyAppVersion
#define MyAppVersion "0.1.0"
#endif
@@ -14,7 +14,7 @@ AppPublisher={#MyAppPublisher}
AppPublisherURL=https://aza-medwork.ch
DefaultDirName={autopf}\AZA Desktop
DefaultGroupName=AZA Desktop
DisableProgramGroupPage=yes
DisableProgramGroupPage=no
OutputDir={#MyAppSourceDir}\..\..\dist\installer
OutputBaseFilename=aza_desktop_setup
Compression=lzma
@@ -22,7 +22,7 @@ SolidCompression=yes
WizardStyle=modern
PrivilegesRequired=admin
ArchitecturesInstallIn64BitMode=x64
UninstallDisplayIcon={app}\{#MyAppExeName}
UninstallDisplayIcon={app}\logo.ico
SetupIconFile={#MyAppSourceDir}\..\..\logo.ico
SetupMutex=AZADesktopSetupMutex
CloseApplications=no
@@ -31,11 +31,21 @@ RestartApplications=no
[Languages]
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[Types]
Name: "standard"; Description: "AZA Office und AZA Chat (empfohlen)"
Name: "chatonly"; Description: "Nur AZA Chat (Empfang / MPA)"
Name: "custom"; Description: "Benutzerdefiniert"; Flags: iscustom
[Components]
Name: "office"; Description: "AZA Office — Hauptprogramm (Dokumentation, Profil, KG, Diktat, Briefe, Praxisarbeitsplatz)"; Types: standard custom; Flags: checkablealone
Name: "chat"; Description: "AZA Chat — Empfangs- und Chat-Huelle (WebView, Server-Login)"; Types: standard chatonly custom; Flags: checkablealone
[Tasks]
Name: "desktopicon"; Description: "Desktop-Verknuepfung erstellen"; GroupDescription: "Zusaetzliche Aufgaben:"
Name: "desktopicon_office"; Description: "Desktop-Verknuepfung: AZA Office"; GroupDescription: "Verknuepfungen:"; Components: office
Name: "desktopicon_chat"; Description: "Desktop-Verknuepfung: AZA Chat"; GroupDescription: "Verknuepfungen:"; Components: chat
[Dirs]
Name: "{app}\config"; Permissions: users-modify
Name: "{app}\config"; Components: office; Permissions: users-modify
[InstallDelete]
Type: filesandordirs; Name: "{app}\_internal\*.pyd"
@@ -43,31 +53,64 @@ Type: filesandordirs; Name: "{app}\_internal\*.dll"
Type: files; Name: "{app}\_internal\*.tmp"
[Files]
Source: "{#MyAppSourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion restartreplace uninsrestartdelete
Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs restartreplace; Excludes: "config\aza_runtime.env,{#MyAppExeName}"
Source: "{#MyAppSourceDir}\_internal\backend_url.txt"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist
Source: "{#MyAppSourceDir}\_internal\backend_token.txt"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist
Source: "{#MyAppSourceDir}\..\..\setup_openai_runtime.ps1"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#MyAppSourceDir}\..\..\logo.ico"; DestDir: "{app}"; Flags: ignoreversion
; --- AZA Office ---
Source: "{#MyAppSourceDir}\{#MyAppExeName}"; DestDir: "{app}"; Components: office; Flags: ignoreversion restartreplace uninsrestartdelete
Source: "{#MyAppSourceDir}\_internal\*"; DestDir: "{app}\_internal"; Components: office; Flags: ignoreversion recursesubdirs createallsubdirs restartreplace
Source: "{#MyAppSourceDir}\_internal\backend_url.txt"; DestDir: "{app}"; Components: office; Flags: ignoreversion skipifsourcedoesntexist
Source: "{#MyAppSourceDir}\_internal\backend_token.txt"; DestDir: "{app}"; Components: office; Flags: ignoreversion skipifsourcedoesntexist
Source: "{#MyAppSourceDir}\BUILD_INFO.txt"; DestDir: "{app}"; Components: office; Flags: ignoreversion skipifsourcedoesntexist
Source: "{#MyAppSourceDir}\..\..\setup_openai_runtime.ps1"; DestDir: "{app}"; Components: office; Flags: ignoreversion
; --- Gemeinsam: Icon fuer Verknuepfungen ---
Source: "{#MyAppSourceDir}\..\..\logo.ico"; DestDir: "{app}"; Components: office chat; Flags: ignoreversion
; --- AZA Chat (Ein-Datei-WebView-Shell) ---
Source: "{#MyAppSourceDir}\AZA_EmpfangShell.exe"; DestDir: "{app}"; Components: chat; Flags: ignoreversion restartreplace uninsrestartdelete
[Icons]
Name: "{group}\AZA Desktop"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico"
Name: "{autodesktop}\AZA Desktop"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico"; Tasks: desktopicon
Name: "{group}\AZA - OpenAI Schluessel einrichten"; Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\setup_openai_runtime.ps1"""
Name: "{group}\AZA Office"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico"; Components: office
Name: "{autodesktop}\AZA Office"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\logo.ico"; Tasks: desktopicon_office; Components: office
Name: "{group}\OpenAI Schluessel einrichten"; Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\setup_openai_runtime.ps1"""; Components: office
Name: "{group}\AZA Chat"; Filename: "{app}\AZA_EmpfangShell.exe"; IconFilename: "{app}\logo.ico"; Components: chat
Name: "{autodesktop}\AZA Chat"; Filename: "{app}\AZA_EmpfangShell.exe"; IconFilename: "{app}\logo.ico"; Tasks: desktopicon_chat; Components: chat
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "AZA Desktop starten"; Flags: nowait postinstall skipifsilent
Filename: "{app}\{#MyAppExeName}"; Description: "AZA Office starten"; Flags: nowait postinstall skipifsilent; Components: office
[UninstallRun]
Filename: "netsh.exe"; Parameters: "advfirewall firewall delete rule name=""AZA Desktop - Lokale Kommunikation"""; Flags: runhidden; RunOnceId: "DelFirewallRule"
[Code]
function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
if CurPageID = wpSelectComponents then
begin
if not WizardIsComponentSelected('office') and not WizardIsComponentSelected('chat') then
begin
MsgBox('Bitte mindestens eine Komponente waehlen (AZA Office und/oder AZA Chat).', mbError, MB_OK);
Result := False;
Exit;
end;
if WizardIsComponentSelected('office') and not WizardIsComponentSelected('chat') then
begin
if MsgBox('Ohne "AZA Chat" ist der Chat-Button in AZA Office nicht nutzbar.' + #13#10 + #13#10 +
'Empfehlung: Aktivieren Sie "AZA Chat" zusaetzlich zu "AZA Office".' + #13#10 + #13#10 +
'Trotzdem fortfahren und nur AZA Office installieren?',
mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDNO then
Result := False;
end;
end;
end;
function InitializeSetup(): Boolean;
var
R: Integer;
begin
Result := True;
Exec('taskkill.exe', '/F /IM aza_desktop.exe', '', SW_HIDE, ewWaitUntilTerminated, R);
Exec('taskkill.exe', '/F /IM AZA_EmpfangShell.exe', '', SW_HIDE, ewWaitUntilTerminated, R);
Exec('taskkill.exe', '/F /IM AZA_EmpfangChat.exe', '', SW_HIDE, ewWaitUntilTerminated, R);
Exec('taskkill.exe', '/F /IM AZA_Empfang.exe', '', SW_HIDE, ewWaitUntilTerminated, R);
Sleep(500);
end;
@@ -77,6 +120,7 @@ var
begin
Result := '';
Exec('taskkill.exe', '/F /IM aza_desktop.exe', '', SW_HIDE, ewWaitUntilTerminated, R);
Exec('taskkill.exe', '/F /IM AZA_EmpfangShell.exe', '', SW_HIDE, ewWaitUntilTerminated, R);
Sleep(500);
end;
@@ -89,7 +133,7 @@ begin
begin
AppPath := ExpandConstant('{app}');
ExePath := AddBackslash(AppPath) + 'aza_desktop.exe';
if FileExists(ExePath) then
if WizardIsComponentSelected('office') and FileExists(ExePath) then
begin
Exec('netsh.exe', 'advfirewall firewall delete rule name="AZA Desktop - Lokale Kommunikation"', '', SW_HIDE, ewWaitUntilTerminated, R);
Sleep(200);
@@ -107,6 +151,6 @@ begin
if CurUninstallStep = usPostUninstall then
begin
UserDataDir := ExpandConstant('{userappdata}\AZA Desktop');
Log('AZA Desktop deinstalliert. Persoenliche Daten bleiben unter "' + UserDataDir + '" erhalten (kein automatisches Loeschen).');
Log('AZA deinstalliert. Persoenliche Daten bleiben unter "' + UserDataDir + '" erhalten (kein automatisches Loeschen).');
end;
end;