summaryrefslogtreecommitdiff
path: root/Master/tlpkg/etc/2009.combined.patch
blob: 6a588c3f50c33a54fb486f98bd33292b997b2fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
Index: texmf/scripts/texlive/tlmgr.pl
===================================================================
--- texmf/scripts/texlive/tlmgr.pl	(revision 12142)
+++ texmf/scripts/texlive/tlmgr.pl	(working copy)
@@ -557,6 +557,9 @@
       info("running post remove action for $pkg\n");
       &{$PostRemove{$pkg}}($localtlpdb->root);
     }
+    #
+    # Run the post installation code in the postaction tlpsrc entries
+    &TeXLive::TLUtils::do_postaction_code("remove", $tlp);
   }
   return \%ret;
 }
Index: texmf/scripts/texlive/uninstall-win32.pl
===================================================================
--- texmf/scripts/texlive/uninstall-win32.pl	(revision 12142)
+++ texmf/scripts/texlive/uninstall-win32.pl	(working copy)
@@ -17,6 +17,11 @@
 }
 
 use TeXLive::TLWinGoo;
+use TeXLive::TLPDB;
+use TeXLive::TLPOBJ;
+use TeXLive::TLPostActions;
+use TeXLive::TLConfig;
+use TeXLive::TLUtils;
 use Tk;
 use Tk::Dialog;
 
@@ -39,6 +44,23 @@
 $cancel->pack(-side => 'left' , -padx => "3m");
 
 sub doit {
+  # first we remove the whole bunch of shortcuts and menu entries
+  # by calling all the post action codes for the installed packages
+  my $localtlpdb = TeXLive::TLPDB->new ("root" => $Master);
+  if (!defined($localtlpdb)) {
+    tlwarn("Cannot load the TLPDB from $Master, are you sure there is an installation?\n");
+  } else {
+    for my $pkg ($localtlpdb->list_packages) {
+      if (defined($PostRemove{$pkg})) {
+        info("running post remove action for $pkg\n");
+        &{$PostRemove{$pkg}}($Master);
+      }
+    }
+    &TeXLive::TLUtils::do_postaction_code("remove", $pkg);
+  }
+  my $menupath = &TeXLive::TLWinGoo::menu_path();
+  $menupath =~ s!/!\\!g;
+  `rmdir /s /q "$menupath\\$TeXLive::TLConfig::WindowsMainMenuName" 2>nul`;
   remove_texbindirs_from_path();
   unsetenv_reg("TEXBINDIR");
   # from_dvd case:
Index: install-tl
===================================================================
--- install-tl	(revision 12142)
+++ install-tl	(working copy)
@@ -82,7 +82,6 @@
     &add_menu_shortcut
     &remove_desktop_shortcut
     &remove_menu_shortcut
-    &init_unshortbat
     &create_uninstaller
   ));
 }
@@ -1052,6 +1051,11 @@
   # post install actions
   #
 
