[svk-commit] r2501 - in branches/2.0-releng: pkg pkg/win32
nobody at bestpractical.com
nobody at bestpractical.com
Tue Jul 17 12:13:38 EDT 2007
Author: clkao
Date: Tue Jul 17 12:13:37 2007
New Revision: 2501
Added:
branches/2.0-releng/pkg/buildsvk.pl (contents, props changed)
branches/2.0-releng/pkg/maketest
branches/2.0-releng/pkg/svk-wrapper (contents, props changed)
branches/2.0-releng/pkg/win32/builddist.bat (contents, props changed)
branches/2.0-releng/pkg/win32/paroptions.txt
branches/2.0-releng/pkg/win32/setenv.bat (contents, props changed)
Modified:
branches/2.0-releng/lib/SVK/XD.pm
branches/2.0-releng/pkg/win32/Path.nsh
branches/2.0-releng/pkg/win32/svk.nsi
Log:
merge from trunk:
r2430 at trunk: clkao | 2007-07-14 10:01:27 +0100
win32 build scripts update from klight.
r2435 at trunk: clkao | 2007-07-14 14:37:47 +0100
first cut of svk build tool.
r2436 at trunk: clkao | 2007-07-14 14:40:34 +0100
win32 build fixes
r2440 at trunk: clkao | 2007-07-15 16:54:02 +0100
change eol style
r2441 at trunk: clkao | 2007-07-15 17:17:01 +0100
* Allow building current dist.
* bundle svn libraries for linux as well.
r2444 at trunk: clkao | 2007-07-15 18:03:39 +0100
Bundle tests and maketest helper.
r2447 at trunk: clkao | 2007-07-15 19:17:00 +0100
put build result into a directory with version number.
r2448 at trunk: klight | 2007-07-15 21:03:36 +0100
Update to the svk.nsi NSIS script.
Removed msvcrt71.dll and changed license file.
r2449 at trunk: jesse | 2007-07-15 21:47:26 +0100
r60770 at pinglin: jesse | 2007-07-15 16:46:33 -0400
* Added support for darwin.
* On Unixy platforms, atuomatically builds a tarball of your distribution
r2450 at trunk: clkao | 2007-07-15 22:23:24 +0100
Correct root for svk builds from dist.
r2451 at trunk: clkao | 2007-07-15 22:46:19 +0100
File::chdir is the future.
r2453 at trunk: clkao | 2007-07-16 00:25:49 +0100
* buildsvk.pl now builds the installer for win32.
r2454 at trunk: clkao | 2007-07-16 00:52:18 +0100
Win32 build fixes.
Modified: branches/2.0-releng/lib/SVK/XD.pm
==============================================================================
Added: branches/2.0-releng/pkg/buildsvk.pl
==============================================================================
--- (empty file)
+++ branches/2.0-releng/pkg/buildsvk.pl Tue Jul 17 12:13:37 2007
@@ -0,0 +1,338 @@
+#!perl
+
+use strict;
+use warnings;
+use Cwd 'abs_path';
+
+use File::Spec;
+
+
+
+=head1 NAME
+
+buildsvk.pl - packaging svk
+
+=head1 SYNOPSIS
+
+
+
+=head1 DESCRIPTION
+
+Put the dist files under src and C<buildsvk.pl> will create a build
+directory with everything installed under it.
+
+=cut
+
+my $build = SVK::Build->new;
+my $t = time();
+
+$build->prepare_perl();
+$build->prepare_svn_core();
+
+$build->build_module('libwin32', 'Console') if $^O eq 'MSWin32';
+
+$build->build_module($_) for qw(Scalar-List-Utils Class-Autouse version Sub-Uplevel Test-Simple Test-Exception Data-Hierarchy PerlIO-via-dynamic PerlIO-via-symlink SVN-Simple PerlIO-eol Algorithm-Diff Algorithm-Annotate Pod-Escapes Pod-Simple IO-Digest TimeDate Getopt-Long Encode PathTools YAML-Syck Locale-Maketext-Simple App-CLI List-MoreUtils Path-Class Class-Data-Inheritable Class-Accessor UNIVERSAL-require File-Temp Log-Log4perl);
+$build->build_module($_) for qw(Locale-Maketext-Lexicon TermReadKey IO-Pager);
+$build->build_module($_) for qw(File-chdir SVN-Mirror);
+$build->build_module($_) for qw(FreezeThaw);
+
+my $svkroot = shift;
+if ($svkroot) {
+ $build->perlmake_install($svkroot);
+}
+else {
+ $build->build_module('SVK');
+ ($svkroot) = glob($build->build_dir.'/SVK-*');
+}
+
+$build->prepare_dist($svkroot);
+
+warn 'build finished - '.(time() - $t);
+
+exit 0;
+
+package SVK::Build;
+use Archive::Extract;
+ use Archive::Tar;
+use Env::Path;
+use File::Path (qw(mkpath rmtree));
+use File::chdir;
+use File::Copy 'copy';
+use File::Temp 'tempdir';
+
+our $BUILD_BASE;
+
+sub prepare_perl { 1 };
+sub prepare_svn_core {
+ my $self = shift;
+ my $output = `ldd \`which svn\``;
+ for ($output =~ m/^.*$/mg) {
+ my ($lib, $file) = m/(\S.*?) => (\S.*?)\s/ or next;
+ if ($lib =~ m/libsvn_*/) {
+ warn "$lib $file";
+ copy($file, $self->build_dir);
+ }
+ }
+}
+
+sub build_dir {
+ shift->build_base ."/dest";
+}
+
+sub build_base {
+ $BUILD_BASE ||= tempdir();
+}
+
+sub prepare_build_dir {
+ my $self = shift;
+ mkpath [$self->build_dir];
+}
+
+sub new {
+ my $class = shift;
+ if ($^O eq 'MSWin32') {
+ $class .= '::Win32';
+ } elsif ($^O eq 'darwin') {
+ $class .= "::Darwin";
+ }
+
+ my $self = bless {}, $class;
+ $self->prepare_build_dir;
+ return $self;
+}
+
+
+sub extract {
+ my $self = shift;
+ my $ae = Archive::Extract->new( archive => shift );
+
+ $ae->extract( to => $self->build_base )
+ or die $ae->error;
+}
+
+sub perl { [ $^X, '-I'.$_[0]->perldest ] }
+sub make { 'make' }
+
+sub build_module {
+ my $self = shift;
+ my $module = shift;
+ my $subdir = shift;
+ # XXX: try to match version number only for the glob here
+ my ($dir) = glob($self->build_dir."/$module-*");
+ rmtree [$dir] if $dir;
+
+ my ($file) = glob("src/$module-*");
+ $self->extract($file);
+
+ ($dir) = glob($self->build_base."/$module-*");
+
+ $self->perlmake_install( $subdir ? "$dir/$subdir" : $dir );
+}
+
+sub perlmake_install {
+ my ($self, $dir) = @_;
+ my $PERLDEST = $self->perldest;
+ my $PERLDESTARCH = $PERLDEST;
+
+ local $CWD = $dir;
+ warn "$CWD\n";
+ system @{$self->perl}, qw(Makefile.PL INSTALLDIRS=perl),
+ "INSTALLARCHLIB=$PERLDESTARCH",
+ "INSTALLPRIVLIB=$PERLDEST",
+ "INSTALLBIN=$PERLDEST/../bin",
+ "INSTALLSCRIPT=$PERLDEST/../bin",
+ "INSTALLMAN1DIR=$PERLDEST/../man/man1",
+ "INSTALLMAN3DIR=$PERLDEST/../man/man3";
+
+ $ENV{PERL_EXTUTILS_AUTOINSTALL} = '--skipdeps';
+ system $self->make, qw( all install ) ;
+}
+
+sub perldest {
+ my $self = shift;
+ $self->build_dir.'/perl';
+}
+
+sub prepare_dist {
+ my $self = shift;
+ my $toplevel = shift;
+ copy('svk-wrapper' => $self->build_dir."/svk");
+ chmod 0755, $self->build_dir."/svk";
+
+ open my $fh, "$toplevel/MANIFEST" or die "Could not create $toplevel/MANIFEST: ".$!;
+ while (<$fh>) {
+ chomp;
+ next unless m{^t/};
+ my $file = $_;
+ my (undef, $dir, undef) = File::Spec->splitpath($file);
+ mkpath [ $self->build_dir."/$dir" ];
+ copy($toplevel.'/'.$file => $self->build_dir."/$file");
+ }
+
+ copy('maketest' => $self->build_dir."/maketest");
+ chmod 0755, $self->build_dir."/maketest";
+
+ my $version = $self->get_svk_version($toplevel);
+
+ rename($self->build_dir => $self->build_base.'/svk-'.$version);
+
+ $self->build_archive( 'svk-'.$version);
+
+
+}
+
+sub get_svk_version {
+ my ($self, $toplevel) = @_;
+ my $version = eval {
+ local @INC = @INC; unshift @INC, "$toplevel/lib"; require SVK::Version;
+ SVK->VERSION;
+ };
+
+}
+
+sub build_archive {
+ my $self = shift;
+ my $path = shift;
+ my $olddir = $CWD;
+ {
+ local $CWD = $self->build_base;
+ warn "In ".$self->build_base . " looking for ". $path;
+ my @cmd = ( 'tar', 'czvf' , "$olddir/$path.tgz", $path);
+ system( @cmd);
+ if ($!) { die "Failed to create tarball: ". $! . join (' ', at cmd);}
+ }
+ if (-f "$path.tgz" ) {
+
+ print "Congratulations! You have a new build of $path in ".$olddir."/".$path.".tgz\n";
+ } else {
+ warn "Couldn't build ".$self->build_base."/$path into a tarball\n";
+ }
+}
+
+package SVK::Build::Win32;
+use base 'SVK::Build';
+use Cwd 'abs_path';
+use File::Path (qw(rmtree));
+use File::Spec;
+use File::Copy 'move';
+
+sub build_dir {
+ 'c:/tmp/svk-build';
+}
+
+sub build_base {
+ 'c:/tmp/svk-build';
+}
+
+sub perl {
+ my $self = shift;
+ [abs_path(File::Spec->catfile($self->build_dir,
+ qw(strawberry-perl perl bin perl.exe))) ];
+}
+
+sub make { 'dmake' }
+
+sub perlmake_install {
+ my $self = shift;
+ local %ENV = %ENV;
+ Env::Path->PATH->Assign( map { abs_path(File::Spec->catfile($self->build_dir, 'strawberry-perl', $_, 'bin')) } qw(perl dmake mingw));
+ return $self->SUPER::perlmake_install(@_);
+}
+
+sub perldest {
+ File::Spec->catdir(abs_path($_[0]->build_dir), qw(strawberry-perl perl lib));
+}
+
+sub prepare_perl {
+ my $self = shift;
+
+ if (-d $self->perldest) {
+ warn "found strawberry perl, remove ".$self->perldest." for clean build.\n";
+ return 1;
+ }
+ $self->extract('strawberry-perl.zip');
+}
+
+sub prepare_svn_core {
+ my $self = shift;
+ return 1 if -e File::Spec->catfile($self->build_dir, 'strawberry-perl', 'perl', 'lib', 'SVN' );
+
+ $self->extract('svn-win32-1.4.4.zip');
+ $self->extract('svn-win32-1.4.4_pl.zip');
+
+ my $svnperl = File::Spec->catfile($self->build_dir, 'svn-win32-1.4.4', 'perl', 'site', 'lib' );
+
+ my $strperl = File::Spec->catfile($self->build_dir, 'strawberry-perl', 'perl', 'lib' );
+
+ rename(File::Spec->catfile($svnperl, "SVN") =>
+ File::Spec->catfile($strperl, "SVN")) or die $!;
+
+ rename(File::Spec->catfile($svnperl, "auto", "SVN") =>
+ File::Spec->catfile($strperl, "auto", "SVN")) or die $!;
+
+ move($_ => File::Spec->catfile($self->build_dir, 'strawberry-perl', 'perl', 'bin'))
+ for glob($self->build_dir."/svn-win32-1.4.4/bin/*.dll");
+}
+
+sub prepare_dist {
+ my $self = shift;
+ my $toplevel = shift;
+ my @paroptions;
+ open my $fh, 'win32/paroptions.txt' or die $!;
+ while (<$fh>) { next if m/^#/; chomp; push @paroptions, split(/ /,$_) };
+ push @paroptions,
+ -a => "$toplevel/lib/SVK/Help;lib/SVK/Help",
+ -a => "$toplevel/lib/SVK/I18N;lib/SVK/I18N",
+ -a => $self->perldest."/auto/POSIX;lib/auto/POSIX",
+ -I => "$toplevel/lib",
+ -I => $self->perldest,
+ (map { (-a => File::Spec->catfile($self->build_dir, 'strawberry-perl', 'perl', 'bin', $_).";bin/$_") }
+ qw(perl.exe perl58.dll prove.bat intl3_svn.dll libapr.dll libapriconv.dll libaprutil.dll libdb44.dll libeay32.dll ssleay32.dll) ),
+ -a => "$toplevel/blib/script/svk;bin/svk",
+ -a => "$toplevel/blib/script/svk.bat;bin/svk.bat",
+ -a => "$toplevel/pkg/win32/maketest.bat;win32/maketest.bat",
+ -a => "$toplevel/pkg/win32/svk.ico;win32/svk.ico",
+ -a => "$toplevel/pkg/win32/svk-uninstall.ico;win32/svk-uninstall.ico",
+ -a => "$toplevel/pkg/win32/svk.nsi;win32/svk.nsi",
+ -a => "$toplevel/pkg/win32/Path.nsh;win32/Path.nsh",
+ -a => "$toplevel/contrib;site/contrib",
+ -a => "$toplevel/utils;site/utils",
+ -a => "$toplevel/t;site/t",
+ -a => "$toplevel/README;README",
+ -a => "$toplevel/CHANGES;CHANGES",
+ -a => "$toplevel/ARTISTIC;ARTISTIC",
+ -a => "$toplevel/COPYING;COPYING";
+
+
+
+ rmtree ['build'] if -d 'build';
+ mkdir('build');
+ system('pp', @paroptions, "$toplevel/blib/script/svk");
+
+ system('zip', qw(-d build\SVK.par lib\SVK));
+ system('zip', qw(-d build\t\checkout lib\SVK));
+ system('unzip', qw(-o -d build build/SVK.par));
+ $self->build_archive($self->get_svk_version($toplevel));
+}
+
+sub build_archive {
+ my ($self, $version) = @_;
+ Env::Path->PATH->Prepend("C:/Program Files/NSIS");
+ system('makensis', "/X !define MUI_VERSION $version", 'build/win32/svk.nsi');
+}
+
+
+package SVK::Build::Darwin;
+use base 'SVK::Build';
+use File::Copy 'copy';
+sub prepare_svn_core {
+ my $self = shift;
+ my $output = `otool -L \`which svn\``;
+ for ($output =~ m/^.*$/mg) {
+ my ($lib) = m/^\s*(.*?)\s/ or next;
+ next if $lib =~ /^\/(?:System|usr\/lib)/;
+ warn $lib;
+ copy($lib, $self->build_dir);
+ }
+}
+
Added: branches/2.0-releng/pkg/maketest
==============================================================================
--- (empty file)
+++ branches/2.0-releng/pkg/maketest Tue Jul 17 12:13:37 2007
@@ -0,0 +1,10 @@
+#!/bin/sh
+BASE=`readlink $0`
+if [ "x${BASE}" = x ]; then
+ BASE=$0
+fi
+
+BASE=`echo $BASE | sed s/maketest$//`;
+PROVE=`which prove`
+chdir /tmp
+LD_LIBRARY_PATH=${BASE} perl -I${BASE}perl "$PROVE" ${BASE}t
Added: branches/2.0-releng/pkg/svk-wrapper
==============================================================================
--- (empty file)
+++ branches/2.0-releng/pkg/svk-wrapper Tue Jul 17 12:13:37 2007
@@ -0,0 +1,9 @@
+#!/bin/sh
+BASE=`readlink $0`
+if [ "x${BASE}" = x ]; then
+ BASE=$0
+fi
+
+BASE=`echo $BASE | sed s/svk$//`;
+
+LD_LIBRARY_PATH=${BASE} perl -I${BASE}perl ${BASE}bin/svk $@
Modified: branches/2.0-releng/pkg/win32/Path.nsh
==============================================================================
--- branches/2.0-releng/pkg/win32/Path.nsh (original)
+++ branches/2.0-releng/pkg/win32/Path.nsh Tue Jul 17 12:13:37 2007
@@ -1,3 +1,4 @@
+
;----------------------------------------
; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
;----------------------------------------
@@ -68,7 +69,7 @@
FileOpen $1 "$1\autoexec.bat" a
FileSeek $1 0 END
GetFullPathName /SHORT $0 $0
- FileWrite $1 "$\r$\nSET PATH=$0;%PATH%$\r$\n"
+ FileWrite $1 "$\r$\nSET PATH=%PATH%;$0$\r$\n"
FileClose $1
Goto AddToPath_done
@@ -85,7 +86,7 @@
ReadRegStr $1 ${NT_current_env} "PATH"
read_path_NT_resume:
StrCmp $1 "" AddToPath_NTdoIt
- StrCpy $2 "$0;$1"
+ StrCpy $2 "$1;$0"
Goto AddToPath_NTdoIt
AddToPath_NTdoIt:
StrCmp $4 "current" write_path_NT_current
@@ -116,6 +117,92 @@
FunctionEnd
;====================================================
+; RemoveFromPath - Remove a given dir from the path
+; Input: head of the stack
+;====================================================
+Function un.RemoveFromPath
+ Exch $0
+ Push $1
+ Push $2
+ Push $3
+ Push $4
+
+ Call un.IsNT
+ Pop $1
+ StrCmp $1 1 unRemoveFromPath_NT
+ ; Not on NT
+ StrCpy $1 $WINDIR 2
+ FileOpen $1 "$1\autoexec.bat" r
+ GetTempFileName $4
+ FileOpen $2 $4 w
+ GetFullPathName /SHORT $0 $0
+ StrCpy $0 "SET PATH=%PATH%;$0"
+ SetRebootFlag true
+ Goto unRemoveFromPath_dosLoop
+
+ unRemoveFromPath_dosLoop:
+ FileRead $1 $3
+ StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoop
+ StrCmp $3 "$0$\n" unRemoveFromPath_dosLoop
+ StrCmp $3 "$0" unRemoveFromPath_dosLoop
+ StrCmp $3 "" unRemoveFromPath_dosLoopEnd
+ FileWrite $2 $3
+ Goto unRemoveFromPath_dosLoop
+
+ unRemoveFromPath_dosLoopEnd:
+ FileClose $2
+ FileClose $1
+ StrCpy $1 $WINDIR 2
+ Delete "$1\autoexec.bat"
+ CopyFiles /SILENT $4 "$1\autoexec.bat"
+ Delete $4
+ Goto unRemoveFromPath_done
+
+ unRemoveFromPath_NT:
+ StrLen $2 $0
+ Call un.select_NT_profile
+ Pop $4
+
+ StrCmp $4 "current" un_read_path_NT_current
+ ReadRegStr $1 ${NT_all_env} "PATH"
+ Goto un_read_path_NT_resume
+ un_read_path_NT_current:
+ ReadRegStr $1 ${NT_current_env} "PATH"
+ un_read_path_NT_resume:
+
+ Push $1
+ Push $0
+ Call un.StrStr ; Find $0 in $1
+ Pop $0 ; pos of our dir
+ IntCmp $0 -1 unRemoveFromPath_done
+ ; else, it is in path
+ StrCpy $3 $1 $0 ; $3 now has the part of the path before our dir
+ IntOp $2 $2 + $0 ; $2 now contains the pos after our dir in the path (';')
+ IntOp $2 $2 + 1 ; $2 now containts the pos after our dir and the semicolon.
+ StrLen $0 $1
+ StrCpy $1 $1 $0 $2
+ StrCpy $3 "$3$1"
+
+ StrCmp $4 "current" un_write_path_NT_current
+ WriteRegExpandStr ${NT_all_env} "PATH" $3
+ Goto un_write_path_NT_resume
+ un_write_path_NT_current:
+ WriteRegExpandStr ${NT_current_env} "PATH" $3
+ un_write_path_NT_resume:
+ SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
+ unRemoveFromPath_done:
+ Pop $4
+ Pop $3
+ Pop $2
+ Pop $1
+ Pop $0
+FunctionEnd
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Uninstall sutff
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+;====================================================
; StrStr - Finds a given string in another given string.
; Returns -1 if not found and the pos if found.
; Input: head of the stack - string to find
Added: branches/2.0-releng/pkg/win32/builddist.bat
==============================================================================
--- (empty file)
+++ branches/2.0-releng/pkg/win32/builddist.bat Tue Jul 17 12:13:37 2007
@@ -0,0 +1,89 @@
+REM This script builds a SVK installation package
+REM The environment (IE:system path) must be configured properly before
+REM running this script! (see setenv.bat)
+REM After this script finishes, compile the NSIS script (svk.nsi)
+REM located in the build\win32\ folder.
+REM
+REM This script requires:
+REM That SVK be built
+REM That pp is installed
+REM That a zip/unzip program is available (Info-Zip)
+REM
+REM If mtee is available, a logfile can be created with a command line like:
+REM builddist 2>&1 | mtee /d/t log.txt
+REM
+REM Adjust the following to your needs!
+SET SVNHOME=C:/strawberry-perl/svn-win32-1.4.4
+SET SVKSOURCE=c:/strawberry-perl/src/SVK-v2.0.1
+SET PERLHOME=C:/strawberry-perl/perl
+SET PPSOURCESCRIPT=c:/strawberry-perl/src/SVK-v2.0.1/blib/script/SVK
+SET FIXZIP=c:\utils\zip -d build\SVK.par lib\SVK.
+SET UNZIPPER=c:\utils\unzip -o -d build build\SVK.par
+REM SET UNZIPPER="c:\program files\7-Zip\7z" x -y -obuild
+REM
+SET PAR_VERBATIM=1
+REM
+REM Remove and remnants of the previous build
+rd /s /q build
+
+REM create the working folders
+mkdir build
+
+REM Create a new set of path specific PAR (pp) options
+REM Copy the original parameter file to make run-time appends
+copy paroptions.txt parsvkfixups.txt
+REM This is done here because we cannot do variable subs in the parmater file
+REM do this to bring in the help pod's
+echo -a "%SVKSOURCE%/blib/lib/SVK/Help;lib/SVK/Help" >> parsvkfixups.txt
+REM # do this to bring in the I18N
+echo -a "%SVKSOURCE%/blib/lib/SVK/I18N;lib/SVK/I18N" >> parsvkfixups.txt
+REM # do this to fix the missing POSIX files
+echo -a "%PERLHOME%/lib/auto/POSIX;lib/auto/POSIX" >> parsvkfixups.txt
+REM Add the SVK source path to the build
+echo -I %SVKSOURCE%/blib/lib >> parsvkfixups.txt
+
+REM Move the built and Win32 specific files into the par
+echo -a "%PERLHOME%/bin/perl.exe;bin/perl.exe" >> parsvkfixups.txt
+echo -a "%PERLHOME%/bin/perl58.dll;bin/perl58.dll" >> parsvkfixups.txt
+echo -a "%PERLHOME%/bin/prove.bat;bin/prove.bat" >> parsvkfixups.txt
+echo -a "%SVNHOME%/bin/intl3_svn.dll;bin/intl3_svn.dll" >> parsvkfixups.txt
+echo -a "%SVNHOME%/bin/libapr.dll;bin/libapr.dll" >> parsvkfixups.txt
+echo -a "%SVNHOME%/bin/libapriconv.dll;bin/libapriconv.dll" >> parsvkfixups.txt
+echo -a "%SVNHOME%/bin/libaprutil.dll;bin/libaprutil.dll" >> parsvkfixups.txt
+echo -a "%SVNHOME%/bin/libdb44.dll;bin/libdb44.dll" >> parsvkfixups.txt
+echo -a "%SVNHOME%/bin/libeay32.dll;bin/libeay32.dll" >> parsvkfixups.txt
+echo -a "%SVNHOME%/bin/ssleay32.dll;bin/ssleay32.dll" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/blib/script/svk;bin/svk" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/blib/script/svk.bat;bin/svk.bat" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/pkg/win32/maketest.bat;win32/maketest.bat" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/pkg/win32/svk.ico;win32/svk.ico" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/pkg/win32/svk-uninstall.ico;win32/svk-uninstall.ico" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/pkg/win32/svk.nsi;win32/svk.nsi" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/pkg/win32/Path.nsh;win32/Path.nsh" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/contrib;site/contrib" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/utils;site/utils" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/t;site/t" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/README;README" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/CHANGES;CHANGES" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/ARTISTIC;ARTISTIC" >> parsvkfixups.txt
+echo -a "%SVKSOURCE%/COPYING;COPYING" >> parsvkfixups.txt
+
+REM using par, build the compressed output
+call pp @parsvkfixups.txt %PPSOURCESCRIPT%
+
+REM Must do a fixup before the .par can be un-packed
+REM Remove the lib\SVK. file as it conflicts with the lib\SVK folder on CIFS
+call %FIXZIP%
+REM extract the par THIS USES Info-Zip unzip but could use 7z.exe
+call %UNZIPPER%
+
+REM remove the dynamicically created par options
+del /F/Q parsvkfixups.txt
+
+REM remove the .par after it is built
+del /F/Q build\SVK.par
+
+REM remove the script folder because we do not need it
+rd /S/Q build\script
+
+:exit
Added: branches/2.0-releng/pkg/win32/paroptions.txt
==============================================================================
--- (empty file)
+++ branches/2.0-releng/pkg/win32/paroptions.txt Tue Jul 17 12:13:37 2007
@@ -0,0 +1,42 @@
+# ask for verboseness
+-vvv
+# don't build the .exe, stop at the par
+-o build/SVK.par
+-B
+-p
+# include the svk build library
+# NOTE: This is done on the pp command line
+#-I ../../blib/lib
+# add in the icon
+-i svk.ico
+# create a log
+-L pp.log
+# include some missed modules
+-M Log::Log4perl::Appender::Screen
+-M Encode::TW
+-M Encode::JP
+-M Encode::KR
+-M Encode::CN
+-M POSIX
+# exclude some not-needed dependencies
+-X ExtUtils::CBuilder
+-X LWP::Authen::Ntlm
+-X LWP::Protocol::GHTTP
+-X LWP::Protocol::mailto
+-X LWP::Protocol::https
+-X LWP::Protocol::https10
+-X Module::Build::Cookbook
+-X SVN::Mirror::VCP
+-X URI::urn::isbn
+-X Net::FTP
+-X CPAN
+-X Thread
+# The following actions are now done as a secondary option file to pp
+# See the builddist.bat file for details
+# do this to bring in the help pod's
+#-a "../../blib/lib/SVK/Help;lib/SVK/Help"
+# do this to bring in the I18N
+#-a "../../blib/lib/SVK/I18N;lib/SVK/I18N"
+# do this to fix the missing POSIX files
+#-a "../../../../perl/lib/auto/POSIX;lib/auto/POSIX"
+
Added: branches/2.0-releng/pkg/win32/setenv.bat
==============================================================================
--- (empty file)
+++ branches/2.0-releng/pkg/win32/setenv.bat Tue Jul 17 12:13:37 2007
@@ -0,0 +1,10 @@
+REM Change the path to only include what is needed to build SVK
+REM Set the path to all of the Strawberry-Perl places
+set path=c:\strawberry-perl\perl\bin;c:\strawberry-perl\dmake\bin;c:\strawberry-perl\mingw\bin;c:\strawberry-perl\mingw\mingw32\bin
+REM Set the path to the location of cmd.exe (OS SPECIFIC!)
+set path=%path%;%WINDIR%\system32
+REM Set the location of the SVN binaries and dll's
+set path=%path%;C:\strawberry-perl\svn-win32-1.4.4\bin
+REM Finally set the mingw compiler include and lib locations
+set include=c:\strawberry-perl\mingw\include;
+set lib=c:\strawberry-perl\mingw\lib;
\ No newline at end of file
Modified: branches/2.0-releng/pkg/win32/svk.nsi
==============================================================================
--- branches/2.0-releng/pkg/win32/svk.nsi (original)
+++ branches/2.0-releng/pkg/win32/svk.nsi Tue Jul 17 12:13:37 2007
@@ -1,8 +1,10 @@
SetCompressor bzip2
-!define MUI_COMPANY "OurInternet"
+!define MUI_COMPANY "Best Practical Solutions, LLC"
!define MUI_PRODUCT "SVK"
-!define MUI_VERSION "0.26-1"
+!ifndef MUI_VERSION
+!define MUI_VERSION "unknown"
+!endif
!define MUI_NAME "svk"
!define MUI_ICON "${MUI_NAME}.ico"
!define MUI_UNICON "${MUI_NAME}-uninstall.ico"
@@ -10,10 +12,12 @@
!include "MUI.nsh"
!include "Path.nsh"
+!include "Library.nsh"
+
XPStyle On
Name "${MUI_PRODUCT}"
-OutFile "${MUI_NAME}-${MUI_VERSION}.exe"
-InstallDir "C:\Program Files\${MUI_NAME}"
+OutFile "..\${MUI_NAME}-${MUI_VERSION}.exe"
+InstallDir "$PROGRAMFILES\${MUI_NAME}"
ShowInstDetails hide
InstProgressFlags smooth
@@ -22,7 +26,7 @@
;--------------------------------
;Pages
- !insertmacro MUI_PAGE_LICENSE "License.txt"
+ !insertmacro MUI_PAGE_LICENSE "..\ARTISTIC"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
@@ -35,10 +39,9 @@
"SOFTWARE\${MUI_COMPANY}\${MUI_PRODUCT}" "" "$INSTDIR"
SetOverwrite on
SetOutPath $INSTDIR
- File /r ..\svk.bat
File /r ..\bin
File /r ..\lib
- File /r ..\site
+ File /r /x checkout ..\site
File /r ..\win32
Delete "$INSTDIR\svk.bat"
@@ -47,11 +50,14 @@
FileOpen $1 "$INSTDIR\bin\svk.bat" w
FileWrite $1 "@echo off$\n"
FileWrite $1 "if $\"%OS%$\" == $\"Windows_NT$\" goto WinNT$\n"
- FileWrite $1 "$\"$INSTDIR\bin\perl.exe$\" $\"$INSTDIR\site\bin\svk$\" %1 %2 %3 %4 %5 %6 %7 %8 %9$\n"
+ FileWrite $1 "$\"$INSTDIR\bin\perl.exe$\" $\"$INSTDIR\bin\svk$\" %1 %2 %3 %4 %5 %6 %7 %8 %9$\n"
FileWrite $1 "goto endofsvk$\n"
FileWrite $1 ":WinNT$\n"
- FileWrite $1 "$\"%~dp0perl.exe$\" $\"%~dp0..\site\bin\svk$\" %*$\n"
- FileWrite $1 ":endofsvk\n"
+ FileWrite $1 "$\"%~dp0perl.exe$\" $\"%~dp0svk$\" %*$\n"
+ FileWrite $1 "if NOT $\"%COMSPEC%$\" == $\"%SystemRoot%\system32\cmd.exe$\" goto endofperl$\n"
+ FileWrite $1 "if %errorlevel% == 9009 echo You do not have Perl in your PATH.$\n"
+ FileWrite $1 "if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul$\n"
+ FileWrite $1 ":endofperl$\n"
FileClose $1
WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -66,15 +72,16 @@
RenameSSLeay32:
Rename "$SYSDIR\ssleay32.dll" "$SYSDIR\ssleay32.dll.old"
+
Done:
; Add \bin directory to the PATH for svk.bat and DLLs
Push "$INSTDIR\bin"
Call AddToPath
SectionEnd
-
+
Section "Uninstall"
- Push $INSTDIR
- Call un.RemoveFromPath
- RMDir /r $INSTDIR
- DeleteRegKey HKLM "SOFTWARE\${MUI_COMPANY}\${MUI_PRODUCT}"
+ Push $INSTDIR
+ Call un.RemoveFromPath
+ RMDir /r $INSTDIR
+ DeleteRegKey HKLM "SOFTWARE\${MUI_COMPANY}\${MUI_PRODUCT}"
SectionEnd
More information about the svk-commit
mailing list