NAME

TeXLive::TLWinGoo -- TeX Live Windows-specific support

SYNOPSIS

use TeXLive::TLWinGoo;

DIAGNOSTICS

TeXLive::TLWinGoo::admin;
TeXLive::TLWinGoo::non_admin;
TeXLive::TLWinGoo::reg_country;

ENVIRONMENT AND REGISTRY

TeXLive::TLWinGoo::expand_string($s);
TeXLive::TLWinGoo::get_system_path;
TeXLive::TLWinGoo::get_user_path;
TeXLive::TLWinGoo::setenv_reg($env_var, $env_data);
TeXLive::TLWinGoo::unsetenv_reg($env_var);
TeXLive::TLWinGoo::adjust_reg_path_for_texlive($action, $texbindir, $mode);
TeXLive::TLWinGoo::add_to_progids($ext, $filetype);
TeXLive::TLWinGoo::remove_from_progids($ext, $filetype);
TeXLive::TLWinGoo::register_extension($mode, $extension, $file_type);
TeXLive::TLWinGoo::unregister_extension($mode, $extension);
TeXLive::TLWinGoo::register_file_type($file_type, $command);
TeXLive::TLWinGoo::unregister_file_type($file_type);

ACTIVATING CHANGES IMMEDIATELY

TeXLive::TLWinGoo::broadcast_env;
TeXLive::TLWinGoo::update_assocs;

SHORTCUTS

TeXLive::TLWinGoo::desktop_path;
TeXLive::TLWinGoo::add_desktop_shortcut($texdir, $name, $icon,
  $prog, $args, $batgui);
TeXLive::TLWinGoo::add_menu_shortcut($place, $name, $icon,
  $prog, $args, $batgui);
TeXLive::TLWinGoo::remove_desktop_shortcut($name);
TeXLive::TLWinGoo::remove_menu_shortcut($place, $name);

UNINSTALLER

TeXLive::TLWinGoo::create_uninstaller;
TeXLive::TLWinGoo::unregister_uninstaller;

ADMIN: MAKE INSTALLATION DIRECTORIES READ-ONLY

TeXLive::TLWinGoo::maybe_make_ro($dir);

All exported functions return forward slashes.

DESCRIPTION

DIAGNOSTICS

admin

Returns admin status, admin implying having full read-write access to the system environment.

non_admin

Pretend not to have admin privileges, to enforce a user- rather than a system install.

Currently only used for testing.

reg_country

Two-letter country code representing the locale of the current user

ENVIRONMENT AND REGISTRY

Most settings can be made for a user and for the system. User settings override system settings.

For admin users, the functions below affect both user- and system settings. For non-admin users, only user settings are changed.

An exception is the search path: the effective searchpath consists of the system searchpath in front concatenated with the user searchpath at the back.

Note that in a roaming profile network setup, users take only user settings with them to other systems, not system settings. In this case, with a TeXLive on the network, a nonadmin install makes the most sense.

expand_string($s)

This function replaces substrings %env_var% with their current values as environment variable and returns the result.

get_system_path

Returns unexpanded system path, as stored in the registry.

get_user_path

Returns unexpanded user path, as stored in the registry. The user path often does not exist, and is rarely expandable.

setenv_reg($env_var, $env_data[, $mode]);

Set an environment variable $env_var to $env_data.

$mode="user": set for current user. $mode="system": set for all users. Default: both if admin, current user otherwise.

unsetenv_reg($env_var[, $mode]);

Unset an environment variable $env_var

tex_dirs_on_path($path)

Returns tex directories found on the search path. A directory is a TeX directory if it contains tex.exe or pdftex.exe.

adjust_reg_path_for_texlive($action, $tlbindir, $mode)

Edit system or user PATH variable in the registry. Adds or removes (depending on $action) $tlbindir directory to system or user PATH variable in the registry (depending on $mode).

add_to_progids($ext, $filetype)

Add $filetype to the list of alternate progids/filetypes of extension $ext. The associated program shows up in the `open with' right-click menu.

remove_from_progids($ext, $filetype)

Remove $filetype from the list of alternate filetypes for $ext

register_extension($mode, $extension, $file_type)

Add registry entry to associate $extension with $file_type. Slashes are flipped where necessary.

If $mode is 0, nothing is actually done.

For $mode 1, the filetype for the extension is preserved, but only if there is a registry key under Classes for it. For $mode>0, the new filetype is always added to the openwithprogids list.

For $mode 2, the filetype is always overwritten. The old filetype moves to the openwithprogids list if necessary.

unregister_extension($mode, $extension, $file_type)

Reversal of register_extension.

register_file_type($file_type, $command)

Add registry entries to associate $file_type with $command. Slashes are flipped where necessary. Double quotes should be added by the caller if necessary.

unregister_file_type($file_type)

Reversal of register_file_type.

ACTIVATING CHANGES IMMEDIATELY

broadcast_env

Broadcasts system message that enviroment has changed. This only has an effect on newly-started programs, not on running programs or the processes they spawn.

update_assocs

Notifies the system that filetypes have changed.

SHORTCUTS

add_shortcut($dir, $name, $icon, $prog, $args, $batgui)

Add a shortcut, with name $name and icon $icon, pointing to program $prog with parameters $args (a string). Use a non-null batgui parameter if the shortcut starts a gui program via a batchfile. Then the inevitable command prompt will be hidden rightaway, leaving only the gui program visible.

add_desktop_shortcut($name, $icon, $prog, $args, $batgui)

Add a shortcut on the desktop.

add_menu_shortcut($place, $name, $icon, $prog, $args, $batgui)

Add a menu shortcut at place $place, relative to Start/Programs.

remove_desktop_shortcut($name)

For uninstallation of an individual package.

remove_menu_shortcut($place, $name)

For uninstallation of an individual package.

UNINSTALLER

create_uninstaller

Writes registry entries for add/remove programs which reference the uninstaller script and creates uninstaller batchfiles to finish the job.

unregister_uninstaller

Removes TeXLive from Add/Remove Programs.

ADMIN

TeXLive::TLWinGoo::maybe_make_ro($dir)

Write-protects a directory $dir recursively, using ACLs, but only if we are a multi-user install, and only if $dir is on an NTFS-formatted local fixed disk, and only on Windows Vista and later. It writes a log message what it does and why.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 210:

'=item' outside of any '=over'