+  # in case we are running from DVD we use the tlpdb from the DVD, otherwise
+  # the one we have locally created, for all the further actions
+  my $usedtlpdb = $vars{'from_dvd'} ? $tlpdb : $localtlpdb;
+
+
   if (win32()) {
     debug "Actual environment:\n".`set`."\n\n";
     debug 'Effective TEXMFCNF: '.`kpsewhich -expand-path=\$TEXMFCNF`."\n";
@@ -1060,15 +1064,24 @@
   # (re-)initialize batchfile for uninstalling shortcuts
   if (win32() and !$opt_portable) {
     mkdirhier("$TEXDIRW/tlpkg/installer") if $vars{'from_dvd'};
-    init_unshortbat($TEXDIRW);
   }
 
+  # Run the post installation code in TLPostAction.pm
   foreach my $package (sort keys %install) {
     if ($install{$package} && defined($PostInstall{$package})) {
       info("running post install action for $package\n");
       &{$PostInstall{$package}}($TEXDIR, $TEXDIRW, $TEXMFSYSVAR, $TEXMFLOCAL);
     }
   }
+  # Run the post installation code in the postaction tlpsrc entries
+  foreach my $package (sort keys %install) {
+    if ($install{$package}) {
+      &TeXLive::TLUtils::do_postaction_code("install", 
+                                            $usedtlpdb->get_package($package));
+    }
+  }
+  info ("finished with package specific postactions\n");
+
   # $opt_portable: no %install but we still want xetex postinstall
   &{$PostInstall{'xetex'}}($TEXDIR, $TEXDIRW, $TEXMFSYSVAR, $TEXMFLOCAL)
     if $opt_portable;
@@ -1085,25 +1098,25 @@
   # texconfig generate * but Win32 does not have texconfig. But we have
   # $localtlpdb and this is simple code, so do it directly, i.e., duplicate
   # the code from the various generate-*.pl scripts
+
   info("writing fmtutil.cnf data to $TEXMFSYSVAR/web2c/fmtutil.cnf\n");
-  my $tlp = $vars{'from_dvd'} ? $tlpdb : $localtlpdb;
-  TeXLive::TLUtils::create_fmtutil($tlp, #$localtlpdb,
+  TeXLive::TLUtils::create_fmtutil($usedtlpdb,
     "$TEXMFSYSVAR/web2c/fmtutil.cnf",
     "$TEXMFLOCAL/web2c/fmtutil-local.cnf");
 
   mkdirhier "$vars{'TEXMFSYSCONFIG'}/web2c";
   info("writing updmap.cfg to $TEXMFSYSCONFIG/web2c/updmap.cfg\n");
-  TeXLive::TLUtils::create_updmap ($tlp, #$localtlpdb,
+  TeXLive::TLUtils::create_updmap ($usedtlpdb,
     "$TEXMFSYSCONFIG/web2c/updmap.cfg",
     "$TEXMFLOCAL/web2c/updmap-local.cfg");
 
   info("writing language.dat data to $TEXMFSYSVAR/tex/generic/config/language.dat\n");
-  TeXLive::TLUtils::create_language_dat($tlp, #$localtlpdb,
+  TeXLive::TLUtils::create_language_dat($usedtlpdb,
     "$TEXMFSYSVAR/tex/generic/config/language.dat",
     "$TEXMFLOCAL/tex/generic/config/language-local.dat");
 
   info("writing language.def data to $TEXMFSYSVAR/tex/generic/config/language.def\n");
-  TeXLive::TLUtils::create_language_def($tlp, #$localtlpdb,
+  TeXLive::TLUtils::create_language_def($usedtlpdb,
     "$TEXMFSYSVAR/tex/generic/config/language.def",
     "$TEXMFLOCAL/tex/generic/config/language-local.def");
 
Index: tlpkg/TeXLive/TLPDB.pm
===================================================================
--- tlpkg/TeXLive/TLPDB.pm	(revision 12142)
+++ tlpkg/TeXLive/TLPDB.pm	(working copy)
@@ -1239,26 +1239,64 @@
 =cut
 sub fmtutil_cnf_lines {
   my $self = shift;
-  my %fmtcnffiles;
-  foreach my $p ($self->list_packages) {
-    my $obj = $self->get_package ($p);
-    die "$0: No TeX Live package named $p, strange" if ! $obj;
+  my @fmtlines = ();
+  
+  foreach my $pkg ($self->list_packages) {
+    my $obj = $self->get_package ($pkg);
+    die "No TeX Live package named $pkg, too strange" if ! $obj;
+    my $first = 1;
     foreach my $e ($obj->executes) {
-      if ($e =~ m/BuildFormat (.*)$/) {
-        $fmtcnffiles{$1} = 1;
-      } 
-      # others are ignored here
+      if ($e =~ m/AddFormat\s+(.*)\s*/) {
+        my $name;
+        my $engine;
+        my $patterns = "-";
+        my $options = "";
+        my $mode = "";
+        if ($first) {
+          push @fmtlines, "# from $pkg:\n";
+          $first = 0;
+        }
+        foreach my $p (&TeXLive::TLUtils::quotewords('\s+', 0, "$1")) {
+        # foreach my $p (split(' ', $1)) {
+          my ($a, $b);
+          if ($p =~ m/^(name|engine|mode|patterns|options)=(.*)$/) {
+            $a = $1;
+            $b = $2;
+          } else {
+            die "Unknown format directive in $pkg: $e";
+          }
+          if ($a eq "name") { 
+            die "AddFormat line needs name=something: $pkg, $e" unless $b;
+            $name = $b; next; 
+          }
+          if ($a eq "engine") { 
+            die "AddFormat line needs engine=something: $pkg, $e" unless $b;
+            $engine = $b; next;
+          }
+          if ($a eq "patterns") { 
+            $patterns = ( $b ? $b : "-");
+            next; 
+          }
+          if ($a eq "mode") { 
+            if ($b eq "disabled") {
+              $mode = "#! ";
+            } else {
+              $mode = "";
+            }
+            next; 
+          }
+          if ($a eq "options") { 
+            $options = ( $b ? $b : "");
+            next;
+          }
+          # should not be reached at all
+          die "Unknown language directive in $pkg: $e";
+        }
+        push @fmtlines, "$mode$name $engine $patterns $options\n";
+      }
     }
   }
-  my @formatlines;
-  foreach my $f (sort keys %fmtcnffiles) {
-    open(INFILE,"<$self->{'root'}/texmf/fmtutil/format.$f.cnf")
-      or tlwarn("Cannot open $self->{'root'}/texmf/fmtutil/format.$f.cnf\nThe generated fmtutil.cnf file might be incomplete.\nError: $!\n");
-    @tmp = <INFILE>;
-    close(INFILE);
-    push @formatlines, @tmp;
-  }
-  return(@formatlines);
+  return @fmtlines;
 }
 
 =item C<< $tlpdb->updmap_cfg_lines >>
Index: tlpkg/TeXLive/TLConfig.pm
===================================================================
--- tlpkg/TeXLive/TLConfig.pm	(revision 12142)
+++ tlpkg/TeXLive/TLConfig.pm	(working copy)
@@ -28,6 +28,7 @@
     $WinSpecialUpdatePackagesRegexp
     @CriticalPackagesList
     @AllowedConfigOptions
+    $WindowsMainMenuName
   );
   @EXPORT = @EXPORT_OK;
 }
@@ -82,6 +83,8 @@
   autobackup
   /;
 
+our $WindowsMainMenuName = "TeX Live 2008";
+
 1;
 
 
Index: tlpkg/TeXLive/TLPostActions.pm
===================================================================
--- tlpkg/TeXLive/TLPostActions.pm	(revision 12142)
+++ tlpkg/TeXLive/TLPostActions.pm	(working copy)
@@ -20,48 +20,13 @@
 use TeXLive::TLUtils qw(win32 mkdirhier copy conv_to_w32_path log debug info
                         touch tlwarn);
 use TeXLive::TLWinGoo;
+use TeXLive::TLConfig;
 
-my $mainmenu = "TeX Live 2008";
+my $mainmenu = $TeXLive::TLConfig::WindowsMainMenuName;
 
 our %PostInstall;
 our %PostRemove;
 
-# NOT ENABLED !!!!!
-# context post install actions
-sub do_install_bin_context {
-  my ($texdir, $texdirw, $texmfsysvar) = @_;
-  # set up texmfcnf.lua
-  my $TMF = "$texdirw/texmf/web2c/texmfcnf.lua";
-  if (! -r $TMF) {
-    open(TMF, ">$TMF") || die "open($TMF) failed: $!\n";
-    print TMF 'local conf = {}', "\n";
-    print TMF "conf.TEXMFCACHE = \"$texmfsysvar\"\n";
-    #print TMP "conf.CACHEINTDS = 't'\n";
-    print TMF "return conf\n";
-    close(TMF) || warn "close($TMF) failed: $!";
-  }
-  # update the luatools cache
-  system("luatools", "--generate");
-  # build the context formats based on luatex
-  system("context", "--make", "--compile", "cont-en");
-  # update the font cache
-  system("mtxrun", "--script", "fonts", "--reload");
-}
-#
-# That has to be sorted out and maybe changed at a later time, so do NOT
-# enable that for now.
-###$PostInstall{"bin-context"} = \&do_install_bin_context;
-
-
-# ATM do the same for luatex as for context
-sub do_install_luatex {
-  do_install_bin_context(@_);
-}
-#
-# SEE ABOVE
-# $PostInstall{"luatex"} = \&do_install_luatex;
-
-
 # xetex
 #
 sub do_install_xetex {
@@ -149,136 +114,13 @@
 }
 $PostInstall{"xetex"} = \&do_install_xetex;
 
-#
-# bin-dviout.win32
-#
-sub do_install_bin_dviout_win32 {
-  my ($texdir, $texdirw) = @_;
-  if (win32()) {
-    my $texdir_bsl = conv_to_w32_path($texdir);
-    add_menu_shortcut(
-      $mainmenu,
-      'DVIOUT Dvi Viewer',
-      $texdir.'/tlpkg/dviout/dviout.exe', # for the icon
-      'wscript',
-      $texdir_bsl."\\bin\\win32\\dviout.vbs",
-      '',
-    );
-  }
-}
-sub do_remove_bin_dviout_win32 {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu, 'DVIOUT Dvi Viewer');
-  }
-}
-$PostInstall{'bin-dviout.win32'} = \&do_install_bin_dviout_win32;
-$PostRemove{'bin-dviout.win32'} = \&do_remove_bin_dviout_win32;
 
-
 #
-# bin-texdoc
-#
-sub do_install_bin_texdoc {
-  my ($texdir, $texdirw) = @_;
-  if (win32()) {
-    #add_desktop_shortcut(
-    #  $texdirw,
-    #  'TeXdoc GUI',
-    #  '', # $vars{'TEXDIR'}.'/tlpkg/doc/notes.ico', # the icon
-    #  $texdir.'/bin/win32/texdoctk.bat',
-    #  '', # no args
-    #  'batgui', # any non-null value to hide command-prompt
-    #);
-    add_menu_shortcut(
-      $mainmenu,
-      'TeXdoc GUI',
-      '', # $vars{'TEXDIR'}.'/tlpkg/doc/notes.ico', # the icon
-      $texdir.'/bin/win32/texdoctk.bat',
-      '', # no args
-      'batgui', # any non-null value to hide command-prompt
-    );
-  }
-}
-sub do_remove_bin_texdoc {
-  my ($texdir) = @_;
-  if (win32()) {
-    # remove_desktop_shortcut('TeXdoc GUI');
-    remove_menu_shortcut($mainmenu, 'TeXdoc GUI');
-  }
-}
-$PostInstall{'bin-texdoc'} = \&do_install_bin_texdoc;
-$PostRemove{'bin-texdoc'} = \&do_remove_bin_texdoc;
-
-#
-# bin-tlpsv.win32
-#
-sub do_install_bin_tlpsv_win32 {
-  my ($texdir, $texdirw) = @_;
-  if (win32()) {
-    add_desktop_shortcut(
-      $texdirw,
-      'PS_View',
-      $texdir.'/tlpkg/tlpsv/psv.exe', # icon, not prog!
-      $texdir.'/bin/win32/psv.bat',
-      '', # no args
-      'batgui', # any non-null value to hide command-prompt
-    );
-    add_menu_shortcut(
-      $mainmenu,
-      'PS_View',
-      $texdir.'/tlpkg/tlpsv/psv.exe', # icon, not prog!
-      $texdir.'/bin/win32/psv.bat',
-      '', # no args
-      'batgui', # any non-null value to hide command-prompt
-    );
-    #register_extension(".ps", "PostScript");
-    #register_extension(".eps", "PostScript");
-    ##register_file_type("PostScript", '"'.$texdir.'/bin/win32/psv.bat"');
-    #register_file_type("PostScript",
-    #  '"'.$texdir.'/tlpkg/tlpsv/gswxlua.exe" -g '.
-    #  '"'.$texdir.'/tlpkg/tlgs/bin/gsdll32.dll" -l '.
-    #  '"'.$texdir.'/tlpkg/tlpsv/psv.wx.lua" -p '.
-    #  '"'.$texdir.'/tlpkg/tlpsv/psv_view.ps" -sINPUT="%1"');
-    #update_assocs();
-  }
-}
-sub do_remove_bin_tlpsv_win32 {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_desktop_shortcut('PS_View');
-    remove_menu_shortcut($mainmenu, 'PS_View');
-    #unregister_extension(".ps");
-    #unregister_extension(".eps");
-    #unregister_file_type("PostScript");
-    #update_assocs();
-  }
-}
-$PostRemove{'bin-tlpsv.win32'} = \&do_remove_bin_tlpsv_win32;
-$PostInstall{'bin-tlpsv.win32'} = \&do_install_bin_tlpsv_win32;
-
-#
 # bin-texlive
 #
 sub do_install_bin_texlive {
   my ($texdir, $texdirw) = @_;
   if (win32()) {
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manager',
-      '', # $texdir.'/tlpkg/doc/dummy.ico',
-      $texdir.'/bin/win32/tlmgr.bat',
-      'gui',
-      'batgui',
-    );
-    add_menu_shortcut(
-      $mainmenu,
-      'Release notes',
-      '',
-      'http://tug.org/texlive/windows.html',
-      '',
-      '',
-    );
     if (uc(TeXLive::TLWinGoo::win_which_dir('tex.exe')) ne
           uc($texdir.'/bin/win32') or
         uc(TeXLive::TLWinGoo::win_which_dir('pdftex.exe')) ne
@@ -296,7 +138,6 @@
        '',
       );
       add_desktop_shortcut(
-        $texdirw,
         'TeX Live Prompt',
         '',
         $ENV{'COMSPEC'},
@@ -309,8 +150,6 @@
 sub do_remove_bin_texlive {
   my ($texdir) = @_;
   if (win32()) {
-    remove_menu_shortcut($mainmenu, 'TeX Live Manager');
-    remove_menu_shortcut($mainmenu, 'Release notes');
     remove_menu_shortcut($mainmenu, 'TeX Live Prompt');
     remove_desktop_shortcut('TeX Live Prompt');
   }
@@ -318,431 +157,6 @@
 $PostInstall{'bin-texlive'} = \&do_install_bin_texlive;
 $PostRemove{'bin-texlive'} = \&do_remove_bin_texlive;
 
-#
-# texlive.infra
-# ships all the readme.html/readme.XX.html files, and the index of all
-# documents
-sub do_install_texlive_infra {
-  my ($texdir) = @_;
-  if (win32()) {
-    if (!defined($texdir)) {
-      tlwarn("do_install_texlive_infra: texdir not defined, returning\n");
-      return;
-    }
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Toplevel Readme Index',
-      '', # default pdf icon
-      $texdir.'/index.html',
-      '',
-      '',
-    );
-  }
-}
-sub do_remove_texlive_infra {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu,'TeX Live Toplevel Readme Index');
-  }
-}
-$PostInstall{'texlive.infra'} = \&do_install_texlive_infra;
-$PostRemove{'texlive.infra'} = \&do_remove_texlive_infra;
-
-#
-# texlive-en
-#
-sub do_install_texlive_en {
-  my ($texdir) = @_;
-  if (win32()) {
-    if (!defined($texdir)) {
-      tlwarn("do_install_texlive_en: texdir not defined, returning\n");
-      return;
-    }
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (en) (HTML)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/english/texlive-en/texlive-en.html',
-      '',
-      '',
-    );
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (en) (PDF)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/english/texlive-en/texlive-en.pdf',
-      '',
-      '',
-    );
-  }
-}
-sub do_remove_texlive_en {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (en) (HTML)');
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (en) (PDF)');
-  }
-}
-$PostInstall{'texlive-en'} = \&do_install_texlive_en;
-$PostRemove{'texlive-en'} = \&do_remove_texlive_en;
-
-#
-# texlive-cz
-#
-sub do_install_texlive_cz {
-  my ($texdir) = @_;
-  if (win32()) {
-    if (!defined($texdir)) {
-      tlwarn("do_install_texlive_cz: texdir not defined, returning\n");
-      return;
-    }
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (cz) (PDF)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/czechslovak/texlive-cz/texlive-cz.pdf',
-      '',
-      '',
-    );
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (cz) (HTML)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/czechslovak/texlive-cz/texlive-cz.html',
-      '',
-      '',
-    );
-  }
-}
-sub do_remove_texlive_cz {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (cz) (PDF)');
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (cz) (HTML)');
-  }
-}
-$PostInstall{'texlive-cz'} = \&do_install_texlive_cz;
-$PostRemove{'texlive-cz'} = \&do_remove_texlive_cz;
-
-#
-# texlive-fr
-#
-sub do_install_texlive_fr {
-  my ($texdir) = @_;
-  if (win32()) {
-    if (!defined($texdir)) {
-      tlwarn("do_install_texlive_fr: texdir not defined, returning\n");
-      return;
-    }
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (fr) (PDF)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/french/texlive-fr/texlive-fr.pdf',
-      '',
-      '',
-    );
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (fr) (HTML)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/french/texlive-fr/texlive-fr.html',
-      '',
-      '',
-    );
-  }
-}
-sub do_remove_texlive_fr {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (fr) (HTML)');
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (fr) (PDF)');
-  }
-}
-$PostInstall{'texlive-fr'} = \&do_install_texlive_fr;
-$PostRemove{'texlive-fr'} = \&do_remove_texlive_fr;
-
-#
-# texlive-de
-#
-sub do_install_texlive_de {
-  my ($texdir) = @_;
-  if (win32()) {
-    if (!defined($texdir)) {
-      tlwarn("do_install_texlive_de: texdir not defined, returning\n");
-      return;
-    }
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (de) (PDF)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/german/texlive-de/texlive-de.pdf',
-      '',
-      '',
-    );
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (de) (HTML)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/german/texlive-de/texlive-de.html',
-      '',
-      '',
-    );
-  }
-}
-sub do_remove_texlive_de {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (de) (PDF)');
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (de) (HTML)');
-  }
-}
-$PostInstall{'texlive-de'} = \&do_install_texlive_de;
-$PostRemove{'texlive-de'} = \&do_remove_texlive_de;
-
-#
-# texlive-pl
-#
-sub do_install_texlive_pl {
-  my ($texdir) = @_;
-  if (win32()) {
-    if (!defined($texdir)) {
-      tlwarn("do_install_texlive_pl: texdir not defined, returning\n");
-      return;
-    }
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (pl) (PDF)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/polish/texlive-pl/texlive-pl.pdf',
-      '',
-      '',
-    );
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (pl) (HTML)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/polish/texlive-pl/texlive-pl.html',
-      '',
-      '',
-    );
-  }
-}
-sub do_remove_texlive_pl {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (pl) (PDF)');
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (pl) (HTML)');
-  }
-}
-$PostInstall{'texlive-pl'} = \&do_install_texlive_pl;
-$PostRemove{'texlive-pl'} = \&do_remove_texlive_pl;
-
-#
-# texlive-ru
-#
-sub do_install_texlive_ru {
-  my ($texdir) = @_;
-  if (win32()) {
-    if (!defined($texdir)) {
-      tlwarn("do_install_texlive_ru: texdir not defined, returning\n");
-      return;
-    }
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (ru) (PDF)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/russian/texlive-ru/texlive-ru.pdf',
-      '',
-      '',
-    );
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (ru) (HTML)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/russian/texlive-ru/texlive-ru.html',
-      '',
-      '',
-    );
-  }
-}
-sub do_remove_texlive_ru {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (ru) (HTML)');
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (ru) (PDF)');
-  }
-}
-$PostInstall{'texlive-ru'} = \&do_install_texlive_ru;
-$PostRemove{'texlive-ru'} = \&do_remove_texlive_ru;
-
-#
-# texlive-zh-cn
-#
-sub do_install_texlive_zh_cn {
-  my ($texdir) = @_;
-  if (win32()) {
-    if (!defined($texdir)) {
-      tlwarn("do_install_texlive_zh_cn: texdir not defined, returning\n");
-      return;
-    }
-    add_menu_shortcut(
-      $mainmenu,
-      'TeX Live Manual (zh-cn)',
-      '', # default pdf icon
-      $texdir.'/texmf-doc/doc/chinese/texlive-zh-cn/texlive-zh-cn.pdf',
-      '',
-      '',
-    );
-  }
-}
-sub do_remove_texlive_zh_cn {
-  my ($texdir) = @_;
-  if (win32()) {
-    remove_menu_shortcut($mainmenu,'TeX Live Manual (zh-cn)');
-  }
-}
-$PostInstall{'texlive-zh-cn'} = \&do_install_texlive_zh_cn;
-$PostRemove{'texlive-zh-cn'} = \&do_remove_texlive_zh_cn;
-
-
-#
-# FROM HERE ON ONLY DISABLED POST INSTALL AND REMOVE ACTIONS!!!!!!!
-#
-
-# disabled
-sub do_bin_xdvi {
-  my ($TEXDIR, $TEXMFSYSVAR) = @_;
-  if (!defined($TEXMFSYSVAR)) {
-    $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`;
-    chomp($TEXMFSYSVAR);
-  }
-  copy ("$TEXDIR/texmf/xdvi/XDvi", "$TEXMFSYSVAR/xdvi");
-}
-# $PostInstall{"bin-xdvi"} = \&do_bin_xdvi;
-
-
-# disabled
-sub do_plain {
-  my ($TEXDIR, $TEXMFSYSVAR) = @_;
-  if (!defined($TEXMFSYSVAR)) {
-    $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`;
-    chomp($TEXMFSYSVAR);
-  }
-  # install some copies from texmf(-dist) into texmf-var
-  copy ("$TEXDIR/texmf-dist/tex/generic/config/language.def",
-        "$TEXMFSYSVAR/tex/generic/config");
-}
-# $PostInstall{"plain"} = \&do_plain;
-
-
-# disabled
-sub do_bin_dvipsk {
-  my ($TEXDIR, $TEXMFSYSVAR) = @_;
-  if (!defined($TEXMFSYSVAR)) {
-    $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`;
-    chomp($TEXMFSYSVAR);
-  }
-  # those files must exist
-  copy ("$TEXDIR/texmf/dvips/config/config.ps",
-        "$TEXMFSYSVAR/dvips/config");
-}
-# $PostInstall{"bin-dvipsk"} = \&do_bin_dvipsk;
-
-# disabled
-sub do_bin_dvipdfm {
-  my ($TEXDIR, $TEXMFSYSVAR) = @_;
-  if (!defined($TEXMFSYSVAR)) {
-    $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`;
-    chomp($TEXMFSYSVAR);
-  }
-  # fix up dvipdfm config file to contain the right # piping command
-  mkdirhier("$TEXMFSYSVAR/dvipdfm/config");
-  open(DVIPDFMCONFIGDIST, "<$TEXDIR/texmf/dvipdfm/config/config")
-    or die("Cannot open $TEXDIR/texmf/dvipdfm/config/config");
-  open(DVIPDFMCONFIGINST, ">$TEXMFSYSVAR/dvipdfm/config/config")
-    or die("Cannot open $TEXMFSYSVAR/dvipdfm/config/config");
-  while (<DVIPDFMCONFIGDIST>) {
-    if (m/^D /) {
-      print DVIPDFMCONFIGINST 'D "epstopdf --outfile=%o --nocompress %i"', "\n";
-    } else {
-      print DVIPDFMCONFIGINST;
-    }
-  }
-  close(DVIPDFMCONFIGDIST);
-  close(DVIPDFMCONFIGINST);
-}
-# $PostInstall{"bin-dvipdfm"} = \&do_bin_dvipdfm;
-
-# disabled
-sub do_bin_dvipdfmx {
-  my ($TEXDIR, $TEXMFSYSVAR) = @_;
-  if (!defined($TEXMFSYSVAR)) {
-    $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`;
-    chomp($TEXMFSYSVAR);
-  }
-  # dvipdfmx.cfg
-  open(DVIPDFMCONFIGDIST, "<$TEXDIR/texmf/dvipdfmx/dvipdfmx.cfg")
-    or die("Cannot open $TEXDIR/texmf/dvipdfmx/dvipdfmx.cfg");
-  open(DVIPDFMCONFIGINST, ">$TEXMFSYSVAR/dvipdfmx/dvipdfmx.cfg")
-    or die("Cannot open $TEXMFSYSVAR/dvipdfmx/dvipdfmx.cfg");
-  while (<DVIPDFMCONFIGDIST>) {
-    # current dvipdfmx.cfg already contains the right rungs incantation
-    # so do just copy the file to texmf-var
-    #if (m/^D /) {
-    #  print DVIPDFMCONFIGINST "%$_";
-    #  print DVIPDFMCONFIGINST "\n%% GhostScript (TeX Live (Unix and Win32)):\n";
-    #  print DVIPDFMCONFIGINST 'D  "rungs -q -dNOPAUSE -dBATCH -sPAPERSIZE=a0 -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dUseFlateCompression=true -sOutputFile=%o %i -c quit"', "\n\n";
-    #} else {
-      print DVIPDFMCONFIGINST;
-    #}
-  }
-  close(DVIPDFMCONFIGDIST);
-  close(DVIPDFMCONFIGINST);
-}
-# $PostInstall{"bin-dvipdfmx"} = \&do_bin_dvipdfmx;
-
-
-# disabled
-sub do_bin_kpathsea {
-  my ($TEXDIR, $TEXMFSYSVAR) = @_;
-  if (!defined($TEXMFSYSVAR)) {
-    $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`;
-    chomp($TEXMFSYSVAR);
-  }
-  copy ("$TEXDIR/texmf/web2c/mktex.cnf",
-        "$TEXMFSYSVAR/web2c");
-}
-# $PostInstall{"bin-kpathsea"} = \&do_bin_kpathsea;
-
-# disabled
-sub do_bin_pdftex {
-  my ($TEXDIR, $TEXMFSYSVAR) = @_;
-  if (!defined($TEXMFSYSVAR)) {
-    $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`;
-    chomp($TEXMFSYSVAR);
-  }
-  # the old installer copied from CDDIR, but shouldn't this be installed
-  # in ANY case since it is in bin-pdftex???
-  copy ("$TEXDIR/texmf/tex/generic/config/pdftexconfig.tex",
-        "$TEXMFSYSVAR/tex/generic/config");
-}
-# $PostInstall{"bin-pdftex"} = \&do_bin_pdftex;
-
-# disabled
-sub do_context {
-  my ($TEXDIR, $TEXMFSYSVAR) = @_;
-  if (!defined($TEXMFSYSVAR)) {
-    $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`;
-    chomp($TEXMFSYSVAR);
-  }
-  # old installer did this, should we do this, TOO????
-  copy ("$TEXDIR/texmf-dist/tex/context/config/cont-usr.tex",
-        "$TEXMFSYSVAR/tex/context/config");
-}
-# $PostInstall{"context"} = \&do_context;
-
-
 1;
 
 
