; SPDX-FileCopyrightText: 2026 Matvey Shcherbinin ; SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL ; KOutNet - Inno Setup 6 ; Build (on developer machine, after Prepare-Portable.ps1): ; ISCC packaging\windows\KOutNet.iss ; ; The setup contains the complete portable tree. #define MyAppName "KOutNet" #define MyAppVersion "0.2.0" #define MyAppFileVersion "0.2.0.0" #define MyAppPublisher "bitzuka" #define MyAppURL "https://invent.kde.org/bitzuka/koutnetwork" #define MyAppExeName "KOutNet.exe" #define MyAppId "{{A8C3E2F1-9B4D-4E7A-8F21-6D0C1A2B3E4F}" ; Paths relative to this .iss file (packaging\windows) #define RepoRoot "..\..\" #ifndef MyAppSource #define MyAppSource RepoRoot + "dist\portable\KOutNet" #endif #define MyOutputDir RepoRoot + "dist" #define MyIcon "koutnet.ico" #define MyLicense "LICENSE.txt" [Setup] AppId={#MyAppId} AppName={#MyAppName} AppVersion={#MyAppVersion} AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} AppCopyright=Copyright (C) 2026 bitzuka DefaultDirName={localappdata}\{#MyAppName} DefaultGroupName={#MyAppName} DisableProgramGroupPage=no PrivilegesRequired=lowest PrivilegesRequiredOverridesAllowed=dialog OutputDir={#MyOutputDir} OutputBaseFilename=KOutNet-Setup-{#MyAppVersion} SetupIconFile={#MyIcon} UninstallDisplayIcon={app}\{#MyAppExeName} UninstallDisplayName={#MyAppName} Compression=lzma2/max SolidCompression=yes WizardStyle=modern WizardSizePercent=120 ShowLanguageDialog=yes AllowNoIcons=yes ArchitecturesAllowed=x64compatible ArchitecturesInstallIn64BitMode=x64compatible MinVersion=10.0 LicenseFile={#MyLicense} CloseApplications=yes RestartApplications=no UsePreviousAppDir=yes DirExistsWarning=no DisableWelcomePage=no DisableFinishedPage=no VersionInfoVersion={#MyAppFileVersion} VersionInfoCompany={#MyAppPublisher} VersionInfoDescription={#MyAppName} Setup VersionInfoProductName={#MyAppName} VersionInfoProductVersion={#MyAppVersion} ; SourceDir = folder of this .iss so relative paths work SourceDir=. [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" Name: "german"; MessagesFile: "compiler:Languages\German.isl" Name: "french"; MessagesFile: "compiler:Languages\French.isl" Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl" Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl" Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl" Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" Name: "portuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" Name: "arabic"; MessagesFile: "compiler:Languages\Arabic.isl" [Messages] english.WelcomeLabel1=Welcome to [name] Setup english.WelcomeLabel2=This will install [name/ver] on your computer.%n%nKOutNet is a P2P encrypted messenger with Matrix (K-Server) support.%n%nClose other applications before continuing. russian.WelcomeLabel1=Вас приветствует мастер установки [name] russian.WelcomeLabel2=Эта программа установит [name/ver] на ваш компьютер.%n%nKOutNet - P2P-мессенджер с шифрованием и поддержкой Matrix (K-Server).%n%nЗакройте другие приложения перед продолжением. [CustomMessages] english.LaunchAfter=Launch KOutNet english.CreateDesktop=Create a desktop shortcut english.CreateQuickLaunch=Create a Start Menu shortcut russian.LaunchAfter=Запустить KOutNet russian.CreateDesktop=Создать ярлык на рабочем столе russian.CreateQuickLaunch=Создать ярлык в меню «Пуск» [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktop}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce Name: "startmenu"; Description: "{cm:CreateQuickLaunch}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce [Files] ; Packed at compile time into the setup. Runtime needs nothing else. Source: "{#MyAppSource}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.iss,*.log,.git*,Install-KOutNet.ps1,Prepare-Portable.ps1" [Icons] Name: "{group}\{#MyAppName}"; Filename: "{app}\Start-KOutNet.bat"; WorkingDir: "{app}"; IconFilename: "{app}\{#MyAppExeName}"; Tasks: startmenu Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; Tasks: startmenu Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\Start-KOutNet.bat"; WorkingDir: "{app}"; IconFilename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Run] Filename: "{app}\Start-KOutNet.bat"; Description: "{cm:LaunchAfter}"; Flags: nowait postinstall skipifsilent shellexec unchecked [UninstallDelete] Type: filesandordirs; Name: "{app}" [Code] // MyAppSource is used only while building the installer. procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep = ssPostInstall then begin if not FileExists(ExpandConstant('{app}\Start-KOutNet.bat')) then SaveStringToFile(ExpandConstant('{app}\Start-KOutNet.bat'), '@echo off' + #13#10 + 'cd /d "%~dp0"' + #13#10 + 'set PATH=%~dp0;%PATH%' + #13#10 + 'set QT_PLUGIN_PATH=%~dp0' + #13#10 + 'set QT_QPA_PLATFORM_PLUGIN_PATH=%~dp0platforms' + #13#10 + 'set QML2_IMPORT_PATH=%~dp0share\qt6\qml' + #13#10 + 'set QML_IMPORT_PATH=%~dp0share\qt6\qml' + #13#10 + 'if exist "%~dp0ssl\certs\ca-bundle.crt" set SSL_CERT_FILE=%~dp0ssl\certs\ca-bundle.crt' + #13#10 + 'start "" "%~dp0KOutNet.exe"' + #13#10, False); end; end; function InitializeUninstall(): Boolean; var ResultCode: Integer; begin Exec('taskkill.exe', '/F /IM KOutNet.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); Result := True; end;