[tex-live] TL in portable mode on Windows

Siep Kroonenberg siepo at cybercomm.nl
Sun Dec 21 12:16:17 CET 2008

On Sat, Dec 20, 2008 at 05:55:45PM +0000, T T wrote:
> I'm trying to figure out a way to prepare a portable installation of TL2008
> and I'm having some trouble with this. I know that TL2008 can be run live
> from DVD and it even comes with a batch launcher for that purpose, which is
> really welcome, but it's a whooping 2.5GB with kitchen sink included, so I'm
> looking for a slimmer solution.
> Let me first explain what I'm trying to achieve and then I'll describe some
> of the issues I encountered in my poking around so far.
> I want to find a way to turn TL into fully functional (i.e. with working
> tlmgr, etc.) portable distribution that (optionally) integrates with
> PortableApps. By finding a way I mean a procedure that could be easily
> followed by a boarder range of users (read: all those windoze illiterates
> out there) so it shouldn't be too arcane. Preferably, this procedure should
> allow for a full or at least partial automation of the process, so it can be
> canned for regular users.
> I have a fairly good idea how this could be done but there seem to be some
> limitations in the current installer and I don't know how to get around
> them.
> The first problem is that there seems to be no way to make administrative
> installation on Windows (i.e. without any system integration, like shortcuts
> or uninstaller). Is that right?

The installer doesn't offer this option. However, you can copy an
installed TeX Live directory elsewhere and run it by just prepending
TeX to the path and defining some environment variables.  The path
and the environment variables could be done by some variation of
tl-portable.bat. Since no files need to be generated, the Perl
invocation can be skipped.

> Next, upon installation, TL breaks any other TeX installation on the system
> by removing it from the path. Although this is documented (
> http://www.tug.org/texlive/windows.html) I still consider it a bug to
> interfere with other software on the system without explicit user consent.
> It's essentially as bad as changing file associations without asking (not
> that uncommon on Windows, I'm afraid). Furthermore, during uninstallation
> the original path is not restored and user has to fix it manually.

This is a limitation of TeX. Some components may work when invoked
with an absolute path, but in general the TeX binaries should be on
the searchpath. Restoring the original path is pointless because
there is no way of knowing what has happened to the path in the
meantime.  Simply prepending TeX would have been more conservative,
but has drawbacks of its own.

tl-portable gets around this by only changing the searchpath inside
the shell that it starts up.

> tl-portable.bat could be useful not only for launching TL shell but also
> other tools, e.g. text editor or compilation script. Unfortunately, in its
> current form this not possible. I would suggest the following modification

What would be the point? You can run these editors and scripts from
within the TL shell. Since we are talking about writable media, you
can create customized copies of tl-portable.bat all you want.

My advice:

- install TeX Live to some temporary location
- copy the installation to a pendrive
- uninstall TeX Live
- re-add MikTeX to the searchpath. I think that is enough to restore
- modify tl-portable.bat to skip the Perl code and not to change
- optional: create variations to this batchfile for starting editors

But I am not quite sure whether package management would work in
such an installation.

I think a script to create a portable pendrive installation from an
existing installation might be useful.  However, offering too many
options at installation time would make it hard to explain and would
do more harm than good.

As to UNC paths: you are right that in most situations UNC paths
don't work.

The UNC comment, the directory change and the final exit have been
removed from tl-portable.bat.

Siep Kroonenberg

More information about the tex-live mailing list