Skip to content

Local, full Windows search replacement, clipboard manager, and launcher: files, apps, settings and semantic media search with Google's EmbeddingGemma 2.

Package VectorDash as a Windows 11 installer

ampersandrud23076614405
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644
index 0000000..2042b56
--- /dev/null
+++ b/.github/workflows/windows.yml
@@ -0,0 +1,31 @@
+name: Windows installer
+on:
+ workflow_dispatch:
+ push:
+ paths:
+ - 'windows/**'
+ - 'packaging/**'
+ - 'Build-Windows.ps1'
+ - '.github/workflows/windows.yml'
+jobs:
+ build:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.14'
+ - name: Build installer
+ shell: pwsh
+ run: ./Build-Windows.ps1
+ - name: Test
+ shell: pwsh
+ run: |
+ ./.build-venv/Scripts/python.exe -m unittest discover -s windows -p 'test_*.py' -q
+ if ($LASTEXITCODE) { throw 'Tests failed' }
+ $check = Start-Process ./dist/VectorDash/VectorDash.exe -ArgumentList '--smoke-test --smoke-report smoke/report.json' -Wait -PassThru
+ if ($check.ExitCode) { throw 'Packaged smoke test failed' }
+ - uses: actions/upload-artifact@v4
+ with:
+ name: VectorDash-Windows-installer
+ path: dist/installer/*
diff --git a/.gitignore b/.gitignore
index 1cee19c..664d079 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,9 @@ windows/.smoke/
*.local.json
.DS_Store
Thumbs.db
+
+# Installer build output
+build/
+dist/
+.build-tools/
+.build-venv/
diff --git a/Build-Windows.ps1 b/Build-Windows.ps1
new file mode 100644
index 0000000..f9ffbb7
--- /dev/null
+++ b/Build-Windows.ps1
@@ -0,0 +1,39 @@
+param([string]$Python = '', [switch]$SkipDependencies)
+$ErrorActionPreference = 'Stop'
+$ProjectRoot = $PSScriptRoot
+Set-Location $ProjectRoot
+if (!$Python) {
+ if (!(Test-Path '.build-venv/Scripts/python.exe')) {
+ py -3 -m venv .build-venv
+ if ($LASTEXITCODE) { throw 'Unable to create build environment' }
+ }
+ $Python = Join-Path $ProjectRoot '.build-venv/Scripts/python.exe'
+}
+if (!$SkipDependencies) {
+ & $Python -m pip install -r packaging/requirements-build.txt
+ if ($LASTEXITCODE) { throw 'Dependency installation failed' }
+}
+$BuildPath = $env:PATH
+try {
+ # Do not collect unrelated DLLs from tools installed on the build machine.
+ $env:PATH = "$env:SystemRoot\System32;$env:SystemRoot"
+ & $Python -m PyInstaller --noconfirm --clean packaging/VectorDash.spec
+} finally {
+ $env:PATH = $BuildPath
+}
+if ($LASTEXITCODE) { throw 'Application build failed' }
+$Compiler = Join-Path $ProjectRoot '.build-tools/inno/ISCC.exe'
+if (!(Test-Path $Compiler)) {
+ New-Item -ItemType Directory -Force '.build-tools' | Out-Null
+ $Download = Join-Path $ProjectRoot '.build-tools/innosetup-6.7.3.exe'
+ Invoke-WebRequest 'https://github.com/jrsoftware/issrc/releases/download/is-6_7_3/innosetup-6.7.3.exe' -OutFile $Download
+ if ((Get-FileHash $Download -Algorithm SHA256).Hash.ToLowerInvariant() -ne '9c73c3bae7ed48d44112a0f48e66742c00090bdb5bef71d9d3c056c66e97b732') { throw 'Compiler checksum mismatch' }
+ $Install = Start-Process -FilePath $Download -ArgumentList @('/PORTABLE=1','/VERYSILENT','/SUPPRESSMSGBOXES','/NORESTART','/NOICONS','/TASKS=""',('/DIR="' + (Join-Path $ProjectRoot '.build-tools/inno') + '"')) -WindowStyle Hidden -Wait -PassThru
+ if ($Install.ExitCode) { throw 'Compiler setup failed' }
+}
+& $Compiler packaging/VectorDash.iss
+if ($LASTEXITCODE) { throw 'Installer build failed' }
+$Installer = Join-Path $ProjectRoot 'dist/installer/VectorDash-Setup-0.1.0-x64.exe'
+$Hash = (Get-FileHash $Installer -Algorithm SHA256).Hash.ToLowerInvariant()
+"$Hash $(Split-Path $Installer -Leaf)" | Set-Content 'dist/installer/SHA256SUMS.txt' -Encoding ascii
+Write-Output "Installer ready: $Installer"
diff --git a/README.md b/README.md
index e7c6f44..f01e58f 100644
--- a/README.md
+++ b/README.md
@@ -28,13 +28,15 @@ results depend on the language and the content.
## Get started
-1. Install Python 3.12 or later if it is not already installed.
-2. Run **Setup-VectorDash.cmd** once to install the app's dependencies.
-3. Run **Run-VectorDash.cmd** to open VectorDash.
-4. In **Models & hardware → Status**, choose the features you want. Choose your
+1. Download **VectorDash-Setup-0.1.0-x64.exe** from [Releases](https://github.com/ampersandru/VectorDash/releases).
+2. Run the installer and open VectorDash. Python is included; no separate installation is needed.
+3. In **Models & hardware → Status**, choose the features you want. Choose your
hardware and model quantization below, then click **Download, install and start**.
-5. In **Sources**, add a drive or folder and click **Update index**.
-6. Search for a file. Start with a small test folder to check the results.
+4. In **Sources**, add a drive or folder and click **Update index**.
+5. Search for a file. Start with a small test folder to check the results.
+
+To run from source, install Python 3.12 or later, run **Setup-VectorDash.cmd**,
+then **Run-VectorDash.cmd**. See [installer build instructions](packaging/README.md).
The app can download llama-server, EmbeddingGemma 2, its image/audio encoder,
OCR tools and language packs. The media decoder is included with the app's
diff --git a/packaging/README.md b/packaging/README.md
new file mode 100644
index 0000000..64f7425
--- /dev/null
+++ b/packaging/README.md
@@ -0,0 +1,11 @@
+# Building the Windows installer
+
+Run `./Build-Windows.ps1` in PowerShell on Windows with Python 3.14 installed. The script creates a build environment, bundles the application and its dependencies, verifies and sets up a portable Inno Setup compiler, and creates `dist/installer/VectorDash-Setup-0.1.0-x64.exe` plus its SHA-256 checksum.
+
+For an existing Python environment, pass `-Python PATH`. Use `-SkipDependencies` only when its dependencies are already installed.
+
+The installer targets Windows 11 x64, installs for the current user without administrator access, and includes Python, Qt and the media decoder. AI models and optional OCR tools are downloaded separately from Models & hardware. Uninstalling preserves downloaded models, settings and the search index.
+
+For a packaged smoke test, run `dist/VectorDash/VectorDash.exe --smoke-test --smoke-report PATH/report.json`. This checks the bundled UI, image/PDF previews, indexing, search, startup command and media decoder without downloading models.
+
+Build outputs are ignored by Git. Publish the installer and checksum as release assets.
diff --git a/packaging/VectorDash.ico b/packaging/VectorDash.ico
new file mode 100644
index 0000000..965ae87
Binary files /dev/null and b/packaging/VectorDash.ico differ
diff --git a/packaging/VectorDash.iss b/packaging/VectorDash.iss
new file mode 100644
index 0000000..cf34cd8
--- /dev/null
+++ b/packaging/VectorDash.iss
@@ -0,0 +1,40 @@
+[Setup]
+AppId={{C6AC1B4D-A119-4D73-B2C8-6C507DEFE923}
+AppName=VectorDash
+AppVersion=0.1.0
+AppPublisher=VectorDash contributors
+AppPublisherURL=https://github.com/ampersandru/VectorDash
+DefaultDirName={localappdata}\Programs\VectorDash
+DefaultGroupName=VectorDash
+PrivilegesRequired=lowest
+ArchitecturesAllowed=x64compatible
+ArchitecturesInstallIn64BitMode=x64compatible
+MinVersion=10.0.22000
+OutputDir=..\dist\installer
+OutputBaseFilename=VectorDash-Setup-0.1.0-x64
+SetupIconFile=VectorDash.ico
+UninstallDisplayIcon={app}\VectorDash.exe
+LicenseFile=..\LICENSE
+Compression=lzma2
+SolidCompression=yes
+WizardStyle=modern
+CloseApplications=yes
+
+[Tasks]
+Name: desktopicon; Description: "Create a desktop shortcut"; Flags: unchecked
+[Files]
+Source: "..\dist\VectorDash\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
+[Icons]
+Name: "{group}\VectorDash"; Filename: "{app}\VectorDash.exe"
+Name: "{autodesktop}\VectorDash"; Filename: "{app}\VectorDash.exe"; Tasks: desktopicon
+[Run]
+Filename: "{app}\VectorDash.exe"; Description: "Open VectorDash"; Flags: nowait postinstall skipifsilent
+[Code]
+procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
+var Command: String;
+begin
+ if CurUninstallStep = usUninstall then
+ if RegQueryStringValue(HKCU, 'Software\Microsoft\Windows\CurrentVersion\Run', 'VectorDash', Command) then
+ if Pos(Lowercase(ExpandConstant('{app}\VectorDash.exe')), Lowercase(Command)) > 0 then
+ RegDeleteValue(HKCU, 'Software\Microsoft\Windows\CurrentVersion\Run', 'VectorDash');
+end;
diff --git a/packaging/VectorDash.spec b/packaging/VectorDash.spec
new file mode 100644
index 0000000..bd57169
--- /dev/null
+++ b/packaging/VectorDash.spec
@@ -0,0 +1,16 @@
+from pathlib import Path
+from PyInstaller.utils.hooks import collect_data_files
+root=Path(SPEC).resolve().parents[1]
+datas=[(str(root/'windows/assets'),'assets'),(str(root/'LICENSE'),'notices'),(str(root/'ACKNOWLEDGEMENTS.md'),'notices'),(str(root/'README.md'),'notices')]
+datas+=collect_data_files('imageio_ffmpeg')
+datas+=collect_data_files('PySide6',includes=['**/licenses/**'])
+# Preserve the complete application and build source alongside the executable.
+for folder in ('windows','packaging'):
+ for file in (root/folder).rglob('*'):
+ if file.is_file() and not any(part in ('.smoke','.venv','__pycache__') for part in file.parts) and file.suffix in ('.py','.txt','.md','.spec','.iss','.ps1'):
+ datas.append((str(file),str(Path('source')/file.relative_to(root).parent)))
+a=Analysis([str(root/'windows/desktop.py')],pathex=[str(root/'windows')],binaries=[],datas=datas,hiddenimports=[],hookspath=[],hooksconfig={},runtime_hooks=[str(root/'packaging/runtime_logging.py')],excludes=['tkinter','matplotlib','pandas','scipy'],noarchive=False)
+pyz=PYZ(a.pure)
+exe=EXE(pyz,a.scripts,[],exclude_binaries=True,name='VectorDash',debug=False,bootloader_ignore_signals=False,strip=False,upx=False,console=False,icon=str(root/'packaging/VectorDash.ico'),version=str(root/'packaging/version_info.txt'))
+coll=COLLECT(exe,a.binaries,a.datas,strip=False,upx=False,name='VectorDash')
+
diff --git a/packaging/requirements-build.txt b/packaging/requirements-build.txt
new file mode 100644
index 0000000..75d6506
--- /dev/null
+++ b/packaging/requirements-build.txt
@@ -0,0 +1,2 @@
+-r ../windows/requirements.txt
+pyinstaller==6.22.3
diff --git a/packaging/runtime_logging.py b/packaging/runtime_logging.py
new file mode 100644
index 0000000..abb54cc
--- /dev/null
+++ b/packaging/runtime_logging.py
@@ -0,0 +1,10 @@
+"""Keep startup diagnostics available for the windowed executable."""
+import os
+from pathlib import Path
+import sys
+if sys.stdout is None or sys.stderr is None:
+ home=Path(os.environ.get('VECTORDASH_DATA_HOME') or Path(os.environ.get('LOCALAPPDATA',Path.home()))/'VectorDash')
+ home.mkdir(parents=True,exist_ok=True)
+ stream=open(home/'startup.log','a',encoding='utf-8',buffering=1)
+ if sys.stdout is None: sys.stdout=stream
+ if sys.stderr is None: sys.stderr=stream
diff --git a/packaging/version_info.txt b/packaging/version_info.txt
new file mode 100644
index 0000000..02470f9
--- /dev/null
+++ b/packaging/version_info.txt
@@ -0,0 +1,4 @@
+VSVersionInfo(
+ ffi=FixedFileInfo(filevers=(0,1,0,0),prodvers=(0,1,0,0),mask=0x3f,flags=0,OS=0x40004,fileType=0x1,subtype=0,date=(0,0)),
+ kids=[StringFileInfo([StringTable('040904B0',[
+ StringStruct('CompanyName','VectorDash contributors'),StringStruct('FileDescription','VectorDash - local AI file search'),StringStruct('FileVersion','0.1.0'),StringStruct('InternalName','VectorDash'),StringStruct('OriginalFilename','VectorDash.exe'),StringStruct('ProductName','VectorDash'),StringStruct('ProductVersion','0.1.0'),StringStruct('LegalCopyright','Copyright 2026 VectorDash contributors')])]),VarFileInfo([VarStruct('Translation',[1033,1200])])])
diff --git a/windows/desktop.py b/windows/desktop.py
index 9307bea..83a9173 100644
--- a/windows/desktop.py
+++ b/windows/desktop.py
@@ -1731,6 +1731,9 @@ def main():
app.setOrganizationName('VectorDash')
app.setStyle('Fusion')
app.setQuitOnLastWindowClosed(False)
+ if '--smoke-test' in sys.argv:
+ from packaged_smoke import run_smoke
+ return run_smoke(app)
settings=Settings()
name='VectorDash-'+hashlib.sha256(str(settings.home.resolve()).encode()).hexdigest()[:16]
socket=QLocalSocket()
diff --git a/windows/packaged_smoke.py b/windows/packaged_smoke.py
new file mode 100644
index 0000000..882d8d4
--- /dev/null
+++ b/windows/packaged_smoke.py
@@ -0,0 +1,59 @@
+"""Opt-in smoke check for packaged Windows dependencies, UI and local indexing."""
+import json
+import os
+from pathlib import Path
+import sys
+import time
+import traceback
+
+def run_smoke(app):
+ report=Path(sys.argv[sys.argv.index('--smoke-report')+1])
+ report.parent.mkdir(parents=True,exist_ok=True)
+ result={'ok':False,'frozen':bool(getattr(sys,'frozen',False))}
+ window=None
+ try:
+ from PIL import Image
+ import numpy
+ import pymupdf
+ from engine import Settings,DEFAULTS,SearchResult,Engine
+ from desktop import Desktop
+ from content import ffmpeg
+ from windows_integration import startup_command
+ import process_lifecycle
+ home=report.parent/'app-data'
+ os.environ['VECTORDASH_DATA_HOME']=str(home)
+ store=Settings(home)
+ store.values=dict(DEFAULTS,hotkey='Ctrl+Alt+Shift+F19',theme='Light',ocr_enabled=False)
+ window=Desktop(store)
+ window.clock.stop();window.process_timer.stop()
+ source=home/'source';source.mkdir(parents=True,exist_ok=True)
+ photo=source/'preview.png';Image.new('RGB',(120,80),'purple').save(photo)
+ (source/'notes.txt').write_text('Packaged search invoice INV-394',encoding='utf-8')
+ pdf=source/'preview.pdf'
+ with pymupdf.open() as doc:
+ page=doc.new_page();page.insert_text((40,40),'Pets are allowed with permission.')
+ doc.save(pdf)
+ settings=dict(store.values,semantic=False,roots=[str(source)])
+ summary=window.engine.index(settings)
+ assert window.engine.search('INV-394',settings)
+ window.results.populate([SearchResult(1,str(photo),'',kind='image')])
+ app.processEvents()
+ assert not window.result_preview.current.picture.pixmap().isNull()
+ window.quick.results.populate([SearchResult(1,str(pdf),'Pets',kind='pdf',page=1,query='Pets')])
+ app.processEvents()
+ assert window.quick.preview.current.highlight_count>0
+ import imageio_ffmpeg
+ decoder=imageio_ffmpeg.get_ffmpeg_exe()
+ checked=process_lifecycle.run([decoder,'-version'],capture_output=True,timeout=20,creationflags=0x08000000)
+ assert checked.returncode==0
+ if getattr(sys,'frozen',False):
+ assert startup_command()==[sys.executable,'--startup']
+ result.update(ok=True,index=summary,ffmpeg=Path(decoder).name,numpy=numpy.__version__,startup=startup_command())
+ window.grab().save(str(report.with_suffix('.png')))
+ except Exception:
+ result['error']=traceback.format_exc()
+ finally:
+ if window:
+ window.cleanup();window.close()
+ report.write_text(json.dumps(result,indent=2),encoding='utf-8')
+ return 0 if result['ok'] else 1
diff --git a/windows/process_lifecycle.py b/windows/process_lifecycle.py
index 3d144ca..a8ec940 100644
--- a/windows/process_lifecycle.py
+++ b/windows/process_lifecycle.py
@@ -1,4 +1,7 @@
"""Gate helper process creation during application shutdown."""
+import ctypes
+import os
+import sys
import subprocess
import threading
@@ -19,7 +22,15 @@ def popen(*args,**kwargs):
with _lock:
if _closing:
raise InterruptedError('VectorDash is exiting')
- return subprocess.Popen(*args,**kwargs)
+ frozen=os.name=='nt' and getattr(sys,'frozen',False)
+ if frozen:
+ ctypes.windll.kernel32.SetDllDirectoryW.argtypes=[ctypes.c_wchar_p]
+ ctypes.windll.kernel32.SetDllDirectoryW(None)
+ try:
+ return subprocess.Popen(*args,**kwargs)
+ finally:
+ if frozen:
+ ctypes.windll.kernel32.SetDllDirectoryW(str(sys._MEIPASS))
def run(*args,**kwargs):
# subprocess.run enters Popen immediately. Holding this lock for its entire
diff --git a/windows/test_packaging.py b/windows/test_packaging.py
new file mode 100644
index 0000000..34e124c
--- /dev/null
+++ b/windows/test_packaging.py
@@ -0,0 +1,12 @@
+import unittest
+from pathlib import Path
+from windows_integration import startup_command
+
+class StartupTests(unittest.TestCase):
+ def test_installed_executable_starts_without_source_script(self):
+ self.assertEqual(startup_command(r'C:\Program Files\VectorDash\VectorDash.exe',True),[r'C:\Program Files\VectorDash\VectorDash.exe','--startup'])
+ def test_source_uses_windowless_python_and_script(self):
+ command=startup_command(r'C:\Python314\python.exe',False)
+ self.assertEqual(command[0],r'C:\Python314\pythonw.exe')
+ self.assertEqual(Path(command[1]).name,'desktop.py')
+ self.assertEqual(command[2],'--startup')
diff --git a/windows/windows_integration.py b/windows/windows_integration.py
index a1c8044..76227ee 100644
--- a/windows/windows_integration.py
+++ b/windows/windows_integration.py
@@ -52,6 +52,16 @@ class GlobalHotkey:
self.current = ''
+def startup_command(executable=None,frozen=None):
+ executable=Path(executable or sys.executable)
+ frozen=getattr(sys,'frozen',False) if frozen is None else frozen
+ if frozen:
+ return [str(executable),'--startup']
+ if executable.name.lower()=='python.exe':
+ executable=executable.with_name('pythonw.exe')
+ return [str(executable),str(Path(__file__).with_name('desktop.py').resolve()),'--startup']
+
+
def set_startup(enabled):
if os.name != 'nt':
return
@@ -59,10 +69,7 @@ def set_startup(enabled):
key_path = r'Software\Microsoft\Windows\CurrentVersion\Run'
with winreg.CreateKey(winreg.HKEY_CURRENT_USER, key_path) as key:
if enabled:
- executable = Path(sys.executable)
- if executable.name.lower() == 'python.exe':
- executable = executable.with_name('pythonw.exe')
- command = subprocess.list2cmdline([str(executable), str(Path(__file__).with_name('desktop.py').resolve()), '--startup'])
+ command = subprocess.list2cmdline(startup_command())
winreg.SetValueEx(key, 'VectorDash', 0, winreg.REG_SZ, command)
try:
winreg.DeleteValue(key,'DigUp')