Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions packaging/inno/parrotink.iss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Inno Setup Script for ParrotInk

#define MyAppName "ParrotInk"
#define MyAppVersion "0.2.31"
#define MyAppVersion "0.2.32"
#define MyAppPublisher "Aalwattar"
#define MyAppURL "https://github.com/Aalwattar/ParrotInk"
#define MyAppExeName "ParrotInk.exe"
Expand All @@ -21,6 +21,7 @@ PrivilegesRequired=lowest
OutputDir=..\..\dist
OutputBaseFilename={#MyAppName}-Setup
SetupIconFile=..\..\assets\icons\icon.ico
SetupLogging=yes
Compression=lzma2/ultra64
SolidCompression=yes
WizardStyle=modern
Expand All @@ -46,7 +47,8 @@ Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: de
; Normal install: User sees the checkbox to launch the app
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
; Silent install (updates): Force launch automatically because the wizard pages are hidden
Filename: "{app}\{#MyAppExeName}"; Flags: nowait; Check: WizardSilent
; The Check function introduces a small delay to prevent Windows Defender extraction crashes
Filename: "{app}\{#MyAppExeName}"; Flags: nowait; Check: ShouldDelayLaunchAndSilent

[UninstallDelete]
Type: filesandordirs; Name: "{app}\assets"
Expand All @@ -57,6 +59,19 @@ const
SYNCHRONIZE = $00100000;
INFINITE = $FFFFFFFF;

function ShouldDelayLaunchAndSilent: Boolean;
begin
if WizardSilent() then
begin
Log('Delaying post-install launch for 3000ms to allow AV scanning...');
Sleep(3000);
Result := True;
end else
begin
Result := False;
end;
end;

function OpenProcess(dwAccess: DWORD; bInherit: Boolean; dwPID: DWORD): THandle;
external 'OpenProcess@kernel32.dll stdcall';
function WaitForSingleObject(hHandle: THandle; dwMilliseconds: DWORD): DWORD;
Expand Down
8 changes: 4 additions & 4 deletions packaging/pyinstaller/version_info.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ VSVersionInfo(
ffi=FixedFileInfo(
# filevers and prodvers should be (major, minor, micro, build)
# THe app version can be updated by the build script
filevers=(0, 2, 31, 0),
prodvers=(0, 2, 31, 0),
filevers=(0, 2, 32, 0),
prodvers=(0, 2, 32, 0),
# Contains a bitmask that specifies the valid bits 'flags' r
mask=0x3f,
# Contains a bitmask that specifies the attributes of the file.
Expand All @@ -32,12 +32,12 @@ VSVersionInfo(
u'040904B0',
[StringStruct(u'CompanyName', u'ParrotInk'),
StringStruct(u'FileDescription', u'ParrotInk Voice-To-Text'),
StringStruct(u'FileVersion', u'0.2.31'),
StringStruct(u'FileVersion', u'0.2.32'),
StringStruct(u'InternalName', u'ParrotInk'),
StringStruct(u'LegalCopyright', u'Copyright (c) 2026 ParrotInk'),
StringStruct(u'OriginalFilename', u'ParrotInk.exe'),
StringStruct(u'ProductName', u'ParrotInk'),
StringStruct(u'ProductVersion', u'0.2.31')])
StringStruct(u'ProductVersion', u'0.2.32')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "parrotink"
version = "0.2.31"
version = "0.2.32"
description = "Real-time voice-to-text application for Windows"
readme = "README.md"
requires-python = ">=3.11"
Expand Down
101 changes: 101 additions & 0 deletions scripts/test_installer_mode.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<#
.SYNOPSIS
Tests ParrotInk installer behavior to verify SILENT mode works correctly.

.DESCRIPTION
Run this BEFORE and AFTER recompiling the .iss fix to verify:
1. Does /SILENT suppress the wizard pages? (or does the full wizard appear?)
2. Does ShouldDelayLaunchAndSilent fire and write to the log?
#>
param(
[switch]$Silent, # Run in /SILENT mode (simulates tray update flow)
[switch]$Full # Run without flags (simulates fresh manual install)
)

$InstallerPath = Join-Path $PSScriptRoot "..\dist\ParrotInk-Setup.exe"
$InstallerPath = [System.IO.Path]::GetFullPath($InstallerPath)

if (-not (Test-Path $InstallerPath)) {
Write-Host "ERROR: Installer not found at: $InstallerPath" -ForegroundColor Red
exit 1
}

Write-Host ""
Write-Host "ParrotInk Installer Mode Test" -ForegroundColor Cyan
Write-Host "==============================" -ForegroundColor Cyan
Write-Host "Installer: $InstallerPath"
Write-Host ""

# ── Test 1: SILENT mode (what the tray update does) ──────────────────────────
if ($Silent -or (-not $Full)) {
Write-Host "TEST 1: SILENT mode (simulating in-app tray update)" -ForegroundColor Yellow
Write-Host " Launching with: /SILENT /pid=0"
Write-Host ""
Write-Host "WATCH THE UI carefully:" -ForegroundColor White
Write-Host " - If you see ONLY a progress bar with no Next/Back/Finish pages → SILENT is working ✓"
Write-Host " - If you see a FULL WIZARD with Next → Finish buttons → SILENT is broken ✗"
Write-Host ""
Read-Host "Press Enter to launch the installer in SILENT mode"

Start-Process -FilePath $InstallerPath -ArgumentList "/SILENT /pid=0" -Wait

Write-Host ""
Write-Host "Installer closed. Checking log..." -ForegroundColor Cyan

$Log = Get-ChildItem -Path $env:TEMP -Filter "Setup Log *.txt" |
Where-Object { $_.LastWriteTime -gt (Get-Date).AddMinutes(-5) } |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1

if ($Log) {
Write-Host "Log file: $($Log.FullName)" -ForegroundColor Gray

$WizardSilentLine = Select-String -Path $Log.FullName -Pattern "WizardSilent|ShouldDelayLaunch|Delaying post-install"
$InitLine = Select-String -Path $Log.FullName -Pattern "Installer received PID|No PID passed"
$RunLine = Select-String -Path $Log.FullName -Pattern "\[Run\]"

Write-Host ""
Write-Host "--- Relevant log entries ---" -ForegroundColor DarkGray

if ($InitLine) {
Write-Host " InitializeSetup : $($InitLine.Line.Trim())" -ForegroundColor Gray
}
if ($WizardSilentLine) {
Write-Host " Delay function : $($WizardSilentLine.Line.Trim())" -ForegroundColor Green
Write-Host ""
Write-Host "RESULT: Delay fix FIRED correctly ✓" -ForegroundColor Green
} else {
Write-Host " Delay function : (not found in log)" -ForegroundColor Red
Write-Host ""
Write-Host "RESULT: Delay fix did NOT fire." -ForegroundColor Red
Write-Host " → Either SILENT mode is not being applied (WizardSilent()=False)," -ForegroundColor Red
Write-Host " or the installer was compiled before the fix was added." -ForegroundColor Red
}

Write-Host ""
Write-Host "To open the full log: notepad '$($Log.FullName)'" -ForegroundColor Gray
} else {
Write-Host "No Setup Log found in TEMP. Is SetupLogging=yes in the .iss file?" -ForegroundColor Red
Write-Host "(SetupLogging=yes was added by the fix — recompile first if missing)" -ForegroundColor Yellow
}
}

# ── Test 2: Full wizard mode (normal manual install) ─────────────────────────
if ($Full) {
Write-Host ""
Write-Host "TEST 2: Full Wizard mode (simulating fresh manual install)" -ForegroundColor Yellow
Write-Host " Launching with: no flags"
Write-Host ""
Write-Host "EXPECTED: Full wizard with Welcome → Install → Finish pages"
Write-Host " Finish page should have a checkbox to launch ParrotInk"
Write-Host ""
Read-Host "Press Enter to launch the installer in Full Wizard mode"

Start-Process -FilePath $InstallerPath -Wait

Write-Host ""
Write-Host "Done. Did you see the full wizard with a Finish+launch checkbox? (that is correct)" -ForegroundColor Cyan
}

Write-Host ""
Write-Host "Test complete." -ForegroundColor Cyan
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading