@echo off
SET PROJECTDIR="C:\path\to\my\project"
cd %PROJECTDIR%
hg addremove --quiet
hg commit --quiet --message "Automatic commit from B4A compilation"
FOR /F "usebackq" %%i IN (`hg id -i`) DO SET HGID=%%i
fnr.exe --cl --dir %PROJECTDIR% --fileMask "main.b4a" --excludeFileMask "*.dll, *.exe" --useRegEx --find "(^.*VersionName):(.*)$" --replace "$1: %HGID%"