From 700a89951dd3150ce2f8a50c174cf8a4e5430c16 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Fri, 21 Feb 2014 13:35:12 +0100 Subject: [PATCH] next run on correcting msvc update --- CLIENT_DATA/MSVC05_x64_Install.cmd | 9 +++++++-- CLIENT_DATA/MSVC05_x86_Install.cmd | 27 +++++++++------------------ CLIENT_DATA/MSVC08_x64_Install.cmd | 13 +++++++------ CLIENT_DATA/MSVC08_x86_Install.cmd | 25 ++++++++----------------- builder-targets-cb.sh | 14 +++++++------- 5 files changed, 38 insertions(+), 50 deletions(-) diff --git a/CLIENT_DATA/MSVC05_x64_Install.cmd b/CLIENT_DATA/MSVC05_x64_Install.cmd index 68a3f07..d0e1ab8 100644 --- a/CLIENT_DATA/MSVC05_x64_Install.cmd +++ b/CLIENT_DATA/MSVC05_x64_Install.cmd @@ -1,4 +1,8 @@ @Echo off +SET VCDIR=%~dp0 +cd %VCDIR%\.. +SET SEDPARENTDIR=%cd% + if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) "%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( @@ -30,13 +34,14 @@ if exist "%temp%\list.txt" (del "%temp%\list.txt") echo Uninstalling existing Visual C++ %arch% Runtime Redistributables echo (please wait as this process may take a few moments) - wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable%%'" get name >>"%temp%\list.txt" +%SEDPARENTDIR%\sed\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt" + for /f "usebackq skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where name='%%a' call uninstall /nointeractive) del "%temp%\list.txt" -"%windir%\system32\msiexec.exe" /i vcredist.msi /q transforms=2k5-x64.mst +"%windir%\system32\msiexec.exe" /i %VCDIR%\vcredist.msi /q %VCDIR%\transforms=2k5-x64.mst :eof diff --git a/CLIENT_DATA/MSVC05_x86_Install.cmd b/CLIENT_DATA/MSVC05_x86_Install.cmd index 1741c3b..e032126 100644 --- a/CLIENT_DATA/MSVC05_x86_Install.cmd +++ b/CLIENT_DATA/MSVC05_x86_Install.cmd @@ -1,4 +1,8 @@ @Echo off +SET VCDIR=%~dp0 +cd %VCDIR%\.. +SET SEDPARENTDIR=%cd% + if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) "%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( @@ -27,30 +31,17 @@ goto :eof if exist "%temp%\list.txt" (del "%temp%\list.txt") -if %arch% neq x64 goto :x64skip echo Uninstalling existing Visual C++ x86 Runtime Redistributables echo (please wait as this process may take a few moments) -reg query hklm\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall /f "Microsoft Visual C++ 2005 Redistributable" /s >>"%temp%\list.txt" +wmic product where "name like 'Microsoft Visual C++ 2005 Redistributable - x86%%'" get name >>"%temp%\list.txt" -for /f "delims=\ tokens=8" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) +%SEDPARENTDIR%\sed\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt" + +for /f "skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where "name like '%%a%'" call uninstall /nointeractive) del "%temp%\list.txt" -goto :install - -:x64skip -echo Uninstalling existing Visual C++ %arch% Runtime Redistributables -echo (please wait as this process may take a few moments) - -reg query hklm\software\microsoft\windows\currentversion\uninstall /f "Microsoft Visual C++ 2005 Redistributable" /s >>"%temp%\list.txt" - -for /f "delims=\ tokens=7" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) - -del "%temp%\list.txt" - -:install - -"%windir%\system32\msiexec.exe" /i vcredist.msi /q transforms=2k5-x86.mst +"%windir%\system32\msiexec.exe" /i %VCDIR%\vcredist.msi /q %VCDIR%\transforms=2k5-x86.mst :eof diff --git a/CLIENT_DATA/MSVC08_x64_Install.cmd b/CLIENT_DATA/MSVC08_x64_Install.cmd index 561a3e0..0eafb56 100644 --- a/CLIENT_DATA/MSVC08_x64_Install.cmd +++ b/CLIENT_DATA/MSVC08_x64_Install.cmd @@ -1,4 +1,8 @@ @Echo off +SET VCDIR=%~dp0 +cd %VCDIR%\.. +SET SEDPARENTDIR=%cd% + if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) "%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( @@ -30,17 +34,14 @@ if exist "%temp%\list.txt" (del "%temp%\list.txt") echo Uninstalling existing Visual C++ %arch% Runtime Redistributables echo (please wait as this process may take a few moments) -rem reg query hklm\software\microsoft\windows\currentversion\uninstall /f "Microsoft Visual C++ 2008 Redistributable" /s >>"%temp%\list.txt" - -rem for /f "delims=\ tokens=7" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) - wmic product where "name like 'Microsoft Visual C++ 2008 Redistributable - x64%%'" get name >>"%temp%\list.txt" +%SEDPARENTDIR%\sed\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt" + for /f "usebackq skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where name='%%a' call uninstall /nointeractive) - del "%temp%\list.txt" -"%windir%\system32\msiexec.exe" /i vc_red.msi /q transforms=2k8-x64.mst +"%windir%\system32\msiexec.exe" /i %VCDIR%\vc_red.msi /q %VCDIR%\transforms=2k8-x64.mst :eof diff --git a/CLIENT_DATA/MSVC08_x86_Install.cmd b/CLIENT_DATA/MSVC08_x86_Install.cmd index d065008..2f470fe 100644 --- a/CLIENT_DATA/MSVC08_x86_Install.cmd +++ b/CLIENT_DATA/MSVC08_x86_Install.cmd @@ -1,4 +1,8 @@ -rem @Echo off +@Echo off +SET VCDIR=%~dp0 +cd %VCDIR%\.. +SET SEDPARENTDIR=%cd% + if exist "%PROGRAMFILES(X86)%" (set arch=x64) ELSE (set arch=x86) "%windir%\system32\reg.exe" query "HKU\S-1-5-19" >nul 2>&1 && ( @@ -26,31 +30,18 @@ goto :eof :checkok if exist "%temp%\list.txt" (del "%temp%\list.txt") -if exist "%temp%\list1.txt" (del "%temp%\list1.txt") echo Uninstalling existing Visual C++ x86 Runtime Redistributables echo (please wait as this process may take a few moments) -rem reg query hklm\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall /f "Microsoft Visual C++ 2008 Redistributable" /s >>"%temp%\list.txt" - -rem for /f "delims=\ tokens=8" %%a in ('type "%temp%\list.txt"') do ("%windir%\system32\msiexec.exe" /X%%a /q) - wmic product where "name like 'Microsoft Visual C++ 2008 Redistributable - x86%%'" get name >>"%temp%\list.txt" -setLocal EnableDelayedExpansion -set name=%~1 -for /f "tokens=* delims= " %%a in ('type "%temp%\list.txt"') do ( -set str=%%a -set str=!str:###=%name%! -echo !str! >> "%temp%\list1.txt" -) +%SEDPARENTDIR%\sed\sed.exe -e 's/[ \t]*$//' -i "%temp%\list.txt" -for /f "skip=1 delims=" %%a in ('type "%temp%\list1.txt"') do (wmic product where "name like '%%a%'" call uninstall /nointeractive) -for /f "skip=1 delims=" %%a in ('type "%temp%\list1.txt"') do (echo "%%a") +for /f "skip=1 delims=" %%a in ('type "%temp%\list.txt"') do (wmic product where "name like '%%a%'" call uninstall /nointeractive) del "%temp%\list.txt" -del "%temp%\list1.txt" -rem "%windir%\system32\msiexec.exe" /i vc_red.msi /q transforms=2k8-x86.mst +"%windir%\system32\msiexec.exe" /i %VCDIR%\vc_red.msi /q %VCDIR%\transforms=2k8-x86.mst :eof diff --git a/builder-targets-cb.sh b/builder-targets-cb.sh index 714eac3..e46efba 100644 --- a/builder-targets-cb.sh +++ b/builder-targets-cb.sh @@ -215,8 +215,8 @@ function create() { if [ "$RICKTENDONET40UPDATE" = "1" ]; then rm -rf $INST_DIR/CLIENT_DATA/Install/NET/4.0/* - 7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.0 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[19]} - #7z x -y -o$INST_DIR/CLIENT_DATA/Install/NET/4.0 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[20]} + 7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.0 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[21]} + #7z x -y -o$INST_DIR/CLIENT_DATA/Install/NET/4.0 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[22]} mv -v $INST_DIR/CLIENT_DATA/Ricktendo_NET40_package.xml $INST_DIR/CLIENT_DATA/Install/NET/4.0/package.xml else rm $INST_DIR/CLIENT_DATA/Ricktendo_NET40_package.xml @@ -224,8 +224,8 @@ function create() { if [ "$RICKTENDONET45UPDATE" = "1" ]; then rm -rf $INST_DIR/CLIENT_DATA/Install/NET/4.5.1/* - 7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.5.1 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[21]} - #7z x -y -o$INST_DIR/CLIENT_DATA/Install/NET/4.5.1 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[22]} + 7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.5.1 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[23]} + #7z x -y -o$INST_DIR/CLIENT_DATA/Install/NET/4.5.1 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[24]} mv -v $INST_DIR/CLIENT_DATA/Ricktendo_NET451_package.xml $INST_DIR/CLIENT_DATA/Install/NET/4.5.1/package.xml else rm $INST_DIR/CLIENT_DATA/Ricktendo_NET451_package.xml @@ -240,9 +240,9 @@ function create() { mv -v $INST_DIR/CLIENT_DATA/X86/MSVC $INST_DIR/CLIENT_DATA/Install/Packages/MSVC else mv -v $INST_DIR/CLIENT_DATA/X86/sed/bin $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/sed - sed -e "s!vcredist.msi!Install.cmd!" -i $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/package.xml - mv -v $INST_DIR/CLIENT_DATA/MSVC05_x64_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x64/msvc_05/Install.cmd - mv -v $INST_DIR/CLIENT_DATA/MSVC05_x86_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x86/msvc_05/Install.cmd +# sed -e "s!vcredist.msi!Install.cmd!" -i $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/package.xml +# mv -v $INST_DIR/CLIENT_DATA/MSVC05_x64_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x64/msvc_05/Install.cmd +# mv -v $INST_DIR/CLIENT_DATA/MSVC05_x86_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x86/msvc_05/Install.cmd sed -e "s!vc_red.msi!Install.cmd!" -i $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/package.xml mv -v $INST_DIR/CLIENT_DATA/MSVC08_x64_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x64/msvc_08/Install.cmd mv -v $INST_DIR/CLIENT_DATA/MSVC08_x86_Install.cmd $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/x86/msvc_08/Install.cmd