Repository navigation
installer: use modern innosetup features - #593
Conversation
rimrul
left a comment
There was a problem hiding this comment.
This is entirely untested, I just made sure it builds.
| end; | ||
|
|
||
| // Split NUL-delimited key/value pairs, extract LF that denotes end of key | ||
| StdOut:=StringJoin(#10,Output.StdOut); |
There was a problem hiding this comment.
We probably want to iterate over Output.StdOut directly instead of joining and re-splitting this, but that was the easiest Q&D way to at least get it to compile again.
There was a problem hiding this comment.
We do that now, but there's probably at least one off-by-one error in there.
0c4df92 to
8d18d60
Compare
| SourceDir={#SOURCE_DIR} | ||
| #if BITNESS=='64' || INSTALLER_FILENAME_SUFFIX=='arm64' | ||
| ArchitecturesInstallIn64BitMode=x64 arm64 | ||
| ArchitecturesInstallIn64BitMode=x64compatible arm64 |
There was a problem hiding this comment.
With the new x64compatible, there should be no need to explicitly set arm64 anymore:
x64compatible
Matches systems capable of running x64 binaries. This includes systems running x64 Windows, and also Arm64-based Windows 11 systems, which have the ability to run x64 binaries via emulation.
|
@rimrul with all the recent updates to the installer, there's some conflicts on this PR now. Do you have bandwidth to rebase it onto the latest main branch? Happy to help if not. |
|
Yeah, I should get around to it in the next few days. |
80488ef to
c10f085
Compare
| if (BuiltinFSMonitorStopOption='') then begin | ||
| BuiltinFSMonitorStopOption:='(huh?)'; | ||
| if not ExecWithCapture('"'+AppDir+'\cmd\git.exe" fsmonitor--daemon -h',Str,Str,ExitCode) or (ExitCode<>129) then begin | ||
| if not ExecAndCaptureOutput('"'+AppDir+'\cmd\git.exe"', 'fsmonitor--daemon -h', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ExitCode, Output) or (ExitCode<>129) then begin |
There was a problem hiding this comment.
I see that the deleted code assigned StartupInfo.wShowWindow:=SW_HIDE;, so I was a bit concerned about the SW_SHOWNORMAL here. But the documentation of ExecAndCaptureOutput() says:
Console programs are always hidden and the ShowCmd parameter only affects GUI programs, so always using SW_SHOWNORMAL instead of SW_HIDE is recommended.
So all is good. If at all, I would document that in the commit message. But I could live with it in the present shape, too.
Innosetup 6.4 introduced a new function ExecAndCaptureOutput that executes commands and captures there standard output and standard error streams. We've been using our own howmgrown solution called ExecWithCapture for this purpose, but it's a bit finicky. Switch to the official implementation. Note: While ExecAndCaptureOutput always executes console programs hidden, it does still expect a value for the ShowCmd parameter and the documentation recommends using SW_SHOWNORMAL. [1] [1] https://jrsoftware.org/ishelp/index.php?topic=isxfunc_execandcaptureoutput Signed-off-by: Matthias Aßhauer <mha1993@live.de>
c10f085 to
bc59ce3
Compare
Innosetup 6.4 introduced a New function ExecAndCaptureOutput that executes commands and captures there standard output and standard error streams. We've been using our own howmgrown solution called ExecWithCapture for this purpose, but it's a bit finicky. Switch to the official implementation.