scythe/packaging/windows/scythe-standalone.nsi
oiupoyt 96dcfc1a17
Some checks are pending
Release & Packaging / Build Linux Packages (.tar.gz, .deb, .rpm, .AppImage) (push) Waiting to run
Release & Packaging / Build Windows Binaries (.exe) (push) Waiting to run
Release & Packaging / Publish GitHub Release (push) Blocked by required conditions
fix(windows): overhaul Windows capture, encoding fallback, overlay translucency, installer DLL locking, and CI packaging
2026-09-08 17:26:39 +05:30

31 lines
1.2 KiB
NSIS

!include "FileFunc.nsh"
!include "LogicLib.nsh"
Name "Scythe"
OutFile "..\..\dist\scythe.exe"
Caption "Scythe Screen Recorder"
SilentInstall silent
RequestExecutionLevel user
Section
; Terminate any running instances so locked executables and DLLs can be updated cleanly
nsExec::Exec 'cmd.exe /C taskkill /F /IM scythe-ui.exe /T >nul 2>&1'
nsExec::Exec 'cmd.exe /C taskkill /F /IM scythe-daemon.exe /T >nul 2>&1'
nsExec::Exec 'cmd.exe /C taskkill /F /IM vrec-ui.exe /T >nul 2>&1'
nsExec::Exec 'cmd.exe /C taskkill /F /IM vrec-daemon.exe /T >nul 2>&1'
nsExec::Exec 'powershell -NoProfile -NonInteractive -Command "Get-Process -Name scythe-ui, scythe-daemon, vrec-ui, vrec-daemon -ErrorAction SilentlyContinue | Stop-Process -Force"'
Sleep 1500
SetOverwrite try
; Extract self-contained binaries and all runtime DLLs directly to user app data
SetOutPath "$LOCALAPPDATA\scythe"
File /r "..\..\dist\bundle\*.*"
; Execute scythe-ui with any forwarded command-line arguments, or default to overlay menu
${GetParameters} $R0
${If} $R0 == ""
Exec '"$LOCALAPPDATA\scythe\scythe-ui.exe" --menu'
${Else}
Exec '"$LOCALAPPDATA\scythe\scythe-ui.exe" $R0'
${EndIf}
SectionEnd