<br><br><div class="gmail_quote">On Mon, Aug 1, 2011 at 12:54 PM, Brad Anderson <span dir="ltr"><<a href="mailto:eco@gnuk.net">eco@gnuk.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I can make a pull request. I do think we should do what we can to have the person that rolls the release (Walter?) use the special build though. That way nearly everyone can benefit from the convenient PATH update in the installer.  We programmers tend to have very large PATH variables and it'd be unfortunate if many D users received an error message whenever they installed and were forced to update their PATH manually (although that's clearly an improvement over the current situation).<div>
<div></div><div class="h5"></div></div></blockquote><div><br></div><div>Pull request made.  I have not tested it as I'm not familiar with the dmd build process and don't have time at the moment to figure it out. I can test some other day if necessary.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5"> </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="h5">
<br><div class="gmail_quote">On Mon, Aug 1, 2011 at 12:35 PM, Ary Manzana <span dir="ltr"><<a href="mailto:ary@esperanto.org.ar" target="_blank">ary@esperanto.org.ar</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div></div><div>On 8/1/11 2:58 PM, Brad Anderson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The NSIS script used to update the environment<br>
variable (EnvVarUpdate) has the following warning [1]:<br>
<br>
"Warning this code will replace paths rather than append if the existing<br>
path exceeds the maximum string length in the NSIS build you are using.<br>
Some setup crash can also occurs."<br>
<br>
The default maximum string length is 1024.  There is a special build of<br>
NSIS [2] which has a larger maximum string length (8192) that would help<br>
avoid this problem.  There is also a patch [1] for EnvVarUpdate that<br>
detects if the PATH will be overwritten instead of appended to and tells<br>
the user to update their PATH manually.<br>
<br>
I've seen this issue complained about before online but<br>
hadn't experienced it myself until recently.  It can be a rather<br>
frustrating problem to experience as restoring your PATH isn't trivial<br>
because there is no way (that I know of) to look at what your PATH was<br>
before it was destroyed and the PATH is often updated by installers (as<br>
it is with dmd).<br>
<br>
[1]<br>
<a href="http://nsis.sourceforge.net/Environmental_Variables:_append,_prepend,_and_remove_entries#Warning" target="_blank">http://nsis.sourceforge.net/<u></u>Environmental_Variables:_<u></u>append,_prepend,_and_remove_<u></u>entries#Warning</a><br>


[2] <a href="http://nsis.sourceforge.net/Special_Builds" target="_blank">http://nsis.sourceforge.net/<u></u>Special_Builds</a><br>
<br>
Regards,<br>
Brad Anderson<br>
</blockquote>
<br></div></div>
Hi Brad,<br>
<br>
IIRC I wrote the installer and I knew about the problem too because some people started complaining about it but I didn't know of the solution (maybe at that moment the solution was not known). So good you found it :-)<br>


<br>
What we can do is to copy this patched EnvVarUpdate function to the installer script and use it, I think it'll be much more safe than to just hope the system that runs the nsis script has the patched function or the special build.<br>


<br>
What do you think? Could you make that change and do a pull request? (I don't have a Windows machine near me anymore nor a VM).<br>
</blockquote></div><br>
</div></div></blockquote></div><br>