diff --git a/development/Win32/packaging/installer/download.nsh b/development/Win32/packaging/installer/download.nsh index d9641f4a8b..7e269145e3 100644 --- a/development/Win32/packaging/installer/download.nsh +++ b/development/Win32/packaging/installer/download.nsh @@ -155,15 +155,16 @@ !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 3" "Text" "${DownloadLabel}" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 4" "Text" "${HomeLabel}" + ${if} ${ExePath} == "" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 3" "State" "1" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 4" "State" "0" - !insertmacro MUI_INSTALLOPTIONS_READ $0 "ioDownload.ini" "Field 5" "Flags" - !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 5" "Flags" $0|DISABLED + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 5" "Flags" PATH_MUST_EXIST|DISABLED !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 5" "State" "" ${else} !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 3" "State" "0" !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 4" "State" "1" + !insertmacro MUI_INSTALLOPTIONS_WRITE "ioDownload.ini" "Field 5" "Flags" PATH_MUST_EXIST ${StrRep} "${ExePath}" "${ExePath}" "${RemoveFromPath}" "" StrCpy ${ExePath} "${ExePath}${AddtoPath}" diff --git a/development/Win32/packaging/installer/ioDownload.ini b/development/Win32/packaging/installer/ioDownload.ini index e5e3ddb0f1..3d568e93c2 100644 --- a/development/Win32/packaging/installer/ioDownload.ini +++ b/development/Win32/packaging/installer/ioDownload.ini @@ -39,4 +39,3 @@ Left=5 Right=-1 Top=47 Bottom=58 -Flags=PATH_MUST_EXIST \ No newline at end of file diff --git a/development/Win32/packaging/installer/lyx_path_prefix.C b/development/Win32/packaging/installer/lyx_path_prefix.C index 601818600b..5255183b6a 100644 --- a/development/Win32/packaging/installer/lyx_path_prefix.C +++ b/development/Win32/packaging/installer/lyx_path_prefix.C @@ -290,7 +290,9 @@ void __declspec(dllexport) run_configure(HWND hwndParent, int string_size, char return; } - std::string const command = std::string("start /WAIT /B sh.exe ") + configure_file; + // Even "start /WAIT /B sh.exe configure" returns + // before the script is done, so just invoke "sh" directly. + std::string const command = std::string("sh.exe ") + configure_file; if (system(command.c_str()) != 0) { pushstring("-1"); return;