Merge master: the modules moved into a package

Every file this branch touches moved into dikte/, so the merge is mostly the
rename following the edits. What needed a hand:

hotkey.py: master replaced the _macos()/_gnome() pair with one backend()
chooser, and this branch had added _windows() to the pair. Windows is a fifth
value of the chooser now, and everything that used to ask "macOS or Windows?"
asks backend() instead. The key is held by the running process there, so
installs_shortcuts() and shortcut_needs_restart() are both false for it, and
desktop_name() says Windows.

install.ps1 and the Windows README name dikte/__main__.py, the entry point the
Linux and macOS installers were pointed at in the same commit. The Start Menu
entry, the autostart entry and the dikte.cmd shim all come off one $entry
variable.

settings_ui.py: the shortcut tab now has a Windows sentence of its own, with
the Turkish for it. Falling through to the branch master wrote for a desktop
with no registry would have told a Windows user to check /dev/input. Nothing
covers that branch: there is no Windows Settings test class, the way there is
one for macOS.

CONTRIBUTING: the chooser it names is backend() now, and the test count is the
merged one, 1067 of 1110 running anywhere.
This commit is contained in:
2026-08-16 14:10:28 +03:00
54 changed files with 1688 additions and 573 deletions
+6 -3
View File
@@ -11,6 +11,9 @@ param(
$ErrorActionPreference = "Stop"
$repo = $PSScriptRoot
# The one file that starts the application, whoever is asking: the Start Menu
# entry, the autostart entry and the dikte command all name it.
$entry = Join-Path $repo "dikte\__main__.py"
$startMenu = [Environment]::GetFolderPath("Programs")
$startup = [Environment]::GetFolderPath("Startup")
$shortcut = Join-Path $startMenu "Dikte.lnk"
@@ -55,7 +58,7 @@ $shell = New-Object -ComObject WScript.Shell
foreach ($path in @($shortcut) + $(if ($Autostart) { @($autostartLink) } else { @() })) {
$link = $shell.CreateShortcut($path)
$link.TargetPath = $pythonw
$link.Arguments = "`"$repo\dikte.py`" --gui"
$link.Arguments = "`"$entry`" --gui"
$link.WorkingDirectory = $repo
$link.Description = "Dikte: dictation"
$link.Save()
@@ -67,11 +70,11 @@ foreach ($path in @($shortcut) + $(if ($Autostart) { @($autostartLink) } else {
# the one the command line should run, whatever a later PATH change puts first.
$shimDir = Split-Path $cmdShim
if (Test-Path $shimDir) {
"@echo off`r`n`"$($python.Source)`" `"$repo\dikte.py`" %*" |
"@echo off`r`n`"$($python.Source)`" `"$entry`" %*" |
Out-File $cmdShim -Encoding ascii
Write-Host "command: dikte ($cmdShim)"
} else {
Write-Warning "No $shimDir on this machine, so there is no dikte command. Run it as: python `"$repo\dikte.py`""
Write-Warning "No $shimDir on this machine, so there is no dikte command. Run it as: python `"$entry`""
}
Write-Host ""