#define APPNAM "ZoiteChat" #define APPVER "<#= [string]::Join('.', $versionParts) #>" ; These are defined by our installer project at build time ;#define APPARCH "x64" ;#define PROJECTDIR "C:\...\zoitechat\win32\installer\" ;http://mitrich.net23.net/?/inno-download-plugin.html #ifexist "idp.iss" #define USE_INNO_DOWNLOAD_PLUGIN #include #endif [Setup] AppName=ZoiteChat AppVersion={#APPVER} AppVerName=ZoiteChat {#APPVER} AppPublisher=ZoiteChat AppPublisherURL=http://zoitechat.zoite.net AppCopyright=Copyright (C) 1998-2010 Peter Zelezny AppSupportURL=https://github.com/zoitechat/zoitechat/issues AppUpdatesURL=http://zoitechat.zoite.net/downloads.html LicenseFile=share\doc\zoitechat\COPYING UninstallDisplayIcon={app}\zoitechat.exe UninstallDisplayName=ZoiteChat DefaultDirName={pf64}\ZoiteChat DefaultGroupName=ZoiteChat AllowNoIcons=yes SolidCompression=yes Compression=lzma2/ultra64 SourceDir=..\rel OutputDir=.. OutputBaseFilename={#APPNAM}-{#APPVER}_x64 FlatComponentsList=no PrivilegesRequired=none ShowComponentSizes=no CreateUninstallRegKey=not IsTaskSelected('portable') Uninstallable=not IsTaskSelected('portable') ArchitecturesAllowed=x64 ArchitecturesInstallIn64BitMode=x64 MinVersion=6.1 WizardImageFile={#PROJECTDIR}wizardimage.bmp WizardSmallImageFile={#PROJECTDIR}wizardsmallimage.bmp SetupIconFile={#PROJECTDIR}..\..\data\icons\zoitechat.ico [Types] Name: "normal"; Description: "Normal Installation" Name: "minimal"; Description: "Minimal Installation" Name: "custom"; Description: "Custom Installation"; Flags: iscustom [Components] Name: "libs"; Description: "ZoiteChat"; Types: normal minimal custom; Flags: fixed Name: "xctext"; Description: "ZoiteChat-Text"; Types: custom; Flags: disablenouninstallwarning Name: "icons"; Description: "Create Shortcuts"; Types: custom; Flags: disablenouninstallwarning Name: "icons\desktopicon"; Description: "Create Desktop Shortcut"; Types: custom; Flags: disablenouninstallwarning Name: "icons\quicklaunchicon"; Description: "Create Quick Launch Shortcut"; Types: custom; Flags: disablenouninstallwarning Name: "translations"; Description: "Translations"; Types: normal custom; Flags: disablenouninstallwarning Name: "spell"; Description: "Spelling Dictionaries"; Types: custom; Flags: disablenouninstallwarning Name: "plugins"; Description: "Plugins"; Types: custom; Flags: disablenouninstallwarning Name: "plugins\checksum"; Description: "Checksum"; Types: custom; Flags: disablenouninstallwarning Name: "plugins\exec"; Description: "Exec"; Types: custom; Flags: disablenouninstallwarning Name: "plugins\fishlim"; Description: "FiSHLiM"; Types: custom; Flags: disablenouninstallwarning Name: "plugins\sysinfo"; Description: "SysInfo"; Types: custom; Flags: disablenouninstallwarning Name: "plugins\upd"; Description: "Update Checker"; Types: normal custom; Flags: disablenouninstallwarning Name: "plugins\winamp"; Description: "Winamp"; Types: custom; Flags: disablenouninstallwarning Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouninstallwarning Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning Name: "langs\python"; Description: "Python (requires Python 3.14.2)"; Types: custom; Flags: disablenouninstallwarning [Tasks] Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked [Registry] Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\zoitechat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\zoitechat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable Root: HKCR; Subkey: ".zct"; ValueType: string; ValueName: ""; ValueData: "ZoiteChat.Theme"; Flags: uninsdeletevalue; Tasks: not portable Root: HKCR; Subkey: ".hct"; ValueType: string; ValueName: ""; ValueData: "ZoiteChat.Theme"; Flags: uninsdeletevalue; Tasks: not portable Root: HKCR; Subkey: "ZoiteChat.Theme"; ValueType: string; ValueName: ""; ValueData: "ZoiteChat Theme"; Flags: uninsdeletekey; Tasks: not portable Root: HKCR; Subkey: "ZoiteChat.Theme\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\zoitechat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable Root: HKCR; Subkey: "ZoiteChat.Theme\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\zoitechat.exe"" ""%1"""; Flags: uninsdeletevalue; Tasks: not portable [Run] Filename: "{app}\zoitechat.exe"; Description: "Run ZoiteChat after closing the Wizard"; Flags: nowait postinstall skipifsilent Filename: "http://docs.zoitechat.org/en/latest/changelog.html"; Description: "See what's changed"; Flags: shellexec runasoriginaluser postinstall skipifsilent unchecked Filename: "{tmp}\vcredist.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installing Visual C++ Redistributable"; Flags: skipifdoesntexist; Tasks: not portable Filename: "{tmp}\perl.msi"; StatusMsg: "Installing Perl"; Components: langs\perl; Flags: shellexec skipifdoesntexist; Tasks: not portable Filename: "{tmp}\python.msi"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable Filename: "{tmp}\python.exe"; Parameters: "InstallAllUsers=1 PrependPath=1"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable Filename: "{tmp}\spelling-dicts.exe"; Parameters: "/verysilent"; StatusMsg: "Installing Spelling Dictionaries"; Components: spell; Flags: skipifdoesntexist; Tasks: not portable [Files] Source: "portable-mode"; DestDir: "{app}"; Tasks: portable Source: "changelog.url"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "readme.url"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "cert.pem"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs Source: "share\doc\zoitechat\*"; DestDir: "{app}\share\doc\zoitechat"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs Source: "share\doc\WinSparkle\*"; DestDir: "{app}\share\doc\WinSparkle"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs Source: "share\themes\MS-Windows\*"; DestDir: "{app}\share\themes\MS-Windows"; Flags: ignoreversion createallsubdirs recursesubdirs skipifsourcedoesntexist; Components: libs Source: "share\glib-2.0\schemas\*"; DestDir: "{app}\share\glib-2.0\schemas"; Flags: ignoreversion createallsubdirs recursesubdirs skipifsourcedoesntexist; Components: libs Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations Source: "etc\fonts\*"; DestDir: "{app}\etc\fonts"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs Source: "atk-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "cairo-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "freetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "fribidi-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "fontconfig-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gdk-3-vs17.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "epoxy-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gio-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "glib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gmodule-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gobject-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gspawn-win64-helper.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gspawn-win64-helper-console.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gthread-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "iconv.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "libcrypto-3-x64.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "libssl-3-x64.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "libenchant.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "ffi-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "intl.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "xml2-16.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "pango-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "pangocairo-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "cairo-gobject-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "pangoft2-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "pangowin32-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "harfbuzz.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "gtk-3-vs17.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "libexpat.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "pcre2-8-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "pixman-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "tiff.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "plugins\hcnotifications-winrt.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: libs Source: "lib\enchant\*"; DestDir: "{app}\lib\enchant"; Flags: ignoreversion; Components: libs Source: "girepository-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "lua51.dll"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "luajit-5.1.dll"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "luajit.dll"; DestDir: "{app}"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "lib\lua\2.1\lgi\*.dll"; DestDir: "{app}\lib\lua\lgi"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "lib\lua\5.1\lgi\*.dll"; DestDir: "{app}\lib\lua\lgi"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "lib\girepository-1.0\*.typelib"; DestDir: "{app}\lib\girepository-1.0"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "share\lua\2.1\*.lua"; DestDir: "{app}\share\lua"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "share\lua\2.1\lgi\*.lua"; DestDir: "{app}\share\lua\lgi"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "share\lua\2.1\lgi\override\*.lua"; DestDir: "{app}\share\lua\lgi\override"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "share\lua\5.1\*.lua"; DestDir: "{app}\share\lua"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "share\lua\5.1\lgi\*.lua"; DestDir: "{app}\share\lua\lgi"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "share\lua\5.1\lgi\override\*.lua"; DestDir: "{app}\share\lua\lgi\override"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\lua Source: "plugins\hclua.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\lua Source: "plugins\hcchecksum.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\checksum Source: "plugins\hcexec.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\exec Source: "plugins\hcfishlim.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\fishlim Source: "share\music.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\winamp Source: "share\download.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\upd Source: "plugins\hcupd.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\upd Source: "WinSparkle.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: plugins\upd Source: "plugins\hcwinamp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winamp Source: "share\system.png"; DestDir: "{app}\share"; Flags: ignoreversion; Components: plugins\sysinfo Source: "plugins\hcsysinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\sysinfo Source: "plugins\hcperl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\perl Source: "python\*.py"; DestDir: "{app}\python"; Flags: ignoreversion; Components: langs\python Source: "plugins\hcpython3.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python Source: "_cffi_backend.cp3*.pyd"; DestDir: "{app}"; Flags: ignoreversion; Components: langs\python Source: "zoitechat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs Source: "zoitechat-text.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xctext [Icons] Name: "{group}\ZoiteChat"; Filename: "{app}\zoitechat.exe"; AppUserModelID: "ZoiteChat.Desktop.Notify"; Tasks: not portable; Check: not WizardNoIcons Name: "{group}\ZoiteChat Safe Mode"; Filename: "{app}\zoitechat.exe"; Parameters: "--no-auto --no-plugins"; Tasks: not portable; Check: not WizardNoIcons Name: "{group}\ZoiteChat ChangeLog"; Filename: "{app}\changelog.url"; IconFilename: "{sys}\shell32.dll"; IconIndex: 165; Tasks: not portable; Check: not WizardNoIcons Name: "{group}\ZoiteChat ReadMe"; Filename: "{app}\readme.url"; IconFilename: "{sys}\shell32.dll"; IconIndex: 23; Tasks: not portable; Check: not WizardNoIcons Name: "{group}\ZoiteChat Config Folder"; Filename: "%APPDATA%\ZoiteChat\"; Tasks: not portable; Check: not WizardNoIcons Name: "{group}\ZoiteChat-Text"; Filename: "{app}\zoitechat-text.exe"; Components: xctext; Tasks: not portable; Check: not WizardNoIcons Name: "{group}\Uninstall ZoiteChat"; Filename: "{uninstallexe}"; Tasks: not portable; Check: not WizardNoIcons Name: "{commondesktop}\ZoiteChat"; Filename: "{app}\zoitechat.exe"; AppUserModelID: "ZoiteChat.Desktop.Notify"; Components: icons\desktopicon; Tasks: not portable Name: "{commonappdata}\Microsoft\Internet Explorer\Quick Launch\ZoiteChat"; Filename: "{app}\zoitechat.exe"; Components: icons\quicklaunchicon; Tasks: not portable [Messages] BeveledLabel= {#APPNAM} [Code] #ifndef USE_INNO_DOWNLOAD_PLUGIN // The Inno Download Plugin isn't always installed in CI environments. // Provide no-op fallback procedures so installer compilation still succeeds. procedure idpDownloadAfter(PageID: Integer); begin end; procedure idpClearFiles; begin end; procedure idpAddFile(URL: String; Filename: String); begin end; #endif ///////////////////////////////////////////////////////////////////// procedure InitializeWizard; begin WizardForm.LicenseAcceptedRadio.Checked := True; idpDownloadAfter(wpReady); end; ///////////////////////////////////////////////////////////////////// function GetSysDir(): String; begin Result := ExpandConstant('{sys}\'); end; ///////////////////////////////////////////////////////////////////// function CheckDLL(DLLName: String): Boolean; var ResultCode: Integer; begin if ExecAsOriginalUser(GetSysDir() + 'where.exe', '/Q ' + DLLName, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then Result := ResultCode = 0 // 0 is success else Result := False; end; ///////////////////////////////////////////////////////////////////// function CheckVCInstall(): Boolean; begin Result := FileExists(GetSysDir() + 'vcruntime140.dll');; end; ///////////////////////////////////////////////////////////////////// function CheckSpellInstall(): Boolean; var Version: TWindowsVersion; begin GetWindowsVersionEx(Version); // Windows 8 or greater has built in spell check. if Version.NTPlatform and (Version.Major > 6) or ((Version.Major = 6) and (Version.Minor > 1)) then Result := True else Result := DirExists(ExpandConstant('{localappdata}') + '\enchant\myspell'); end; ///////////////////////////////////////////////////////////////////// // Sets up the automatic downloads ///////////////////////////////////////////////////////////////////// procedure CurPageChanged(CurPageID: Integer); var REDIST: String; PERL: String; PY3: String; SPELL: String; begin if(CurPageID = wpReady) then begin idpClearFiles; if not IsTaskSelected('portable') then begin REDIST := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/vcredist_2015_x64.exe'; PERL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/Perl.5.20.0.x64.msi'; PY3 := 'https://www.python.org/ftp/python/3.14.2/python-3.14.2-amd64.exe'; SPELL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/ZoiteChat.Spelling.Dictionaries.r2.exe'; if not CheckVCInstall() then idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe')); if IsComponentSelected('spell') and not CheckSpellInstall() then idpAddFile(SPELL, ExpandConstant('{tmp}\spelling-dicts.exe')); if not WizardSilent() then begin if IsComponentSelected('langs\perl') and not CheckDLL('perl520.dll') then begin idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi')) end; if IsComponentSelected('langs\python') and not CheckDLL('python314.dll') then idpAddFile(PY3, ExpandConstant('{tmp}\python.exe')); end; end; end; end; ///////////////////////////////////////////////////////////////////// // Disable portable-mode if installing to program files ///////////////////////////////////////////////////////////////////// function NextButtonClick(CurPageID: Integer): Boolean; begin if (CurPageID = wpSelectTasks) then if (WizardForm.TasksList.Checked[1] = True) then if (WizardDirValue() = ExpandConstant('{pf64}\ZoiteChat')) then begin WizardForm.TasksList.Checked[1] := False MsgBox('Portable mode is only intended for use on portable drives and has been disabled.', mbInformation, MB_OK) end; Result := True; // Always continue end; ///////////////////////////////////////////////////////////////////// // these are required for x86->x64 or reverse upgrades ///////////////////////////////////////////////////////////////////// function GetUninstallString(): String; var sUnInstPath: String; sUnInstallString: String; begin sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\ZoiteChat (x64)_is1'); sUnInstallString := ''; if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); if not (sUnInstallString <> '') then sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\ZoiteChat_is1'); if not RegQueryStringValue(HKLM32, sUnInstPath, 'UninstallString', sUnInstallString) then if not RegQueryStringValue(HKCU32, sUnInstPath, 'UninstallString', sUnInstallString) then if IsWin64 then if not RegQueryStringValue(HKLM64, sUnInstPath, 'UninstallString', sUnInstallString) then RegQueryStringValue(HKCU64, sUnInstPath, 'UninstallString', sUnInstallString); Result := sUnInstallString; end; ///////////////////////////////////////////////////////////////////// function IsUpgrade(): Boolean; begin Result := (GetUninstallString() <> ''); end; ///////////////////////////////////////////////////////////////////// function UnInstallOldVersion(): Integer; var sUnInstallString: String; iResultCode: Integer; begin // Return Values: // 1 - uninstall string is empty // 2 - error executing the UnInstallString // 3 - successfully executed the UnInstallString // default return value Result := 0; // get the uninstall string of the old app sUnInstallString := GetUninstallString(); if sUnInstallString <> '' then begin sUnInstallString := RemoveQuotes(sUnInstallString); if Exec(sUnInstallString, '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then Result := 3 else Result := 2; end else Result := 1; end; ///////////////////////////////////////////////////////////////////// procedure CurStepChanged(CurStep: TSetupStep); begin if not (IsTaskSelected('portable')) then begin if (CurStep=ssInstall) then begin if (IsUpgrade()) then begin UnInstallOldVersion(); end; DeleteFile(ExpandConstant('{app}\portable-mode')); end; end; end;