diff --git a/CHANGELOG.md b/CHANGELOG.md index c8ef437b4..7381d1b7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ project adheres to [Semantic Versioning][SemVer]. - Binary release: Use new (GCC-11.2-based) version of build toolchain. - Binary release: Provide self-extracting installer for non-DEB/RPM systems. +### Fixed +- Windows: Don't fail to start up after reboot. + ## [1.8.2] - 2022-03-02 ### Changed - Use a (pseudo)random `secret` by default. diff --git a/scripts/make-release b/scripts/make-release index 9925c2bc3..f4ef7d14c 100755 --- a/scripts/make-release +++ b/scripts/make-release @@ -60,7 +60,8 @@ fi echo "$myself: Editing repository files ..." sed -i -e "s|^rel_vsn=.*|rel_vsn='$new_vsn'|" 'scripts/get-version' sed -i -e "s|$(echo "$old_vsn" | sed 's/\./\\./g')|$new_vsn|g" \ - 'README.md' 'INSTALL.md' 'doc/overview.edoc' 'windows/eturnal.iss' + 'README.md' 'INSTALL.md' 'doc/overview.edoc' \ + 'windows/eturnal.iss' 'windows/delay-start.cmd' sed -i -e "s|^rebar_vsn=.*|rebar_vsn='$rebar_vsn'|" \ 'scripts/make-source' 'scripts/make-binaries' sed -i -e "s|compare/$old_vsn|compare/$new_vsn|" \ @@ -73,7 +74,7 @@ sed -i -e "s|compare/$old_vsn|compare/$new_vsn|" \ echo "$myself: Committing result ..." git add 'rebar.config' 'CHANGELOG.md' 'README.md' 'INSTALL.md' \ 'doc/overview.edoc' 'scripts/get-version' 'scripts/make-source' \ - 'scripts/make-binaries' 'windows/eturnal.iss' + 'scripts/make-binaries' 'windows/eturnal.iss' 'windows/delay-start.cmd' git commit -m "Release $new_vsn" git -P show read -p "$myself: Does the commit look fine? (y/n) [n] " response diff --git a/windows/delay-start.cmd b/windows/delay-start.cmd new file mode 100644 index 000000000..fecd74546 --- /dev/null +++ b/windows/delay-start.cmd @@ -0,0 +1,9 @@ +@echo off +set rel_name="eturnal" +set rel_vsn="1.8.2" +setlocal enabledelayedexpansion +for /f "tokens=3" %%i in ('sc getkeyname %rel_name%_%rel_vsn%') do ( + set svc_name=%%i +) +sc config %svc_name% start= delayed-auto +endlocal diff --git a/windows/eturnal.iss b/windows/eturnal.iss index 495db38b4..391620b57 100644 --- a/windows/eturnal.iss +++ b/windows/eturnal.iss @@ -36,6 +36,7 @@ Name: {group}\Web Site; Filename: {app}\doc\eturnal.url [Run] Filename: {app}\bin\eturnal.cmd; Parameters: install; WorkingDir: {app}; Flags: runhidden Filename: {app}\bin\eturnal.cmd; Parameters: start; WorkingDir: {app}; Flags: runhidden +Filename: {app}\bin\delay-start.cmd; Flags: runhidden [UninstallRun] Filename: {app}\bin\eturnal.cmd; Parameters: stop; WorkingDir: {app}; Flags: runhidden; RunOnceId: StopService