I notice that nsi is now Unicode. It seems that this breaks portable GPG/Enigmail.
It does not work anymore for me.
Also, is it possible to include my previous suggestion?
Here it is:
It seems there is a bug with enigmail.
I have a path for portable TB like: D:\nxxxxx\....
According to my understanding, when portable TB starts, portable GPG sets the correct path in prefs.js for gpg.exe. But the path is not correct: it is something like D:\name\\.... There is only one \ after the D:. In the case of \n, it is interpreted as a CR by TB and gpg is not found. If I have another letter instead of n, it works well.
I have solved the problem by modifying ThunderbirdPortable.nsi by replacing:
FileWrite $0 `user_pref("extensions.enigmail.agentPath", "$GPGPATHDIRECTORY\gpg.exe");`
with
${StrReplace} '$1' '\' '\\' '$GPGPATHDIRECTORY\gpg.exe'
FileWrite $0 `user_pref("extensions.enigmail.agentPath", '$1') ;`
with StrReplace from http://nsis.sourceforge.net/StrRep
(so, add "!include StrReplace.nsh" in Custom section).