dist.pl

来自「MiniSip Client with DomainKeys Authentic」· PL 代码 · 共 64 行

PL
64
字号
#### dist.pl - extends support for build.pl for Win32# Requires Nullsoft Scriptable Install System#sub win32_pkgversion {    my @distfiles = distfiles();    my $version = undef;        for my $file ( @distfiles ){	$file =~ /$pkg-(.*)\.tar.*$/;	$version = $1;	break;    }    return $version;}sub win32_pkgfiles {    my $version = &win32_pkgversion;    return unless $version;    $version = $version . $win32_extra_version;    return unless -r "$confdir/dist/$hostdist/$pkg.nsi";    return ("$builddir/$pkg-installer-${version}.exe");}sub win32_package {    my $version = &win32_pkgversion;    if ( ! defined $version ){	warn "warning: Can't detect $pkg version";	return;    }    $version = $version . $win32_extra_version;    if ( ! -r "$confdir/dist/$hostdist/$pkg.nsi" ) {	warn "warning: $pkg.nsi not found";	return;    }    easy_chdir("$confdir/dist/$hostdist");    act('win32: strip', "$hostspec-strip",	@win32_contents,	) if $win32_do_strip;    act('win32: makensis', qw( makensis ),	"-DVERSION=$version",	"-DINSTALLDIR=${destdir}${prefixdir}",	"-DBUILDDIR=${builddir}",	"-DOUTFILE=" . &win32_pkgfiles,	@win32_params,	"$pkg.nsi",	);    return &win32_pkgfiles;}set_dist_callbacks(		   'pkgfiles' => \&win32_pkgfiles,		   'package' => \&win32_package,		   );

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?