91 lines
3.2 KiB
Plaintext
91 lines
3.2 KiB
Plaintext
; Inno Setup Script fuer Starface Outlook Sync
|
|
; Erfordert Inno Setup 6.x (https://jrsoftware.org/isinfo.php)
|
|
|
|
#define MyAppName "Starface Outlook Sync"
|
|
#define MyAppVersion "0.0.0.20"
|
|
#define MyAppPublisher "HackerSoft - Hacker-Net Telekommunikation"
|
|
#define MyAppURL "https://www.hacker-net.de"
|
|
#define MyAppExeName "StarfaceOutlookSync.exe"
|
|
|
|
[Setup]
|
|
AppId={{B7E3F4A1-2C8D-4E5F-9A0B-1D2E3F4A5B6C}
|
|
AppName={#MyAppName}
|
|
AppVersion={#MyAppVersion}
|
|
AppVerName={#MyAppName} {#MyAppVersion}
|
|
AppPublisher={#MyAppPublisher}
|
|
AppPublisherURL={#MyAppURL}
|
|
DefaultDirName={autopf}\StarfaceOutlookSync
|
|
DefaultGroupName={#MyAppName}
|
|
DisableProgramGroupPage=yes
|
|
OutputDir=..\dist
|
|
OutputBaseFilename=StarfaceOutlookSync_Setup_{#MyAppVersion}
|
|
Compression=lzma
|
|
SolidCompression=yes
|
|
WizardStyle=modern
|
|
PrivilegesRequired=admin
|
|
ArchitecturesAllowed=x64compatible
|
|
ArchitecturesInstallIn64BitMode=x64compatible
|
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
|
|
|
[Languages]
|
|
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
|
|
|
|
[Tasks]
|
|
Name: "desktopicon"; Description: "Desktop-Verknuepfung erstellen"; GroupDescription: "Zusaetzliche Optionen:"
|
|
Name: "autostart"; Description: "Bei Windows-Anmeldung automatisch starten"; GroupDescription: "Zusaetzliche Optionen:"; Flags: checkedonce
|
|
|
|
[Files]
|
|
; Hauptanwendung - Pfad anpassen nach Build
|
|
Source: "..\src\StarfaceOutlookSync\bin\Release\net8.0-windows\win-x64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
|
|
[Icons]
|
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
|
Name: "{group}\{#MyAppName} deinstallieren"; Filename: "{uninstallexe}"
|
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
|
|
|
[Registry]
|
|
; Autostart fuer alle Benutzer (HKLM)
|
|
Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "StarfaceOutlookSync"; ValueData: """{app}\{#MyAppExeName}"""; Flags: uninsdeletevalue; Tasks: autostart
|
|
|
|
[Run]
|
|
Filename: "{app}\{#MyAppExeName}"; Description: "{#MyAppName} jetzt starten"; Flags: nowait postinstall skipifsilent
|
|
|
|
[UninstallRun]
|
|
Filename: "taskkill"; Parameters: "/F /IM {#MyAppExeName}"; Flags: runhidden; RunOnceId: "KillApp"
|
|
|
|
[UninstallDelete]
|
|
Type: filesandordirs; Name: "{userappdata}\StarfaceOutlookSync"
|
|
|
|
[Code]
|
|
// Pruefe ob .NET 8 Desktop Runtime installiert ist
|
|
function IsDotNet8Installed(): Boolean;
|
|
var
|
|
ResultCode: Integer;
|
|
begin
|
|
// dotnet --list-runtimes enthaelt "Microsoft.WindowsDesktop.App 8.x"
|
|
Result := Exec('dotnet', '--list-runtimes', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
|
if Result then
|
|
Result := ResultCode = 0;
|
|
// Einfacher Check: dotnet.exe muss existieren
|
|
Result := FileExists(ExpandConstant('{commonpf}\dotnet\dotnet.exe')) or
|
|
FileExists(ExpandConstant('{commonpf64}\dotnet\dotnet.exe'));
|
|
end;
|
|
|
|
function InitializeSetup(): Boolean;
|
|
var
|
|
ErrorCode: Integer;
|
|
begin
|
|
Result := True;
|
|
|
|
if not IsDotNet8Installed() then
|
|
begin
|
|
if MsgBox('.NET 8 Desktop Runtime wird benoetigt.' + #13#10 + #13#10 +
|
|
'Soll die Download-Seite geoeffnet werden?',
|
|
mbConfirmation, MB_YESNO) = IDYES then
|
|
begin
|
|
ShellExec('open', 'https://dotnet.microsoft.com/download/dotnet/8.0/runtime', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
|
|
end;
|
|
Result := False;
|
|
end;
|
|
end;
|