summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2008-02-27 13:20:03 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2008-02-27 13:20:03 +0000
commiteebe94bbe54820089c464b5d6066c1daafd310f0 (patch)
tree64c5c245c46a055d926fcd57f9a5325a5dbb31c5
parentae5203eae70be946b22636f96cbdb714c4c72cf6 (diff)
TLWinGoo, wingoo-demo: further post-install registry fixes
git-svn-id: svn://tug.org/texlive/trunk@6763 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/TeXLive/TLWinGoo.pm2
-rw-r--r--Master/tlpkg/doc/wingoo-demo.pl70
2 files changed, 23 insertions, 49 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm
index 3f6cd3be3d4..95e41aa4ef8 100644
--- a/Master/tlpkg/TeXLive/TLWinGoo.pm
+++ b/Master/tlpkg/TeXLive/TLWinGoo.pm
@@ -694,8 +694,6 @@ sub update_assocs() {
} else {
tllog ($::LOG_DDEBUG, "No update_fu\n");
}
- system( "RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True" )
- unless admin();
}
=pod
diff --git a/Master/tlpkg/doc/wingoo-demo.pl b/Master/tlpkg/doc/wingoo-demo.pl
index c4be2193b3a..112d2bc1e69 100644
--- a/Master/tlpkg/doc/wingoo-demo.pl
+++ b/Master/tlpkg/doc/wingoo-demo.pl
@@ -40,7 +40,7 @@ use TeXLive::TLWinGoo qw(
&win_which_dir
&global_tmpdir
&add_texbindir_to_path
- &remove_texbindir_from_path
+ &remove_texbindirs_from_path
&register_script_type
&unregister_script_type
&broadcast_env
@@ -67,7 +67,8 @@ sub create_file {
my $name = shift;
return if -e $name;
open DUMMY, ">".$name;
- print DUMMY "print(tostring(0.0000001))"; # lua: 1e-7; texlua: 0
+ print DUMMY 's = tostring(0.0000001)'; # lua: 1e-7; texlua: 0
+ print DUMMY ('print("0.0000001 becomes " .. s)');
close DUMMY;
}
@@ -91,45 +92,16 @@ sub print_assoc_cmd {
my $ext = shift;
my $cmdout = `assoc $ext`;
chomp $cmdout if $cmdout;
- if (!$cmdout) { print "Extension unknown\n"; return; }
+ if (!$cmdout) { print "Extension unknown says assoc\n"; return; }
my $ftype = $cmdout;
$ftype =~ s/.*=//;
- if (!$ftype) { print "Extension unknown\n"; return; }
+ if (!$ftype) { print "Extension unknown says assoc\n"; return; }
$cmdout = `ftype $ftype`;
- if (!$cmdout) { print "Filetype unknown\n"; return; }
+ if (!$cmdout) { print "Filetype unknown says ftype\n"; return; }
$cmdout =~ s/.*=//;
print( $ext.' command is: '.$cmdout."\n" );
}
-sub print_config {
- # system- and user settings for path, pathext
- # and [HKCU|HKLM]\software\classes settings for e.g .rb
- my $key;
- my $val;
-
- print_search_paths();
-
- foreach $key (get_system_env(), get_user_env()) {
- print ("Path: ".($key ->{'/path'})."\n");
- print ("Expanded path: ".expand_string($key ->{'/path'})."\n");
- print ("Pathext: ".($key->{'pathext'})."\n");
- }
-
- print_lua_out();
-
- foreach $key ("LMachine/software/classes", "CUser/software/classes",
- "Classes") {
- print "Key: " . $key . "\n";
-
- # system: lua; user: texlua
- $val = $Win32::TieRegistry::Registry -> {$key."/.texlua//"};
- print "Texlua filetype: ".$val."\n";
- print "TeXlua open command: " .
- $Win32::TieRegistry::Registry -> {$key."/".$val."/Shell/Open/Command/"} .
- "\n";
- }
-}
-
sub pause {
my $mess = shift;
print( $mess."\nType any key..." );
@@ -198,7 +170,7 @@ while (1) { # running this first as admin (if possible) and then as non-admin
# adding and removing texbindir
- print( "\ntexbindir on searchpath\n" );
+ print( "\ntexbindir on searchpath:\n" );
my $wr_dir1 = $wr_dir . "/tex1";
mkdir $wr_dir1 unless -e $wr_dir1;
create_file( $wr_dir1."/tex.exe" );
@@ -215,8 +187,11 @@ while (1) { # running this first as admin (if possible) and then as non-admin
print_search_paths();
print "tex.exe found in " . win_which_dir("tex.exe") . "\n";
- remove_texbindir_from_path( $wr_dir2 );
print( "Mopping up...\n" );
+ remove_texbindirs_from_path();
+ rmdir $wr_dir1 if unlink $wr_dir1.'/tex.exe';
+ rmdir $wr_dir2 if unlink $wr_dir2.'/tex.exe';
+ print( "Dummy texs removed from path\n");
print_search_paths();
# adding a filetype
@@ -242,7 +217,7 @@ while (1) { # running this first as admin (if possible) and then as non-admin
# broadcast environment changes
broadcast_env();
- pause( "Check environment in new dosbox\n\n" );
+ pause( maybenot(admin())." admin; check environment in new dosbox\n\n" );
if (admin()) {
non_admin();
@@ -262,21 +237,22 @@ while (1) { # running this first as admin (if possible) and then as non-admin
}
print( "Cannot remove tex from system searchpath\n" );
print_search_paths();
- print "tex.exe found in " . win_which_dir("tex.exe") . "\n";
+ print "Wrong tex.exe found in " . win_which_dir("tex.exe") . "\n";
unlink $fn;
- remove_texbindir_from_path( $wr_dir2 );
+ remove_texbindirs_from_path();
+ rmdir $wr_dir2 if unlink $wr_dir2.'/tex.exe';
# broadcast environment changes
broadcast_env();
- pause( "Check environment in new dosbox" );
+ pause( "Non-admin: check environment in new dosbox" );
if (!admin()) { last; }
}
-if ($real_admin) {
- admin_again();
- unregister_script_type(".texlua");
- update_assocs();
- broadcast_env();
- print_assoc_cmd( '.texlua' );
-}
+
+admin_again() if $real_admin;
+unregister_script_type(".texlua");
+update_assocs();
+broadcast_env();
+print_assoc_cmd( '.texlua' );
+