diff options
author | Norbert Preining <preining@logic.at> | 2008-01-07 16:08:20 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-01-07 16:08:20 +0000 |
commit | e3face621a254828522d60b62be8b333e0151d4a (patch) | |
tree | a7fd7a99cd0201c1a598664476d0ac7a7f2a3ab2 /Master/install-tl.pl | |
parent | 0e795d273678029d2254a3f42712d92afe90082e (diff) |
start on windows registry black magic
git-svn-id: svn://tug.org/texlive/trunk@6122 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl.pl')
-rwxr-xr-x | Master/install-tl.pl | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl index b94225745ca..fccee377bf2 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -192,6 +192,11 @@ calc_depends(); prepare_installation(); do_install_packages(); do_postinst_stuff(); + +if (win32()) { + do_win_registry_magic(); +} + dump_vars("$system_tmpdir/texlive.vars"); # if we installed from a profile we don't need to write it out if (-r "$vars{'TEXDIR'}/$InfraLocation/texlive.profile") { @@ -660,6 +665,36 @@ sub do_texmf_cnf { close(TMF); } +# register texlua handlers etc etc +sub do_win_registry_magic { + # we are called under if (win32()) !! + if ($vars{'win-admin'}) { + # generate a .texlua association and link it to texlua.exe, which should + # be in the path! + my $classes = $Registry->Open( "Classes/", {Access=>KEY_ALL_ACCESS,Delimiter=>"/"}); + $classes->CreateKey(".texlua")->SetValue("","script.texlua"); + my $scriptkey = $classes->CreateKey("script.texlua"); + $scriptkey->SetValue("", "TeXLua Script"); + $scriptkey->CreateKey("Shell/Open/Command/")->SetValue("","texlua.exe %1"); + + # PATHEXT editing + # should this be currentcontrolset or ControlSet001 ???? + my $winenv = $Registry->Open( "LMachine/SYSTEM/ControlSet001/Control/Session Manager/Environment/", {Access=>KEY_ALL_ACCESS,Delimiter=>"/"}); + my $pathext = $winenv->GetValue("PATHEXT"); + my $found = 0; + foreach (split(/;/,$pathext)) { + $found = 1 if (m/\.texlua/i); + } + if (!$found) { + $winenv->SetValue("PATHEXT","$pathext;.texlua"); + } + + # add the win32 dir to the PATH + warn "Missing: extend PATH to include TEXDIR/bin/win32\n"; + } else { + warn "Don't know what to do if a non admin user installs texlive on win32\n!; + } +} __END__ ### Local Variables: |