summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-install-pkg
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-18 23:18:33 +0000
committerKarl Berry <karl@freefriends.org>2013-03-18 23:18:33 +0000
commit9e04df05a8e92473e9dfad20334059013c764d13 (patch)
treea9f021a35f8bbd9a2fafd11ba1caccacd09a2b97 /Master/tlpkg/bin/tl-update-install-pkg
parentd40cbce1401307dacf242faddc54bc3eb8651595 (diff)
(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
Diffstat (limited to 'Master/tlpkg/bin/tl-update-install-pkg')
-rwxr-xr-xMaster/tlpkg/bin/tl-update-install-pkg43
1 files changed, 26 insertions, 17 deletions
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");