98 lines
4.6 KiB
Plaintext
98 lines
4.6 KiB
Plaintext
#define MyAppName "AWatch-rus InstallKit"
|
|
#define MyAppVersion "1.0.0"
|
|
#define MyAppPublisher "AWatch-rus"
|
|
|
|
#define AwDefaultServerHost "10.10.10.13"
|
|
#define AwDefaultServerPort "5600"
|
|
#define AwDefaultWorktimeReportBase "http://10.10.10.13:5610"
|
|
#define AwDefaultUsers "user1,user2,user3,user4,user5"
|
|
#define AwDefaultInstallRoot "C:\\Program Files\\AWatch-rus\\bin"
|
|
#define AwDefaultStateRoot "C:\\ProgramData\\AWatch-rus"
|
|
#define AwDefaultZipName "activitywatch-v0.13.2-windows-x86_64.zip"
|
|
|
|
[Setup]
|
|
AppId={{6D6A1F74-0F4F-4A57-B5E3-1C2C2F56C0E9}
|
|
AppName={#MyAppName}
|
|
AppVersion={#MyAppVersion}
|
|
AppPublisher={#MyAppPublisher}
|
|
DefaultDirName={autopf}\AWatch-rus
|
|
DefaultGroupName=AWatch-rus
|
|
OutputDir=.
|
|
OutputBaseFilename=AWatch-rus-InstallKit
|
|
Compression=lzma
|
|
SolidCompression=yes
|
|
ArchitecturesInstallIn64BitMode=x64compatible
|
|
PrivilegesRequired=admin
|
|
|
|
[Languages]
|
|
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
|
|
|
|
[Tasks]
|
|
Name: "deploy"; Description: "Запустить деплой после установки"; Flags: checkedonce
|
|
Name: "validate"; Description: "Запустить validate-deployment (через -ValidateAfterDeploy)"; Flags: checkedonce
|
|
|
|
[Files]
|
|
Source: "..\..\ActivityWatch.Windows.Common.psd1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\ActivityWatch.Windows.Common.psm1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\install-standalone-service.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\aw-standalone-service.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\deploy-single-user.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\deploy-domain-users.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\deploy-ensemble.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\hardening-recovery.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\validate-deployment.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\migrate-awatch-rus-paths.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\worktime-session-collector.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\browser-domains-native-collector.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\dlp-endpoint-signals-collector.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\file-operations-collector.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\email-outbound-collector.ps1"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\web-category-rules.example.json"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
Source: "..\..\dlp-policy.example.json"; DestDir: "{app}\windows"; Flags: ignoreversion
|
|
; Offline payload (optional): place ZIP into windows/installkit/innosetup/payload/ before compiling.
|
|
Source: "payload\{#AwDefaultZipName}"; DestDir: "{app}\payload"; Flags: ignoreversion skipifsourcedoesntexist
|
|
Source: "innosetup-rdp-package-filelist.md"; DestDir: "{app}\windows\installkit\innosetup"; Flags: ignoreversion
|
|
|
|
[Run]
|
|
Filename: "powershell.exe"; Parameters: "{code:GetStandaloneInstallParams}"; Flags: runhidden; Tasks: deploy
|
|
|
|
[Code]
|
|
var
|
|
ServerHostPage: TInputQueryWizardPage;
|
|
|
|
procedure InitializeWizard;
|
|
begin
|
|
ServerHostPage := CreateInputQueryPage(
|
|
wpSelectDir,
|
|
'Параметры AW сервера',
|
|
'Укажите сервер ActivityWatch (куда агенты будут отправлять данные).',
|
|
'Если нужно, измените host/port. По умолчанию — наша конфигурация.'
|
|
);
|
|
{ Worktime CSV/JSON reports are served by aw-worktime-api on :5610 (AwDefaultWorktimeReportBase).
|
|
Standard AW "Сегодня" is backed by server-side aw-worktime-ui-bridge timer on AW host. }
|
|
ServerHostPage.Add('ServerHost', False);
|
|
ServerHostPage.Add('ServerPort', False);
|
|
ServerHostPage.Values[0] := '{#AwDefaultServerHost}';
|
|
ServerHostPage.Values[1] := '{#AwDefaultServerPort}';
|
|
end;
|
|
|
|
function GetStandaloneInstallParams(Param: string): string;
|
|
var
|
|
serverHost: string;
|
|
serverPort: string;
|
|
begin
|
|
serverHost := Trim(ServerHostPage.Values[0]);
|
|
serverPort := Trim(ServerHostPage.Values[1]);
|
|
if serverHost = '' then
|
|
RaiseException('ServerHost is empty.');
|
|
if serverPort = '' then
|
|
RaiseException('ServerPort is empty.');
|
|
|
|
Result :=
|
|
'-NoProfile -ExecutionPolicy Bypass -File "' + ExpandConstant('{app}\windows\install-standalone-service.ps1') + '"' +
|
|
' -ServerHost "' + serverHost + '"' +
|
|
' -ServerPort ' + serverPort +
|
|
' -InstallRoot "{#AwDefaultInstallRoot}"' +
|
|
' -StateRoot "{#AwDefaultStateRoot}"';
|
|
end;
|