Index: tlpkg/TeXLive/TLPSRC.pm
===================================================================
--- tlpkg/TeXLive/TLPSRC.pm	(revision 12142)
+++ tlpkg/TeXLive/TLPSRC.pm	(working copy)
@@ -30,6 +30,7 @@
     srcpatterns => $params{'srcpatterns'},
     docpatterns => $params{'docpatterns'},
     binpatterns => $params{'binpatterns'},
+    postactions => $params{'postactions'},
     executes    => defined($params{'executes'}) ? $params{'executes'} : [],
     depends     => defined($params{'depends'}) ? $params{'depends'} : [],
   };
@@ -67,6 +68,7 @@
   my $catalogue = "";
   my (@executes, @depends);
   my (@runpatterns, @docpatterns, @binpatterns, @srcpatterns);
+  my (@postactions);
   my $started = 0;
   my $finished = 0;
   my $savedline = "";
@@ -132,6 +134,9 @@
       } elsif ($line =~ /^depend\s+(.*)\s*$/) {
         push @depends, $1 if ($1 ne "");
         next;
+      } elsif ($line =~ /^postaction\s+(.*)\s*$/) {
+        push @postactions, $1 if ($1 ne "");
+        next;
       } else {
         tlwarn("$srcfile:$.: unknown tlpsrc directive, please fix: $line\n");
       }
