summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-10-09 22:26:36 +0000
committerNorbert Preining <preining@logic.at>2008-10-09 22:26:36 +0000
commita62cea2ef3063137650f7d50124dd59b3251addc (patch)
tree41c0275c306e43552a9d63dcd930b8f3856e8ebf
parent1023ab765b46e459662790c15b3c0fec0d899546 (diff)
make tl-create-nsis fully functional
git-svn-id: svn://tug.org/texlive/trunk@10904 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/tlpkg/bin/tl-create-nsis57
1 files changed, 55 insertions, 2 deletions
diff --git a/Master/tlpkg/bin/tl-create-nsis b/Master/tlpkg/bin/tl-create-nsis
index 6d658e9f6b4..d1302fe628c 100755
--- a/Master/tlpkg/bin/tl-create-nsis
+++ b/Master/tlpkg/bin/tl-create-nsis
@@ -49,6 +49,12 @@ sub main
push @allfiles, $bintexlivew32->all_files if defined $bintexlivew32;
push @allfiles, $texliveinfra->all_files;
push @allfiles, $texliveinfraw32->all_files;
+ my $rev = $bintexlive->revision;
+ if (defined($bintexlivew32)) {
+ $rev = ( $rev > $bintexlivew32->revision ? $rev : $bintexlivew32->revision );
+ }
+ $rev = ( $rev > $texliveinfra->revision ? $rev : $texliveinfra->revision );
+ $rev = ( $rev > $texliveinfraw32->revision ? $rev : $texliveinfraw32->revision );
for my $f (@allfiles) {
if ($f !~ m!/!) {
$f = "./$f";
@@ -59,15 +65,60 @@ sub main
}
push @{$dirtofiles{$dn}}, $fn;
}
+ print <<'EOF';
+!include "FileFunc.nsh"
+!insertmacro GetParent
+
+EOF
+ print "!define REV \"rev$rev\"\n";
+
+print <<'EOF';
+
+Page directory
+Page instfiles
+
+Name "TeX Live Update ${REV}"
+OutFile "update-texlive-${REV}.exe"
+InstallDir "$PROGRAMFILES\texlive\2008"
+
+DirText "Setup will update your TeX Live installation in the following folder. \
+ To install in a different folder, click Browse and select another folder. \
+ Click Install to start the update."
+
+Function .onInit
+ SearchPath $0 tlmgr.bat
+ ${GetParent} $0 $1
+ ${GetParent} $1 $0
+ ${GetParent} $0 $1
+ ;MessageBox MB_OK "tlmgr=$1"
+ StrCpy $INSTDIR $1
+ ;SetOutPath $1
+FunctionEnd
+
+Function .onVerifyInstDir
+ IfFileExists $INSTDIR\tlpkg\texlive.tlpdb PathGood
+ Abort
+ PathGood:
+FunctionEnd
+
+Section "MainGroup"
+ #SetOutPath "$INSTDIR"
+ #File /r tlupdates\*.*
+EOF
for my $d (keys %dirtofiles) {
my $dd = $d;
$dd =~ s!/!\\!g;
- print " SetOutPath \"\$INSTDIR\\$dd\"\r\n";
+ print " SetOutPath \"\$INSTDIR\\$dd\"\n";
for my $f (@{$dirtofiles{$d}}) {
$f =~ s!/!\\!g;
- print " File ..\\..\\..\\$dd\\$f\r\n";
+ print " File ..\\..\\..\\$dd\\$f\n";
}
}
+print <<'EOF';
+ # order here is important!!! first the main packages, then the .doc ones!
+ ExecWait '"$INSTDIR\bin\win32\tlmgr.bat" _include_tlpobj "$INSTDIR\tlpkg\tlpobj\bin-texlive.tlpobj" "$INSTDIR\tlpkg\tlpobj\texlive.infra.tlpobj" "$INSTDIR\tlpkg\tlpobj\texlive.infra.doc.tlpobj" "$INSTDIR\tlpkg\tlpobj\texlive.infra.win32.tlpobj"'
+SectionEnd
+EOF
}
@@ -90,6 +141,8 @@ function in L<TeXLive::TLUtils> for details.
=head1 DESCRIPTION
+Creates a .nsi file that can be used with NSIS to create an update package
+for Win32.
=head1 AUTHORS AND COPYRIGHT