# HG changeset patch # User Claus Gittinger # Date 1004104428 -7200 # Node ID aa8927693ebf5c8a184c59ee359757e862a1720b # Parent f62b52f0bb20116714846ff061a80305e354f75f full installation under win32 (there is no tar ) diff -r f62b52f0bb20 -r aa8927693ebf STXInstaller.st --- a/STXInstaller.st Fri Oct 26 13:56:51 2001 +0200 +++ b/STXInstaller.st Fri Oct 26 15:53:48 2001 +0200 @@ -441,20 +441,25 @@ actionTextHolder value:nil. actionTextHolder value:msg. - cmd := '(cd ' , topDir , ' ; tar cf - .) | (cd ' , fullDir , ' ; tar xvf -)'. -"/ "/ -"/ "/ not all systems have cp -rv -"/ "/ -"/ OperatingSystem getOSType = 'linux' ifTrue:[ -"/ cmd := 'cp -rv ../../* ' , fullDir. -"/ ]. -"/ commandTraceView showCR:cmd , ' ...'. - commandTraceView showCR:'copying ...'. - commandTraceView endEntry. - cmd := cmd , ' 2>&1' . + actionPercentageHolder value:-1. + OperatingSystem isUNIXlike ifTrue:[ + cmd := '(cd ' , topDir , ' ; tar cf - .) | (cd ' , fullDir , ' ; tar xvf -)'. + commandTraceView showCR:'copying ...'. + commandTraceView endEntry. + cmd := cmd , ' 2>&1' . - self executeCommandAndShowOutput:cmd emphasize:false. + self executeCommandAndShowOutput:cmd emphasize:false. + ] ifFalse:[ + self halt. + fullDir asFilename exists ifFalse:[ + commandTraceView showCR:(resources string:'creating %1 ...' with:fullDir asFilename pathName). + commandTraceView endEntry. + OperatingSystem recursiveCreateDirectory:fullDir asFilename pathName + ]. + self recursiveCopy:(topDir , '\*') to:fullDir. + ]. + actionPercentageHolder value:100. ^ true ]. @@ -1461,12 +1466,15 @@ (OperatingSystem recursiveRemoveDirectory:whichDir) ifFalse:[ - self warn:(resources string:'mhmh - could not remove old installation. + OperatingSystem removeDirectory:whichDir. + whichDir asFilename exists ifTrue:[ + self warn:(resources string:'mhmh - could not remove old installation. Please remove it manually (using administrator privileges if required) and try again.'). - box destroy. - ^ false + box destroy. + ^ false + ] ]. box destroy