@@ -149,6 +154,7 @@
   $self->docpatterns(@docpatterns) if @docpatterns;
   $self->executes(@executes) if @executes;
   $self->depends(@depends) if @depends;
+  $self->postactions(@postactions) if @postactions;
 }
 
 
@@ -175,6 +181,11 @@
       print $fd "execute $_\n";
     }
   }
+  if (defined($self->{'postactions'})) {
+    foreach (@{$self->{'postactions'}}) {
+      print $fd "postaction $_\n";
+    }
+  }
   if (defined($self->{'srcpatterns'}) && (@{$self->{'srcpatterns'}})) {
     foreach (sort @{$self->{'srcpatterns'}}) {
       print $fd "srcpattern $_\n";
@@ -213,6 +224,7 @@
   $tlp->longdesc($self->{'longdesc'}) if (defined($self->{'longdesc'}));
   $tlp->catalogue($self->{'catalogue'}) if (defined($self->{'catalogue'}));
   $tlp->executes(@{$self->{'executes'}}) if (defined($self->{'executes'}));
+  $tlp->postactions(@{$self->{'postactions'}}) if (defined($self->{'postactions'}));
   $tlp->depends(@{$self->{'depends'}}) if (defined($self->{'depends'}));
   $tlp->revision(0);
   my $filemax;
@@ -540,6 +552,11 @@
   if (@_) { @{ $self->{'executes'} } = @_ }
   return @{ $self->{'executes'} };
 }
+sub postactions {
+  my $self = shift;
+  if (@_) { @{ $self->{'postactions'} } = @_ }
+  return @{ $self->{'postactions'} };
+}
 
 format multilineformat =
 longdesc ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
@@ -580,7 +597,7 @@
 
 where I<key> can be C<name>, C<category>, C<shortdesc>, C<longdesc>,
 C<catalogue>, C<runpattern>, C<srcpattern>, C<docpattern>, C<binpattern>,
-C<execute>, or C<depend>.
+C<execute>, C<postaction>, or C<depend>.
 
 Continuation lines are supported via a trailing backslash.  That is, if
 the C<.tlpsrc> file contains two physical lines like this:
@@ -737,12 +754,49 @@
 C<lefthyphenmin>, C<righthyphenmin> (both integers), and C<synonyms> (a
 comma-separated list of alias names for that hyphenation).
 
-=item C<execute BuildFormat> I<format>
+=item C<execute AddFormat name=I<fmt> engine=I<eng> [I<var>...]>
 
-build the format I<format>, as specified in the C<fmtutil.cnf> file.
+activates the format with name I<fmt> based on the engine I<eng>. The 
+additional variables I<var> are:
+C<mode> which can only be equal to C<disable> in which case the format
+will only be mentioned but disabled (prefixed with C<#!>;
+C<patterns> which gives the patterns file, if not present C<-> is used;
+C<options> which gives the additional options for the C<fmtutil.cnf> file.
 
 =back
 
+=item <postaction>
+
+gives a free from entry of post install and removal actions to be
+executed. The difference to the C<execute> statement is that 
+C<postaction> is concerned with system integration, i.e., adjusting
+things outside the installation directory, while C<execute> touches
+only things within the installation.
+
+Currently the following C<postaction>s are understood:
+
+=over 4
+
+=item C<postaction shortcut name=I<name> type=menu|desktop icon=I<path> cmd=I<cmd> args=I<args> hide=0|1>
+
+On W32 creates a shortcut either in the main TeX Live menu or on the
+desktop. Please see the documentation of TeXLive::TLWinGoo for details
+on the parameters.
+
+=item C<postaction filetype name=I<name> cmd=I<cmd>>
+
+On W32 associates the file type I<name> with the command I<cmd>.
+
+=item C<postaction fileassoc extension=I<.ext> filetype=I<name>>
+
+On W32 declares files with the extenstion I<.ext> of file type I<name>.
+
+=item C<postaction code I<arg>>
+
+TODO TODO I don't know how we want to do that
+
+=back
+
 =item C<(src|run|doc|bin)pattern> I<pattern>
 
 adds a pattern (next section) to the respective list of patterns.
Index: tlpkg/TeXLive/TLPOBJ.pm
===================================================================
--- tlpkg/TeXLive/TLPOBJ.pm	(revision 12142)
+++ tlpkg/TeXLive/TLPOBJ.pm	(working copy)
@@ -29,6 +29,7 @@
     docfiles    => defined($params{'docfiles'}) ? $params{'docfiles'} : [],
     docsize   => $params{'docsize'},
     executes    => defined($params{'executes'}) ? $params{'executes'} : [],
+    postactions => defined($params{'postactions'}) ? $params{'postactions'} : [],
     # note that binfiles is a HASH with keys of $arch!
     binfiles    => defined($params{'binfiles'}) ? $params{'binfiles'} : {},
     binsize     => defined($params{'binsize'}) ? $params{'binsize'} : {},
@@ -92,6 +93,7 @@
            ($lastcmd eq "docfiles") ||
            ($lastcmd eq "srcfiles") ||
            ($lastcmd eq "executes") ||
+           ($lastcmd eq "postaction") ||
            ($lastcmd eq "depend") ) {
         $line =~ s/^ /${lastcmd}continued /;
       } else {
@@ -216,6 +218,10 @@
         push @{$self->{'executes'}}, "$2" unless "$2" eq "";
         $lastcmd = "execute";
         next;
+      } elsif ($line =~ /^postaction(continued)?\s*(.*)\s*/o) {
+        push @{$self->{'postactions'}}, "$2" unless "$2" eq "";
+        $lastcmd = "postaction";
+        next;
       } elsif ($line =~ /^depend(continued)?\s*(.*)\s*/o) {
         push @{$self->{'depends'}}, "$2" unless "$2" eq "";
         $lastcmd = "depend";
@@ -316,6 +322,11 @@
       print $fd "execute $_\n";
     }
   }
