[FR] shotcut.exe - Add resource.syso manifest

Hi,

I’ve got a build script to make a MSI package for group policy deployment of Shotcut. The script normally detects the productVersion from the application’s exe file which does work for most applications. But NOT for shotcut.exe because there is no resource manifest.

Taking the shotcut.exe of the most recent release 20.07.11, Windows Explorer shows:

image

Analyzing with PowerShell or filever.exe, no manifest data is found on the exe.

If executed on command line, it shows a popup dialog with the current version number. This cannot be piped and consumed in a batch script.

shotcut.exe --version

I’d suggest the devs add a valid Windows EXE manifest to the main executable “shotcut.exe” to make version distinguishing more easy.

Meanwhilst, I’ve found an ugly and coincident working work-around with batch and powershell to extract the current version of the shotcut.exe:

Requires “psreplace.cmd”

@echo off
REM 
SET TMP_PSR_SEARCH=%1
IF DEFINED TMP_PSR_SEARCH SET "TMP_PSR_SEARCH=%TMP_PSR_SEARCH:"=%"
IF DEFINED TMP_PSR_SEARCH SET "TMP_PSR_SEARCH=%TMP_PSR_SEARCH:`=""%"
REM 
SET TMP_PSR_REPLACE=%2
IF DEFINED TMP_PSR_REPLACE SET "TMP_PSR_REPLACE=%TMP_PSR_REPLACE:"=%"
IF DEFINED TMP_PSR_REPLACE SET "TMP_PSR_REPLACE=%TMP_PSR_REPLACE:`=\"%"
REM 
SET TMP_PSR_TARGET_FULLFN=%3
IF NOT DEFINED TMP_PSR_TARGET_FULLFN powershell -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "Write-Host -NoNewLine ((($Input | Out-String) -Replace '%TMP_PSR_SEARCH%', '%TMP_PSR_REPLACE%') -Replace '§n', \"`n\" -Replace '§r', \"`r\")" 2> NUL: & goto :eof
REM
powershell -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "Set-Content -Path '%3' -NoNewLine -Value ((($Input | Out-String) -Replace '%TMP_PSR_SEARCH%', '%TMP_PSR_REPLACE%') -Replace '§n', \"`n\" -Replace '§r', \"`r\")"
REM 
goto :eof

Version detection batch:

for /f "tokens=2 delims=#" %%A in ('TYPE SourceDir\shotcut.exe 2^>NUL: ^| psreplace "Shotcut version \0([0-9]{2}\.[0-9]{2}\.[0-9]{2})\0" "_VERSION#$1#VERSION_" ^| find "_VERSION#"') do SET PRODUCT_EXE_PRODUCTVERSION=%%A

will set PRODUCT_EXE_PRODUCTVERSION to

20.07.11

Thanks for the good work on Shotcut! It’s an amazing tool.

Kind regards