From 9e04df05a8e92473e9dfad20334059013c764d13 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 18 Mar 2013 23:18:33 +0000 Subject: (make_zip): support for install-tl.exe, via nsis; by Siep git-svn-id: svn://tug.org/texlive/trunk@29425 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/tl-update-install-pkg | 43 ++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 17 deletions(-) (limited to 'Master/tlpkg/bin/tl-update-install-pkg') diff --git a/Master/tlpkg/bin/tl-update-install-pkg b/Master/tlpkg/bin/tl-update-install-pkg index 7b356028629..d8b8aa5ed2c 100755 --- a/Master/tlpkg/bin/tl-update-install-pkg +++ b/Master/tlpkg/bin/tl-update-install-pkg @@ -1,12 +1,13 @@ #!/usr/bin/env perl # $Id$ # -# Copyright 2008, 2009 Reinhard Kotucha, Norbert Preining, Karl Berry +# Copyright 2008, 2009, 2013 Reinhard Kotucha, Norbert Preining, Karl Berry # This file is licensed under the GNU General Public License version 2 # or any later version. -# This script creates the zip (everything) and tgz (omits windows) -# archives to do a network install. Invoked from tl-update-tlnet. +# This script creates the zip (everything) and exe (everything, made +# with nsi) and tgz (omits windows files) files that are how users +# install TL over thenet. Invoked from tl-update-tlnet. BEGIN { $^W = 1; @@ -84,8 +85,7 @@ my $outputdir = $opt_outputdir; my @signals = qw(HUP INT ILL FPE SEGV TERM ABRT QUIT BUS PIPE); # -sub cleanup -{ +sub cleanup { if (-d $tmpdir) { system ('rm', '-rf', $tmpdir); } @@ -171,6 +171,7 @@ make_zip ("tgz"); copy_files (@win32); make_zip ("zip"); +make_zip ("nsis"); install_files (); @@ -180,8 +181,7 @@ cleanup (); # copy files from the repository to $inst_tmp. # -sub copy_files -{ +sub copy_files { my ($dir, $file); for (@_) { if ($_ !~ m!/!) { @@ -195,30 +195,39 @@ sub copy_files } -# create the .tar.gz and the .zip files. +# create the .tar.gz, .zip, .exe (nsis) install packages. # -sub make_zip -{ +sub make_zip { my ($type) = @_; info ("$0: Making $type...\n"); chdir ($tmpdir) || die "chdir($tmpdir) failed: $!"; if ($type eq 'zip') { system ('zip', '-rq', 'install-tl.zip', $install_tl_name); - } else { + + } elsif ($type eq 'nsis') { + # write include file for dated install directory. + my $nsh = "$tmpdir/tlsubdir.nsh"; + system ("echo !define YYYYMMDD '$YYYYMMDD' >\"$nsh\""); + system ("echo !define INST_TL_NAME '$install_tl_name' >>\"$nsh\""); + copy ("$::installerdir/tlpkg/libexec/install-tl.nsi", $tmpdir); + system ('makensis', 'install-tl'); + + } elsif ($type eq 'tgz') { system ('tar', '-czf', 'install-tl-unx.tar.gz', $install_tl_name); - } - chdir ($installerdir) || die "chdir($installerdir) failed: $!"; + + } else ( + die "unknown install package type $type"; + ) } -# copy generated zip+tgz to outputdir, +# copy generated install packages to outputdir, # -sub install_files -{ +sub install_files { $outputdir = abs_path ($outputdir); info ("$0: Installing to $outputdir\n"); - for my $f ("install-tl-unx.tar.gz", "install-tl.zip") { + for my $f ("install-tl-unx.tar.gz", "install-tl.zip", "install-tl.exe") { copy ("$tmpdir/$f", $outputdir); system ("cd $outputdir && sha256sum $f >$f.sha256"); system ('ls', '-l', "$outputdir/$f"); -- cgit v1.2.3