[svk-commit] r2462 - in branches/i18n-fixes/pkg: .

nobody at bestpractical.com nobody at bestpractical.com
Mon Jul 16 20:52:36 EDT 2007


Author: clkao
Date: Mon Jul 16 20:52:35 2007
New Revision: 2462

Modified:
   branches/i18n-fixes/pkg/buildsvk.pl
   branches/i18n-fixes/pkg/win32/svk.nsi

Log:
* Change win32 package to not have perl in PATH.
* Bundle apr-iconv and set the env variable in wrapper.

Modified: branches/i18n-fixes/pkg/buildsvk.pl
==============================================================================
--- branches/i18n-fixes/pkg/buildsvk.pl	(original)
+++ branches/i18n-fixes/pkg/buildsvk.pl	Mon Jul 16 20:52:35 2007
@@ -27,6 +27,7 @@
 my $t = time();
 
 $build->prepare_perl();
+$build->prepare_dist('..'); exit;
 $build->prepare_svn_core();
 
 $build->build_module('libwin32', 'Console') if $^O eq 'MSWin32';
@@ -272,6 +273,8 @@
 
     move($_ => File::Spec->catfile($self->build_dir, 'strawberry-perl', 'perl', 'bin'))
 	for glob($self->build_dir."/svn-win32-1.4.4/bin/*.dll");
+
+    move($self->build_dir."/svn-win32-1.4.4/iconv" => File::Spec->catfile($self->build_dir, 'strawberry-perl', 'iconv'))
 }
 
 sub prepare_dist {
@@ -289,12 +292,12 @@
          (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 => File::Spec->catfile($self->build_dir, 'strawberry-perl', 'iconv').";iconv",
          -a => "$toplevel/contrib;site/contrib",
          -a => "$toplevel/utils;site/utils",
          -a => "$toplevel/t;site/t",
@@ -310,7 +313,6 @@
     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));
 }

Modified: branches/i18n-fixes/pkg/win32/svk.nsi
==============================================================================
--- branches/i18n-fixes/pkg/win32/svk.nsi	(original)
+++ branches/i18n-fixes/pkg/win32/svk.nsi	Mon Jul 16 20:52:35 2007
@@ -41,23 +41,30 @@
     SetOutPath $INSTDIR
     File /r ..\bin
     File /r ..\lib
-    File /r /x checkout ..\site
+    File /r ..\iconv
+    File /r /x t\checkout ..\site
     File /r ..\win32
-
+
 
+    ; in case of old installation
+    Delete "$INSTDIR\bin\svk.bat"
     Delete "$INSTDIR\svk.bat"
 
     ; Generate bootstrap batch file on the fly using $INSTDIR
-    FileOpen $1 "$INSTDIR\bin\svk.bat" w
+    FileOpen $1 "$INSTDIR\svk.bat" w
     FileWrite $1 "@echo off$\n"
+    FileWrite $1 "set APR_ICONV=$\"$INSTDIR\iconv$\"$\n"
+    FileWrite $1 "set OLDPATH=%PATH%$\n"
+    FileWrite $1 "set PATH=$INSTDIR\bin;%PATH%$\n"
     FileWrite $1 "if $\"%OS%$\" == $\"Windows_NT$\" goto WinNT$\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 "$\"$INSTDIR\bin\perl$\" $\"$INSTDIR\bin\svk$\" %1 %2 %3 %4 %5 %6 %7 %8 %9$\n"
+    FileWrite $1 "goto endofperl$\n"
     FileWrite $1 ":WinNT$\n"
-    FileWrite $1 "$\"%~dp0perl.exe$\" $\"%~dp0svk$\" %*$\n"
+    FileWrite $1 "$\"$INSTDIR\bin\perl$\" $\"$INSTDIR\bin\svk$\" %*$\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% == 9009 echo You do not have SVK installed correctly.$\n"
     FileWrite $1 "if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul$\n"
-    FileWrite $1 ":endofperl$\n"
+    FileWrite $1 "set PATH=%OLDPATH%$\n"
+    FileWrite $1 "set APR_ICONV=$\n"
     FileClose $1
 
     WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -74,8 +81,8 @@
 
 
 Done:
-    ; Add \bin directory to the PATH for svk.bat and DLLs
-    Push "$INSTDIR\bin"
+    ; Add  directory to the PATH for svk.bat and DLLs
+    Push $INSTDIR
     Call AddToPath
 SectionEnd
  


More information about the svk-commit mailing list