Main: Run executables from the temporary directory.
As of May 2020, MiKTeX does no longer support short filenames (aka 8.3 filenames), so if the path to the temporary directory contains short filenames, LaTeX compilation will fail. Unfortunately, in the current framework it seems to be impossible to obtain the full path with only long filenames easily.
Resolve this by launching a shell that changes into the temporary directory and then calls the executable from there.
Tested on:
- Windows 10 Pro (20H2), Thunderbird 78.10.1, MiKTeX 21.2
- Xubuntu 21.04, Thunderbird 78.8.1, TeX Live 2020
See #86 for a bit more elaboration on the problem.
Fixed a mistake (shell_process.exitValue -> exitValue) and some formatting details.
Some restructuring and reformatting to improve clarity. Program flow did not change.