+  if (defined($self->{'postactions'})) {
+    foreach (@{$self->{'postactions'}}) {
+      print $fd "postaction $_\n";
+    }
+  }
   if (defined($self->{'containersize'})) {
     print $fd "containersize $self->{'containersize'}\n";
   }
@@ -388,6 +399,11 @@
       print $fd "execute $_\n";
     }
   }
+  if (defined($self->{'postactions'})) {
+    foreach (@{$self->{'postactions'}}) {
+      print $fd "postaction $_\n";
+    }
+  }
   if (defined($self->{'docfiles'}) && (@{$self->{'docfiles'}})) {
     print $fd "docfiles\n";
     foreach (sort @{$self->{'docfiles'}}) {
@@ -837,7 +853,7 @@
       } else {
         push @maps, "disable $3";
       }
-    } elsif ($e =~ m/^BuildFormat\s+([^\s]+)\s*$/) {
+    } elsif ($e =~ m/^AddFormat\s+([^\s]+)\s*$/) {
       push @formats, $1;
     } elsif ($e =~ m/^AddHyphen\s+(.*)\s*$/) {
       push @dats, $1;
@@ -1026,6 +1042,11 @@
   if (@_) { $self->{'executes'} = [ @_ ] }
   return @{ $self->{'executes'} };
 }
+sub postactions {
+  my $self = shift;
+  if (@_) { $self->{'postactions'} = [ @_ ] }
+  return @{ $self->{'postactions'} };
+}
 sub containerdir {
   my @self = shift;
   if (@_) { $_containerdir = $_[0] }
Index: tlpkg/TeXLive/TLMedia.pm
===================================================================
--- tlpkg/TeXLive/TLMedia.pm	(revision 12142)
+++ tlpkg/TeXLive/TLMedia.pm	(working copy)
@@ -208,6 +208,9 @@
         info("running post install action for $pkg\n");
         &{$PostInstall{$pkg}}($totlpdb->root);
       }
+      #
+      # Run the post installation code in the postaction tlpsrc entries
+      &TeXLive::TLUtils::do_postaction_code("install", $tlpobj);
     }
     return \%ret;
   }
Index: tlpkg/TeXLive/TLUtils.pm
===================================================================
--- tlpkg/TeXLive/TLUtils.pm	(revision 12142)
+++ tlpkg/TeXLive/TLUtils.pm	(working copy)
@@ -56,6 +56,7 @@
   TeXLive::TLUtils::create_language_def($tlpdb,$dest,$localconf);
   TeXLive::TLUtils::install_packages($from_tlpdb,$media,$to_tlpdb,$what,$opt_src, $opt_doc)>);
   TeXLive::TLUtils::install_package($what, $filelistref, $target, $platform);
+  TeXLive::TLUtils::do_postaction_code($how, $tlpobj);
 
 =head2 Miscellaneous
 
@@ -1224,7 +1225,111 @@
   return 1;
 }
 
+=item C<do_postaction_code($how, $tlpobj)>
 
+Evaluates the C<postaction> code in the C<$tlpobj> 
+MISSING DOCUMENTATION TODO TODO
+
+Returns 1 on success, and 0 on failure.
+
+=cut
+
+sub do_postaction_code {
+  my ($how, $tlpobj) = @_;
+  my $ret = 1;
+  if (!defined($tlpobj)) {
+    tlwarn("do_postaction_code: didn't get a tlpobj\n");
+    return 0;
+  }
+  debug("running postaction $how code for " . $tlpobj->name . "\n")
+    if $tlpobj->postactions;
+  for my $pa ($tlpobj->postactions) {
+    if ($pa =~ m/^\s*shortcut\s+(.*)\s*$/) {
+      $ret &&= _do_postaction_shortcut($how, $tlpobj, $1);
+    } elsif ($pa =~ m/\s*filetype\s+(.*)\s*$/) {
+      $ret &&= _do_postaction_filetype($how, $tlpobj, $1);
+    } elsif ($pa =~ m/\s*fileassoc\s+(.*)\s*$/) {
+      $ret &&= _do_postaction_fileassoc($how, $tlpobj, $1);
+    } elsif ($pa =~ m/\s*code\s+(.*)\s*$/) {
+      $ret &&= _do_postaction_code($how, $tlpobj, $1);
+    } else {
+      tlwarn("do_postaction_code: don't know how to do $pa\n");
+      $ret = 0;
+    }
+  }
+  # nothing to do
+  return $ret;
+}
+
+sub _do_postaction_shortcut {
+  my ($how, $tlpobj, $pa) = @_;
+  return 1 unless win32();
+  my @words = quotewords('\s+', 0, "$pa");
+  my $type;
+  my $icon = '';
+  my $cmd = '';
+  my $args = '';
+  my $name;
+  my $hide = '0';
+  while (@words) {
+    $_ = shift @words;
+    if (/^type=(.*)$/) {
+      $type = $1;
+      if (($type ne "menu") && ($type ne "desktop")) {
+        tlwarn("type of shortcut postaction $type is unknown (menu, desktop)\n");
+        return 0;
+      }
+    } elsif (/^name=(.*)$/) {
+      $name = $1;
+    } elsif (/^icon=(.*)$/) {
+      $icon = $1;
+    } elsif (/^cmd=(.*)$/) {
+      $cmd = $1;
+    } elsif (/^args=(.*)$/) {
+      $args = $1;
+    } elsif (/^hide=(.*)$/) {
+      $hide = $1;
+      if (($hide ne "0") && ($hide ne "1")) {
+        tlwarn("hide of shortcut postaction $hide is unknown (0, 1)\n");
+        return 0;
+      }
+    } else {
+      tlwarn("Unknown tag for postaction shortcut $pa: $_\n");
+      return 0;
+    }
+  }
+  if ($how eq "install") {
+    my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`;
+    chomp($texdir);
+    my $texdir_bsl = conv_to_w32_path($texdir);
+    $icon =~ s!^TEXDIR/!$texdir/!;
+    $args =~ s!^TEXDIR/!$texdir/!;
+    $args = conv_to_w32_path($args);
+    if ($type eq "menu") {
+      add_menu_shortcut($TeXLive::TLConfig::WindowsMainMenuName, 
+                        $name, $icon, $cmd, $args, $hide);
+    } elsif ($type eq "desktop") {
+      add_desktop_shortcut($name, $icon, $cmd, $args, $hide);
+    } else {
+      tlwarn("Unknown type of shortcut: $type\n");
+      return 0;
+    }
+  } elsif ($how eq "remove") {
+    if ($type eq "menu") {
+      remove_menu_shortcut($TeXLive::TLConfig::WindowsMainMenuName, $name);
+    } elsif ($type eq "desktop") {
+      remove_desktop_shortcut($name);
+    } else {
+      tlwarn("Unknown type of shortcut: $type\n");
+      return 0;
+    }
+  } else {
+    tlwarn("Unknown mode $how\n");
+    return 0;
+  }
+  return 1;
+}
+
 =item C<untar($tarfile,$targetdir, $remove_tarfile)>
 
 Unpacked C<$tarfile> in C<$targetdir> (changing directories to
Index: tlpkg/TeXLive/TLWinGoo.pm
===================================================================
--- tlpkg/TeXLive/TLWinGoo.pm	(revision 12142)
+++ tlpkg/TeXLive/TLWinGoo.pm	(working copy)
@@ -58,7 +58,6 @@
     $prog, $args, $batgui);
   TeXLive::TLWinGoo::add_menu_shortcut($place, $name, $icon,
     $prog, $args, $batgui);
-  TeXLive::TLWinGoo::init_unshortbat($texdir);
   TeXLive::TLWinGoo::remove_desktop_shortcut($name);
   TeXLive::TLWinGoo::remove_menu_shortcut($place, $name);
 
@@ -104,7 +103,6 @@
     &add_menu_shortcut
     &remove_desktop_shortcut
     &remove_menu_shortcut
-    &init_unshortbat
     &create_uninstaller
     &unregister_uninstaller
   );
@@ -862,8 +860,7 @@
 
 =pod
 
-=item C<add_desktop_shortcut($texdir, $name, $icon,
-  $prog, $args, $batgui)>
+=item C<add_desktop_shortcut($name, $icon, $prog, $args, $batgui)>
 
 Add a desktop shortcut, with name $name and icon $icon, pointing to
 program $prog with parameters $args (a string).  Use a non-null
@@ -871,14 +868,10 @@
 batchfile. Then the inevitable command prompt will be hidden
 rightaway, leaving only the gui program visible.
 
-The parameter $texdir is merely used to locate the batchfile
-unshort.bat for uninstalling desktop shortcuts, which needs to be
-updated.
-
 =cut
 
 sub add_desktop_shortcut {
-  my ($texdir, $name, $icon, $prog, $args, $batgui) = @_;
+  my ($name, $icon, $prog, $args, $batgui) = @_;
 
   # create shortcut
   my ($shc, $shpath, $shfile);
@@ -889,15 +882,6 @@
   $shc->{'ShowCmd'} = $batgui ? SW_SHOWMINNOACTIVE : SW_SHOWNORMAL;
   $shfile = desktop_path().'/'.$name.'.lnk';
   $shc->Save($shfile);
-
-  # update batchfile for uninstalling shortcuts
-  if (open UNSHORT, ">>$texdir/tlpkg/installer/unshort.bat") {
-    $shfile =~ s!/!\\!g;
-    print UNSHORT 'del "'.$shfile."\" 2>nul\n";
-    close UNSHORT;
-  } else {
-    warn "Cannot open $texdir/tlpkg/installer/unshort.bat for appending: $!";
-  }
 }
 
 =pod
@@ -937,39 +921,16 @@
 
 =pod
 
-=item C<init_unshortbat($texdir)>
-
-Reinitialize unshort.bat, the shortcuts uninstaller.
-
-=cut
-
-sub init_unshortbat {
-  my $texdirw = shift;
-  my $menupath = menu_path();
-  $menupath =~ s!/!\\!g;
-
-  # batchfile for uninstalling shortcuts
-  if (open UNSHORT, ">$texdirw/tlpkg/installer/unshort.bat") {
-    print UNSHORT 'rmdir /s /q "'.$menupath."\\TeX Live 2008\" 2>nul\n";
-    close UNSHORT;
-  } else {
-    warn "Cannot create $texdirw/tlpkg/installer/unshort.bat: $!";
-  }
-}
-
-=pod
-
 =item C<remove_desktop_shortcut($name)>
 
-For uninstallation of an individual package. We leave unshort.bat
-alone because redundant entries are no big deal.
+For uninstallation of an individual package. 
 
 =cut
 
 sub remove_desktop_shortcut {
   my $name = shift;
   unlink desktop_path().'/'.$name.'.lnk';
-}
+} 
 
 =pod
 
@@ -1040,7 +1001,6 @@
 set PERL5LIB=
 \"$td\\tlpkg\\tlperl\\bin\\perl.exe\" \"$td\\texmf\\scripts\\texlive\\uninstall-win32.pl\"
 if errorlevel 1 exit
-call \"$tdw\\tlpkg\\installer\\unshort.bat\"
 copy \"$tdw\\tlpkg\\installer\\uninst2.bat\" \"\%TEMP\%\"
 rem pause
 \"\%TEMP\%\\uninst2.bat\"
Index: tlpkg/tlpsrc/bin-tex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-tex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-tex.tlpsrc	(working copy)
@@ -1,7 +1,6 @@
 name bin-tex
 category TLCore
 depend bin-kpathsea
-execute BuildFormat tex
-runpattern f texmf/fmtutil/format.tex.cnf
+execute AddFormat name=tex engine=tex options="tex.ini"
 docpattern f texmf/doc/man/man1/tex.*
 binpattern f bin/${ARCH}/tex
Index: tlpkg/tlpsrc/bin-mex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-mex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-mex.tlpsrc	(working copy)
@@ -2,10 +2,9 @@
 category TLCore
 depend pdftex
 depend bin-tex
-execute BuildFormat mex
-execute BuildFormat utf8mex
-runpattern f texmf/fmtutil/format.mex.cnf
-runpattern f texmf/fmtutil/format.utf8mex.cnf
+execute AddFormat name=mex engine=pdftex patterns=mexconf.tex options="-translate-file=cp227.tcx *mex.ini"
+execute AddFormat name=pdfmex engine=pdftex patterns=mexconf.tex options="-translate-file=cp227.tcx *pdfmex.ini"
+execute AddFormat name=utf8mex engine=pdftex patterns=mexconf.tex options="-enc *utf8mex.ini"
 binpattern f bin/${ARCH}/mex
 binpattern f bin/${ARCH}/pdfmex
 binpattern f bin/${ARCH}/utf8mex
Index: tlpkg/tlpsrc/texlive-de.tlpsrc
===================================================================
--- tlpkg/tlpsrc/texlive-de.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/texlive-de.tlpsrc	(working copy)
@@ -1,2 +1,4 @@
 name texlive-de
 category Documentation
+postaction shortcut type=menu name="TeX Live Manual (de) (PDF)" cmd=TEXDIR/texmf-doc/doc/german/texlive-de/texlive-de.pdf
+postaction shortcut type=menu name="TeX Live Manual (de) (HTML)" cmd=TEXDIR/texmf-doc/doc/german/texlive-de/texlive-de.html
Index: tlpkg/tlpsrc/pdftex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/pdftex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/pdftex.tlpsrc	(working copy)
@@ -1,8 +1,9 @@
 name pdftex
 category TLCore
 depend bin-kpathsea
-execute BuildFormat pdftex
-runpattern f texmf/fmtutil/format.pdftex.cnf
+execute AddFormat name=etex engine=pdftex patterns=language.def options="-translate-file=cp227.tcx *etex.ini"
+execute AddFormat name=pdfetex engine=pdftex patterns=language.def options="-translate-file=cp227.tcx *pdfetex.ini"
+execute AddFormat name=pdftex engine=pdftex patterns=language.def options="-translate-file=cp227.tcx *pdfetex.ini"
 runpattern f texmf/fonts/map/pdftex/updmap/*
 runpattern f texmf/tex/generic/config/pdftex*.tex
 runpattern f texmf/tex/generic/pdftex/*
Index: tlpkg/tlpsrc/bin-csplain.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-csplain.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-csplain.tlpsrc	(working copy)
@@ -1,7 +1,7 @@
 name bin-csplain
 category TLCore
 depend bin-tex
-execute BuildFormat csplain
-runpattern f texmf/fmtutil/format.csplain.cnf
+execute AddFormat name=csplain engine=pdftex options="-etex -translate-file=cp227.tcx csplain.ini"
+execute AddFormat name=pdfcsplain engine=pdftex options="-etex -translate-file=cp227.tcx csplain.ini"
 binpattern f bin/${ARCH}/csplain
 binpattern f bin/${ARCH}/pdfcsplain
Index: tlpkg/tlpsrc/bin-metapost.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-metapost.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-metapost.tlpsrc	(working copy)
@@ -1,8 +1,8 @@
 name bin-metapost
 category TLCore
 depend bin-kpathsea
-execute BuildFormat metapost
-runpattern f texmf/fmtutil/format.metapost.cnf
+execute AddFormat name=mpost engine=mpost options="-translate-file=cp227.tcx mpost.mp"
+execute AddFormat name=mfplain engine=mpost options="-translate-file=cp227.tcx mfplain.ini"
 docpattern f texmf/doc/man/man1/dmp.*
 docpattern f texmf/doc/man/man1/dvitomp.*
 docpattern f texmf/doc/man/man1/makempx.*
Index: tlpkg/tlpsrc/texlive-fr.tlpsrc
===================================================================
--- tlpkg/tlpsrc/texlive-fr.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/texlive-fr.tlpsrc	(working copy)
@@ -1,2 +1,4 @@
 name texlive-fr
 category Documentation
+postaction shortcut type=menu name="TeX Live Manual (fr) (PDF)" cmd=TEXDIR/texmf-doc/doc/french/texlive-fr/texlive-fr.pdf
+postaction shortcut type=menu name="TeX Live Manual (fr) (HTML)" cmd=TEXDIR/texmf-doc/doc/french/texlive-fr/texlive-fr.html
Index: tlpkg/tlpsrc/texlive-zh-cn.tlpsrc
===================================================================
--- tlpkg/tlpsrc/texlive-zh-cn.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/texlive-zh-cn.tlpsrc	(working copy)
@@ -1,2 +1,3 @@
 name texlive-zh-cn
 category Documentation
+postaction shortcut type=menu name="TeX Live Manual (zh-cn) (PDF)" cmd=TEXDIR/texmf-doc/doc/chinese/texlive-zh-cn/texlive-zh-cn.pdf
Index: tlpkg/tlpsrc/bin-dviout.win32.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-dviout.win32.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-dviout.win32.tlpsrc	(working copy)
@@ -2,3 +2,4 @@
 category TLCore
 binpattern d/win32 tlpkg/dviout
 binpattern f bin/win32/dviout.vbs
+postaction shortcut type=menu name="DVIOUT Dvi Viewer" cmd=wscript args=TEXDIR/bin/win32/dviout.vbs hide=1
Index: tlpkg/tlpsrc/bin-context.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-context.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-context.tlpsrc	(working copy)
@@ -1,9 +1,15 @@
 name bin-context
 category TLCore
 depend pdftex
-execute BuildFormat context
+execute AddFormat name=cont-en engine=pdftex patterns=cont-usr.tex options="-8bit *cont-en.ini"
+execute AddFormat name=cont-cz mode=disabled engine=pdftex patterns=cont-usr.tex options="-8bit *cont-cz.ini"
+execute AddFormat name=cont-de mode=disabled engine=pdftex patterns=cont-usr.tex options="-8bit *cont-de.ini"
+execute AddFormat name=cont-nl mode=disabled engine=pdftex patterns=cont-usr.tex options="-8bit *cont-nl.ini"
+execute AddFormat name=cont-uk mode=disabled engine=pdftex patterns=cont-usr.tex options="-8bit *cont-uk.ini"
+execute AddFormat name=cont-en engine=xetex patterns=cont-usr.tex options="-8bit *cont-en.ini"
+execute AddFormat name=mptopdf engine=pdftex options="-translate-file=cp227.tcx mptopdf.tex"
+execute AddFormat name=metafun engine=mpost options="-translate-file=cp227.tcx metafun.mp"
 runpattern f texmf-dist/tex/mptopdf/config/mptopdf.ini
-runpattern f texmf/fmtutil/format.context.cnf
 docpattern f texmf/doc/man/man1/ctxtools.*
 docpattern f texmf/doc/man/man1/makempy.*
 docpattern f texmf/doc/man/man1/mptopdf.*
Index: tlpkg/tlpsrc/bin-mltex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-mltex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-mltex.tlpsrc	(working copy)
@@ -1,7 +1,7 @@
 name bin-mltex
 category TLCore
 depend bin-latex
-execute BuildFormat mltex
-runpattern f texmf/fmtutil/format.mltex.cnf
+execute AddFormat name=mltex engine=pdftex options="-translate-file=cp227.tcx -mltex mltex.ini"
+execute AddFormat name=mllatex engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx -mltex mllatex.ini"
 binpattern f bin/${ARCH}/mllatex
 binpattern f bin/${ARCH}/mltex
Index: tlpkg/tlpsrc/luatex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/luatex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/luatex.tlpsrc	(working copy)
@@ -1,8 +1,8 @@
 name luatex
 category TLCore
-execute BuildFormat luatex
+execute AddFormat name=luatex engine=luatex options="luatex.ini"
+execute AddFormat name=pdfluatex engine=luatex options="pdfluatex.ini"
 docpattern d texmf-dist/doc/luatex
-runpattern f texmf/fmtutil/format.luatex.cnf
 binpattern f/!hppa-hpux bin/${ARCH}/luatex
 binpattern f/!hppa-hpux bin/${ARCH}/pdfluatex
 binpattern f/!hppa-hpux bin/${ARCH}/texlua
Index: tlpkg/tlpsrc/bin-cslatex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-cslatex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-cslatex.tlpsrc	(working copy)
@@ -1,7 +1,7 @@
 name bin-cslatex
 category TLCore
 depend bin-latex
-execute BuildFormat cslatex
-runpattern f texmf/fmtutil/format.cslatex.cnf
+execute AddFormat name=cslatex engine=pdftex options="-etex -translate-file=cp227.tcx cslatex.ini"
+execute AddFormat name=pdfcslatex engine=pdftex options="-etex -translate-file=cp227.tcx cslatex.ini"
 binpattern f bin/${ARCH}/cslatex
 binpattern f bin/${ARCH}/pdfcslatex
Index: tlpkg/tlpsrc/bin-texdoc.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-texdoc.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-texdoc.tlpsrc	(working copy)
@@ -12,3 +12,4 @@
 binpattern f bin/${ARCH}/texdoctk
 binpattern f bin/win32/texdocc
 binpattern f bin/win32/tl-w32-texdoc-wrapper.texlua
+postaction shortcut type=menu name="TeXdoc GUI" cmd="TEXDIR/bin/win32/texdoctk.bat" hide=1
Index: tlpkg/tlpsrc/bin-latex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-latex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-latex.tlpsrc	(working copy)
@@ -4,12 +4,14 @@
 depend pdftex
 depend latexconfig
 depend latex-fonts
-execute BuildFormat latex
+execute AddFormat name=latex engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *latex.ini"
+execute AddFormat name=pdflatex engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *pdflatex.ini"
+execute AddFormat name=lualatex engine=luatex patterns=language.dat options="lualatex.ini"
+execute AddFormat name=pdflualatex engine=luatex patterns=language.dat options="pdflualatex.ini"
 binpattern f bin/${ARCH}/latex
 binpattern f/!hppa-hpux bin/${ARCH}/lualatex
 binpattern f bin/${ARCH}/pdflatex
 binpattern f/!hppa-hpux bin/${ARCH}/pdflualatex
 docpattern f texmf/doc/man/man1/latex.*
 docpattern f texmf/doc/man/man1/pdflatex.*
-runpattern f texmf/fmtutil/format.latex.cnf
 runpattern d texmf/tex/latex/config
Index: tlpkg/tlpsrc/bin-omega.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-omega.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-omega.tlpsrc	(working copy)
@@ -1,7 +1,7 @@
 name bin-omega
 category TLCore
-execute BuildFormat omega
-runpattern f texmf/fmtutil/format.omega.cnf
+execute AddFormat name=omega engine=omega options="omega.ini"
+execute AddFormat name=lambda engine=omega patterns=language.dat options="lambda.ini"
 docpattern f texmf/doc/man/man1/lambda.*
 docpattern f texmf/doc/man/man1/omega.*
 binpattern f bin/${ARCH}/lambda
Index: tlpkg/tlpsrc/bin-tlpsv.win32.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-tlpsv.win32.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-tlpsv.win32.tlpsrc	(working copy)
@@ -5,3 +5,5 @@
 runpattern f bin/win32/psv.bat
 runpattern f texmf/scripts/texlive/psv.tlu
 runpattern d tlpkg/tlpsv
+postaction shortcut type=menu name="PS_View" icon=TEXDIR/tlpkg/tlpsv/psv.exe cmd=TEXDIR/bin/win32/psv.bat hide=1
+postaction shortcut type=desktop name="PS_View" icon=TEXDIR/tlpkg/tlpsv/psv.exe cmd=TEXDIR/bin/win32/psv.bat hide=1
Index: tlpkg/tlpsrc/bin-xmltex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-xmltex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-xmltex.tlpsrc	(working copy)
@@ -2,7 +2,7 @@
 category TLCore
 depend pdftex
 depend bin-tex
-execute BuildFormat xmltex
-runpattern f texmf/fmtutil/format.xmltex.cnf
+execute AddFormat name=xmltex engine=pdftex patterns=language.dat options="&latex xmltex.ini"
+execute AddFormat name=pdfxmltex engine=pdftex patterns=language.dat options="&pdflatex pdfxmltex.ini"
 binpattern f bin/${ARCH}/pdfxmltex
 binpattern f bin/${ARCH}/xmltex
Index: tlpkg/tlpsrc/texlive-ru.tlpsrc
===================================================================
--- tlpkg/tlpsrc/texlive-ru.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/texlive-ru.tlpsrc	(working copy)
@@ -1,2 +1,4 @@
 name texlive-ru
 category Documentation
+postaction shortcut type=menu name="TeX Live Manual (ru) (PDF)" cmd=TEXDIR/texmf-doc/doc/russian/texlive-ru/texlive-ru.pdf
+postaction shortcut type=menu name="TeX Live Manual (ru) (HTML)" cmd=TEXDIR/texmf-doc/doc/russian/texlive-ru/texlive-ru.html
Index: tlpkg/tlpsrc/bin-texlive.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-texlive.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-texlive.tlpsrc	(working copy)
@@ -25,3 +25,5 @@
 binpattern f bin/win32/tl-w32-wrapper.texlua
 binpattern f bin/win32/symlinks4cygwin.sh
 binpattern f/win32 texmf/scripts/texlive/w32_updater.bat
+postaction shortcut type=menu name="TeX Live Manager" cmd=TEXDIR/bin/win32/tlmgr.bat args=gui hide=1
+postaction shortcut type=menu name="Release notes" cmd="http://tug.org/texlive/windows.html"
Index: tlpkg/tlpsrc/t2.tlpsrc
===================================================================
--- tlpkg/tlpsrc/t2.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/t2.tlpsrc	(working copy)
@@ -1,5 +1,5 @@
 name t2
 category Package
-execute BuildFormat cyramstex
-execute BuildFormat cyrtex
-execute BuildFormat cyrtexinfo
+execute AddFormat name=cyramstex mode=disabled engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *cyramstx.ini"
+execute AddFormat name=cyrtex mode=disabled engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *cyrtex.ini"
+execute AddFormat name=cyrtexinfo mode=disabled engine=pdftex patterns=language.dat options="-translate-file=cp227.tcx *cyrtxinf.ini"
Index: tlpkg/tlpsrc/bin-texsis.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-texsis.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-texsis.tlpsrc	(working copy)
@@ -1,6 +1,5 @@
 name bin-texsis
 category TLCore
 depend bin-tex
-execute BuildFormat texsis
-runpattern f texmf/fmtutil/format.texsis.cnf
+execute AddFormat name=texsis engine=pdftex options="-translate-file=cp227.tcx texsis.ini"
 binpattern f bin/${ARCH}/texsis
Index: tlpkg/tlpsrc/texlive-en.tlpsrc
===================================================================
--- tlpkg/tlpsrc/texlive-en.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/texlive-en.tlpsrc	(working copy)
@@ -1,2 +1,4 @@
 name texlive-en
 category Documentation
+postaction shortcut type=menu name="TeX Live Manual (en) (PDF)" cmd=TEXDIR/texmf-doc/doc/english/texlive-en/texlive-en.pdf
+postaction shortcut type=menu name="TeX Live Manual (en) (HTML)" cmd=TEXDIR/texmf-doc/doc/english/texlive-en/texlive-en.html
Index: tlpkg/tlpsrc/bin-physe.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-physe.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-physe.tlpsrc	(working copy)
@@ -1,6 +1,5 @@
 name bin-physe
 category TLCore
 depend bin-tex
-execute BuildFormat physe
-runpattern f texmf/fmtutil/format.physe.cnf
+execute AddFormat name=physe engine=pdftex options="physe.ini"
 binpattern f bin/${ARCH}/physe
Index: tlpkg/tlpsrc/bin-phyzzx.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-phyzzx.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-phyzzx.tlpsrc	(working copy)
@@ -1,6 +1,5 @@
 name bin-phyzzx
 category TLCore
 depend bin-tex
-execute BuildFormat phyzzx
-runpattern f texmf/fmtutil/format.phyzzx.cnf
+execute AddFormat name=phyzzx engine=pdftex options="physe.ini"
 binpattern f bin/${ARCH}/phyzzx
Index: tlpkg/tlpsrc/bin-eplain.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-eplain.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-eplain.tlpsrc	(working copy)
@@ -1,8 +1,7 @@
 name bin-eplain
 category TLCore
 depend pdftex
-execute BuildFormat eplain
-runpattern f texmf/fmtutil/format.eplain.cnf
+execute AddFormat name=eplain engine=pdftex options="-translate-file=cp227.tcx *eplain.ini"
 docpattern f texmf/doc/info/eplain.info
 docpattern f texmf/doc/man/man1/eplain.*
 binpattern f bin/${ARCH}/eplain
Index: tlpkg/tlpsrc/texlive-cz.tlpsrc
===================================================================
--- tlpkg/tlpsrc/texlive-cz.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/texlive-cz.tlpsrc	(working copy)
@@ -1,2 +1,4 @@
 name texlive-cz
 category Documentation
+postaction shortcut type=menu name="TeX Live Manual (cz) (PDF)" cmd=TEXDIR/texmf-doc/doc/czechslovak/texlive-cz/texlive-cz.pdf
+postaction shortcut type=menu name="TeX Live Manual (cz) (HTML)" cmd=TEXDIR/texmf-doc/doc/czechslovak/texlive-cz/texlive-cz.html
Index: tlpkg/tlpsrc/bin-jadetex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-jadetex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-jadetex.tlpsrc	(working copy)
@@ -2,7 +2,7 @@
 category TLCore
 depend pdftex
 depend bin-tex
-execute BuildFormat jadetex
-runpattern f texmf/fmtutil/format.jadetex.cnf
+execute AddFormat name=jadetex engine=pdftex patterns=language.dat options="&latex jadetex.ini"
+execute AddFormat name=pdfjadetex engine=pdftex patterns=language.dat options="&pdflatex pdfjadetex.ini"
 binpattern f bin/${ARCH}/jadetex
 binpattern f bin/${ARCH}/pdfjadetex
Index: tlpkg/tlpsrc/texlive-pl.tlpsrc
===================================================================
--- tlpkg/tlpsrc/texlive-pl.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/texlive-pl.tlpsrc	(working copy)
@@ -1,2 +1,4 @@
 name texlive-pl
 category Documentation
+postaction shortcut type=menu name="TeX Live Manual (pl) (PDF)" cmd=TEXDIR/texmf-doc/doc/polish/texlive-pl/texlive-pl.pdf
+postaction shortcut type=menu name="TeX Live Manual (pl) (HTML)" cmd=TEXDIR/texmf-doc/doc/polish/texlive-pl/texlive-pl.html
Index: tlpkg/tlpsrc/bin-amstex.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-amstex.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-amstex.tlpsrc	(working copy)
@@ -1,7 +1,7 @@
 name bin-amstex
 category TLCore
 depend bin-tex
-execute BuildFormat amstex
-runpattern f texmf/fmtutil/format.amstex.cnf
+execute AddFormat name=amstex engine=pdftex options="-translate-file=cp227.tcx *amstex.ini"
+execute AddFormat name=pdfamstex mode=disabled engine=pdftex options="-translate-file=cp227.tcx *pdfamstex.ini"
 docpattern f texmf/doc/man/man1/amstex.*
 binpattern f bin/${ARCH}/amstex
Index: tlpkg/tlpsrc/bin-aleph.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-aleph.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-aleph.tlpsrc	(working copy)
@@ -1,7 +1,7 @@
 name bin-aleph
 category TLCore
 depend bin-omega
-execute BuildFormat aleph
-runpattern f texmf/fmtutil/format.aleph.cnf
+execute AddFormat name=aleph engine=aleph options=*aleph.ini
+execute AddFormat name=lamed engine=aleph patterns=language.dat options=*lambda.ini
 binpattern f bin/${ARCH}/aleph
 binpattern f bin/${ARCH}/lamed
Index: tlpkg/tlpsrc/bin-metafont.tlpsrc
===================================================================
--- tlpkg/tlpsrc/bin-metafont.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/bin-metafont.tlpsrc	(working copy)
@@ -1,8 +1,7 @@
 name bin-metafont
 category TLCore
 depend bin-kpathsea
-execute BuildFormat metafont
-runpattern f texmf/fmtutil/format.metafont.cnf
+execute AddFormat name=mf engine=mf-nowin options="-translate-file=cp227.tcx mf.ini"
 docpattern f texmf/doc/man/man1/mf-nowin.*
 docpattern f texmf/doc/man/man1/mf.*
 binpattern f bin/${ARCH}/mf
Index: tlpkg/tlpsrc/texlive.infra.tlpsrc
===================================================================
--- tlpkg/tlpsrc/texlive.infra.tlpsrc	(revision 12142)
+++ tlpkg/tlpsrc/texlive.infra.tlpsrc	(working copy)
@@ -36,3 +36,5 @@
 binpattern f/!i386-solaris,i386-linux,mips-irix,sparc-linux,alpha-linux,\
 powerpc-linux,i386-freebsd,x86_64-linux \
   tlpkg/installer/wget/wget.${ARCH}
+# post actions
+postaction shortcut type=menu name="TeX Live Toplevel Readme Index" cmd=TEXDIR/index.html