2012-01-29 09:10:37 +01:00
##############################################################################
2013-09-20 07:37:37 +02:00
# This optional file "builder-targets-cb.sh" will be called by builder.sh
#
2012-01-29 09:10:37 +01:00
# The targets will be called from thde opsi-builder using the following
2013-09-20 07:37:37 +02:00
# order: config, prepare, retrieve, create, package, publish, commit, cleanup
2012-01-29 09:10:37 +01:00
# You can overwrite the target functions in builder-targets-cb.sh
2013-09-20 07:37:37 +02:00
#
2012-01-29 09:10:37 +01:00
# You can define callback functions. The functions are called from
# opsi-builder within processing a target
# cb_package_makeproductfile
#
# You can use every variable defined in any configuration file or by
# the defined builder script itself. Also, calling the predefined
# targets builder_<targetname> is possible.
#
# Abstract:
# target order: config, prepare, retrieve, create, package, publish, commit, cleanup
# callbacks: <none>
#
##############################################################################
function cleanup( ) {
2013-09-20 07:37:37 +02:00
echo "Cleanup"
builder_cleanup
2012-01-29 09:10:37 +01:00
}
2012-02-04 18:20:26 +01:00
2013-03-18 05:58:53 +01:00
function retrieve( ) {
2013-09-20 07:37:37 +02:00
echo "Retrieve"
# work around big file download for verison change
2014-06-24 17:39:16 +02:00
local olddir = ` echo $DIST_CACHE_DIR | sed -e 's/\/[^\/]*$//' `
2013-09-20 07:37:37 +02:00
echo $olddir
mv $olddir /${ PN } -* tempsereby
mv tempsereby $DIST_CACHE_DIR
builder_retrieve
2013-03-18 05:58:53 +01:00
}
2013-08-31 21:50:40 +02:00
write_svcpack_file( ) {
local control_file = $1
local control_section = $2
local control_option = $3
local control_value = $4
sed -i -e " /^\[ $control_section \]/,/^\[.*\]/ s|^\( $control_option [ \t]*=[ \t]*\).* $|\1 $control_value | " " $control_file "
}
2013-03-18 05:58:53 +01:00
2013-09-20 07:37:37 +02:00
patch_package_xml( ) {
local xml_file = $1
local xml_path = $2
local xml_value = $3
mv ${ xml_file } ${ xml_file } .old
cat ${ xml_file } .old | tidy -utf8 -xml -w 255 -i -c -q -asxml | xmlstarlet ed -O -u " ${ xml_path } " -v " ${ xml_value } " | sed -e 's!>!>!g' -e 's!<!<!g' > ${ xml_file }
rm ${ xml_file } .old
}
2013-08-31 17:07:40 +02:00
2014-06-24 17:39:16 +02:00
patch_delete_xml( ) {
local xml_file = $1
local xml_path = $2
mv ${ xml_file } ${ xml_file } .old
cat ${ xml_file } .old | tidy -utf8 -xml -w 255 -i -c -q -asxml | xmlstarlet ed -O -d " ${ xml_path } " | sed -e 's!>!>!g' -e 's!<!<!g' > ${ xml_file }
rm ${ xml_file } .old
}
2013-09-20 07:37:37 +02:00
tidy_xml( ) {
local xml_file = $1
local xml_path = $2
local xml_value = $3
echo ${ xml_file }
mv ${ xml_file } ${ xml_file } .old
cat ${ xml_file } .old | tidy -utf8 -xml -w 255 -i -c -q -asxml | sed -e 's!>!>!g' -e 's!<!<!g' > ${ xml_file }
2014-04-12 20:28:47 +02:00
rm ${ xml_file } .old
2013-09-20 07:37:37 +02:00
}
2013-08-05 21:31:53 +02:00
2013-06-25 18:10:58 +02:00
2013-09-20 07:37:37 +02:00
function create( ) {
echo "Create"
builder_create
# ==========================================================================================================
# create directories and extract the runtime packages
# ==========================================================================================================
mkdir -p $INST_DIR /CLIENT_DATA/{ Install/Packages/BasicRuntimes,Install/Packages/Air,Config}
mkdir -p $INST_DIR /CLIENT_DATA/UnInstall/Packages/{ Flash,Shockwave,Silverlight}
2014-07-11 14:41:23 +02:00
7z x -o$INST_DIR /CLIENT_DATA/Install $INST_DIR /CLIENT_DATA/X86/${ DL_FILE [7] }
2013-09-20 07:37:37 +02:00
2014-02-22 10:27:31 +01:00
# ==========================================================================================================
# Place some tools for later use into the packages dir
# ==========================================================================================================
mv -v $INST_DIR /CLIENT_DATA/X86/GNU $INST_DIR /CLIENT_DATA/Install/Packages/GNU
2014-05-21 15:43:50 +02:00
mv -v $INST_DIR /CLIENT_DATA/X86/Unlocker $INST_DIR /CLIENT_DATA/Install/Packages/Unlocker
2014-02-22 10:27:31 +01:00
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# sed everything to disabled
# ==========================================================================================================
2014-06-24 17:39:16 +02:00
2014-07-11 14:41:23 +02:00
sed -e 's!\"1\"!\"0\"!g' -e 's!maximized=\"0\"!maximized=\"1\"!' $INST_DIR /CLIENT_DATA/WinPKG.xml > $INST_DIR /CLIENT_DATA/Config/WinPKG.xml
rm $INST_DIR /CLIENT_DATA/WinPKG.xml
2014-06-24 17:39:16 +02:00
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# extract .net 8.0 & 8.1 now so the unix2dos dont change the extracted files
# ==========================================================================================================
mkdir -p $INST_DIR /CLIENT_DATA/X86/win8xdotnet35
2014-06-24 21:38:56 +02:00
7z x -o$INST_DIR /CLIENT_DATA/X86/win8xdotnet35 $INST_DIR /CLIENT_DATA/X86/${ DL_FILE [8] } sources/sxs -r
2017-03-20 14:35:03 +01:00
#7z x -o$INST_DIR/CLIENT_DATA/X86/win8xdotnet35/sources/sxs $INST_DIR/CLIENT_DATA/X86/win8xdotnet35/sources/sxs/microsoft-windows-netfx3-ondemand-package.cab
2014-06-24 21:38:56 +02:00
7z x -y -o$INST_DIR /CLIENT_DATA/X86/win8xdotnet35 $INST_DIR /CLIENT_DATA/X86/${ DL_FILE [9] } sources/sxs -r
2017-03-20 14:35:03 +01:00
#7z x -y -o$INST_DIR/CLIENT_DATA/X86/win8xdotnet35/sources/sxs $INST_DIR/CLIENT_DATA/X86/win8xdotnet35/sources/sxs/microsoft-windows-netfx3-ondemand-package.cab
#rm -f $INST_DIR/CLIENT_DATA/X86/win8xdotnet35/sources/sxs/microsoft-windows-netfx3-ondemand-package.cab
2013-09-20 07:37:37 +02:00
# move the Windows 8 dotnet 2 - 3.5 in place
mv -v $INST_DIR /CLIENT_DATA/X86/win8xdotnet35/sources/sxs $INST_DIR /CLIENT_DATA/Install/NET/WIN8.X
# ==========================================================================================================
# extract Ricktendo AIO now so the unix2dos dont change the extracted files
# ==========================================================================================================
mkdir -p $INST_DIR /CLIENT_DATA/X86/Ricktendo
2014-05-21 15:07:06 +02:00
7z x -o$INST_DIR /CLIENT_DATA/X86/Ricktendo $INST_DIR /CLIENT_DATA/X86/${ DL_FILE [22] }
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# Integrate .net for win 8.0 into winpkg
# ==========================================================================================================
2014-06-25 08:52:46 +02:00
# create the needed install cmd script for win 8.x
echo "@echo off" > $INST_DIR /CLIENT_DATA/Install/NET/NETforWin8/NETEnable.bat
echo "SET NETDIR=%~dp0" >> $INST_DIR /CLIENT_DATA/Install/NET/NETforWin8/NETEnable.bat
echo "cd %NETDIR%\.." >> $INST_DIR /CLIENT_DATA/Install/NET/NETforWin8/NETEnable.bat
echo "SET NETPARENTDIR=%cd%" >> $INST_DIR /CLIENT_DATA/Install/NET/NETforWin8/NETEnable.bat
echo "echo Installing .NET Framwork 2.0 - 3.5.1" >> $INST_DIR /CLIENT_DATA/Install/NET/NETforWin8/NETEnable.bat
echo "dism /online /enable-feature /featurename:NetFx3 /All /Source:%NETPARENTDIR%\WIN8.X /LimitAccess" >> $INST_DIR /CLIENT_DATA/Install/NET/NETforWin8/NETEnable.bat
echo "" >> $INST_DIR /CLIENT_DATA/Install/NET/NETforWin8/NETEnable.bat
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# Replace the General Runtimes with the Msi version off GeosOne
# ==========================================================================================================
if [ " $GENERALUPDATE " = "1" ] ; then
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/BasicRuntimes
mv -v $INST_DIR /CLIENT_DATA/X86/Basic $INST_DIR /CLIENT_DATA/Install/Packages/BasicRuntimes/
fi
# ==========================================================================================================
# integrate Adobe AIR
# ==========================================================================================================
2015-06-10 11:12:10 +02:00
mv -v $INST_DIR /CLIENT_DATA/X86/air_${ AIRVERSION } _win.exe $INST_DIR /CLIENT_DATA/Install/Packages/Air/air_win.exe
2013-09-20 07:37:37 +02:00
mv -v $INST_DIR /CLIENT_DATA/AdobeAIR_package.xml $INST_DIR /CLIENT_DATA/Install/Packages/Air/package.xml
mv -v $INST_DIR /CLIENT_DATA/AdobeAIR_7zip_config.txt $INST_DIR /CLIENT_DATA/Install/Packages/Air/7zip_config.txt
2014-06-24 17:39:16 +02:00
sed -e 's/.*<\/settings>.*/\t<set component="AdobeAir" checked="0" \/>\n&/' -i $INST_DIR /CLIENT_DATA/Config/WinPKG.xml
2013-09-20 07:37:37 +02:00
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Air/package.xml "/package/check[@type='file']/@value" " ${ AIRVERSION } "
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Air/package.xml "/package[@id='AdobeAir']/@name" " Adobe AIR v ${ AIRVERSION } "
# Adobe AIR Installer not working very good from network share so create a sfx file that places the installer into a temp and let it run locally
2015-06-10 11:12:10 +02:00
7z a $INST_DIR /CLIENT_DATA/Install/Packages/Air/AdobeAIR.7z $INST_DIR /CLIENT_DATA/Install/Packages/Air/air_win.exe
2013-09-20 07:37:37 +02:00
cat $INST_DIR /CLIENT_DATA/X86/7ZipSFX/7zsd_All.sfx $INST_DIR /CLIENT_DATA/Install/Packages/Air/7zip_config.txt $INST_DIR /CLIENT_DATA/Install/Packages/Air/AdobeAIR.7z > $INST_DIR /CLIENT_DATA/Install/Packages/Air/AdobeAIR.exe
2015-06-10 11:12:10 +02:00
rm $INST_DIR /CLIENT_DATA/Install/Packages/Air/air_win.exe $INST_DIR /CLIENT_DATA/Install/Packages/Air/7zip_config.txt $INST_DIR /CLIENT_DATA/Install/Packages/Air/AdobeAIR.7z
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# Update Java
# ==========================================================================================================
2014-05-21 15:07:06 +02:00
2014-04-12 17:20:06 +02:00
if [ " $JRE8UPDATE " = "1" ] ; then
2018-02-28 23:30:36 +01:00
mkdir -p $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/{ x86,x64}
2014-04-12 17:20:06 +02:00
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/*/jre.exe
2015-10-23 19:17:31 +02:00
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/*/silent.bat
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/*.xml
mv -v $INST_DIR /CLIENT_DATA/Sereby_JRE8_package.xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/package.xml
mv -v $INST_DIR /CLIENT_DATA/Sereby_JRE8_x86_silent.bat $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/x86/silent.bat
2015-04-11 21:38:59 +02:00
mv $INST_DIR /CLIENT_DATA/X86/jre8u${ JRE8UVERSION } -b${ JRE8BUILD } -x86.exe $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/x86/jre.exe
2015-10-23 19:17:31 +02:00
mv -v $INST_DIR /CLIENT_DATA/Sereby_JRE8_x64_silent.bat $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/x64/silent.bat
2015-04-11 21:38:59 +02:00
mv $INST_DIR /CLIENT_DATA/X86/jre8u${ JRE8UVERSION } -b${ JRE8BUILD } -x64.exe $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/x64/jre.exe
2015-04-12 16:17:50 +02:00
patch_delete_xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/package.xml "/package/check[@type='os']"
2014-04-12 17:20:06 +02:00
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/package.xml "/package/variable[@name='NAME']/@value" " Java Runtime Environment 8 Update ${ JRE8UVERSION } "
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/package.xml "/package/variable[@name='BUILD']/@value" " ${ JRE8VERSION } "
fi
2014-06-24 17:39:16 +02:00
sed -e 's!/s!/s REBOOT=Suppress!' -i $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/package.xml
2014-04-12 17:20:06 +02:00
2016-08-27 20:00:14 +02:00
if [ " $JRE9UPDATE " = "1" ] ; then
mkdir -p $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/{ x86,x64}
2016-08-27 20:09:15 +02:00
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/*/jre.exe
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/*/silent.bat
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/*.xml
2016-08-27 20:00:14 +02:00
mv -v $INST_DIR /CLIENT_DATA/Sereby_JRE9_package.xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/package.xml
2018-02-28 23:30:36 +01:00
#mv -v $INST_DIR/CLIENT_DATA/Sereby_JRE9_x86_silent.bat $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v9/x86/silent.bat
#mv $INST_DIR/CLIENT_DATA/X86/jre9u${JRE9UVERSION}-b${JRE9BUILD}-x86.exe $INST_DIR/CLIENT_DATA/Install/Packages/JRE/v9/x86/jre.exe
2016-08-27 20:09:15 +02:00
mv -v $INST_DIR /CLIENT_DATA/Sereby_JRE9_x64_silent.bat $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/x64/silent.bat
2016-08-27 20:00:14 +02:00
mv $INST_DIR /CLIENT_DATA/X86/jre9u${ JRE9UVERSION } -b${ JRE9BUILD } -x64.exe $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/x64/jre.exe
2016-08-27 20:09:15 +02:00
patch_delete_xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/package.xml "/package/check[@type='os']"
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/package.xml "/package/variable[@name='NAME']/@value" " Java Runtime Environment 9 Update ${ JRE9UVERSION } (Early Access) "
2016-08-27 20:00:14 +02:00
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/package.xml "/package/variable[@name='BUILD']/@value" " ${ JRE9VERSION } "
fi
2016-08-27 20:09:15 +02:00
sed -e 's!/s!/s REBOOT=Suppress!' -i $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/package.xml
2016-08-27 20:00:14 +02:00
sed -e 's/.*<\/settings>.*/\t<set component="jre9" checked="0" \/>\n&/' -i $INST_DIR /CLIENT_DATA/Config/WinPKG.xml
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# Update Flash
# ==========================================================================================================
if [ " $FLASHUPDATE " = "1" ] ; then
rm -f $INST_DIR /CLIENT_DATA/Install/Packages/Flash/*.exe
mv $INST_DIR /CLIENT_DATA/X86/install_flash_player-${ FLASHVERSION } .exe $INST_DIR /CLIENT_DATA/Install/Packages/Flash/install_flash_player.exe
mv $INST_DIR /CLIENT_DATA/X86/install_flash_player_ax-${ FLASHAXVERSION } .exe $INST_DIR /CLIENT_DATA/Install/Packages/Flash/install_flash_player_ax.exe
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Flash/package.xml "/package/variable[@name='VERSION']/@value" " ${ FLASHVERSION } "
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Flash/package.xml "/package/variable[@name='VERSION_FILE']/@value" " ${ FLASHVERSION //./_ } "
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Flash/package.xml "/package/variable[@name='VERSION_FILE_AX']/@value" " ${ FLASHAXVERSION //./_ } "
fi
# sed force update on flash
2014-06-24 17:39:16 +02:00
sed -e 's!-install!-force -install!' -i $INST_DIR /CLIENT_DATA/Install/Packages/Flash/package.xml
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# Update Shockwave
# ==========================================================================================================
if [ " $SHOCKUPDATE " = "1" ] ; then
rm -f $INST_DIR /CLIENT_DATA/Install/Packages/Shockwave/*.msi
mv $INST_DIR /CLIENT_DATA/X86/sw_lic_full_installer-${ SHOCKVERSION } .msi $INST_DIR /CLIENT_DATA/Install/Packages/Shockwave/sw_lic_full_installer.msi
2014-01-29 23:07:44 +01:00
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Shockwave/package.xml "/package/variable[@name='BUILD']/@value" " ${ SHOCKVERSION //./ } "
2013-09-20 07:37:37 +02:00
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Shockwave/package.xml "/package[@id='AdobeShock']/@name" " Adobe Shockwave Player v ${ SHOCKVERSION } "
fi
# ==========================================================================================================
# Update Silverlight
# ==========================================================================================================
if [ " $SILVERUPDATE " = "1" ] ; then
rm -f $INST_DIR /CLIENT_DATA/Install/Packages/Silverlight/*.exe
mv $INST_DIR /CLIENT_DATA/X86/Silverlight-${ SILVERVERSION } .exe $INST_DIR /CLIENT_DATA/Install/Packages/Silverlight/Silverlight.exe
mv $INST_DIR /CLIENT_DATA/X86/Silverlight_x64-${ SILVERVERSION } .exe $INST_DIR /CLIENT_DATA/Install/Packages/Silverlight/Silverlight_x64.exe
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Silverlight/package.xml "/package/variable[@name='NAME']/@value" " Microsoft Silverlight v ${ SILVERVERSION } "
patch_package_xml $INST_DIR /CLIENT_DATA/Install/Packages/Silverlight/package.xml "/package/variable[@name='VERSION']/@value" " ${ SILVERVERSION } "
fi
# ==========================================================================================================
# Update J Sharp and add F Sharp
# ==========================================================================================================
if [ " $RICKTENDOJSHARPUPDATE " = "1" ] ; then
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/jsredist
mv $INST_DIR /CLIENT_DATA/X86/Ricktendo/vjsharp $INST_DIR /CLIENT_DATA/Install/Packages/jsredist/
mv -v $INST_DIR /CLIENT_DATA/Ricktendo_JS_package.xml $INST_DIR /CLIENT_DATA/Install/Packages/jsredist/package.xml
else
rm $INST_DIR /CLIENT_DATA/Ricktendo_JS_package.xml
fi
mv $INST_DIR /CLIENT_DATA/X86/Ricktendo/fsharp $INST_DIR /CLIENT_DATA/Install/Packages/fsredist/
mv -v $INST_DIR /CLIENT_DATA/Ricktendo_FS_package.xml $INST_DIR /CLIENT_DATA/Install/Packages/fsredist/package.xml
2014-06-24 17:39:16 +02:00
sed -e 's/.*<\/settings>.*/\t<set component="msfsharp" checked="0" \/>\n&/' -i $INST_DIR /CLIENT_DATA/Config/WinPKG.xml
2013-09-20 07:37:37 +02:00
2015-07-24 13:57:53 +02:00
# ==========================================================================================================
# Update .NET 4.6 with Ricktendo
# ==========================================================================================================
if [ " $RICKTENDONET46UPDATE " = "1" ] ; then
2015-12-17 15:45:38 +01:00
rm -rf $INST_DIR /CLIENT_DATA/Install/NET/4.6*
2015-07-24 13:57:53 +02:00
mkdir -p $INST_DIR /CLIENT_DATA/Install/NET/4.6
2016-09-02 14:04:53 +02:00
#mkdir -p $INST_DIR/CLIENT_DATA/X86/net46
#7z x -o$INST_DIR/CLIENT_DATA/X86/net46 $INST_DIR/CLIENT_DATA/X86/${DL_FILE[23]}
7z x -o$INST_DIR /CLIENT_DATA/Install/NET/4.6 $INST_DIR /CLIENT_DATA/X86/${ DL_FILE [23] }
#7z x -o$INST_DIR/CLIENT_DATA/Install/NET/4.6 $INST_DIR/CLIENT_DATA/X86/net46/*.exe
2015-10-22 12:35:38 +02:00
7z x -y -o$INST_DIR /CLIENT_DATA/Install/NET/4.6 $INST_DIR /CLIENT_DATA/X86/${ DL_FILE [24] }
2015-07-24 13:57:53 +02:00
mv -v $INST_DIR /CLIENT_DATA/Ricktendo_NET46_package.xml $INST_DIR /CLIENT_DATA/Install/NET/4.6/package.xml
else
rm $INST_DIR /CLIENT_DATA/Ricktendo_NET46_package.xml
2018-02-28 23:48:22 +01:00
mv -v $INST_DIR /CLIENT_DATA/Sereby_NET_package.xml $INST_DIR /CLIENT_DATA/Install/NET/4.7.1/package.xml
2015-07-24 13:57:53 +02:00
fi
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# Update MSVC
# ==========================================================================================================
if [ " $MSVCUPDATE " = "1" ] ; then
rm -rf $INST_DIR /CLIENT_DATA/Install/Packages/MSVC
mv -v $INST_DIR /CLIENT_DATA/X86/MSVC $INST_DIR /CLIENT_DATA/Install/Packages/MSVC
2018-02-28 23:30:36 +01:00
#else
#patch_delete_xml $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/package.xml "/package/install/cmd[@param='2005']"
#patch_delete_xml $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/package.xml "/package/install/cmd[@param='2008']"
#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
#sed -e 's!2008!2013!' -i $INST_DIR/CLIENT_DATA/Install/Packages/MSVC/uninstall_all.bat
2013-09-20 07:37:37 +02:00
fi
# ==========================================================================================================
# move the uninstallers in place (directory layout like the sereby package)
# ==========================================================================================================
2015-07-14 17:09:49 +02:00
mv -v $INST_DIR /CLIENT_DATA/X86/JavaRa* $INST_DIR /CLIENT_DATA/UnInstall/Packages/JRE
2013-09-20 07:37:37 +02:00
mv -v $INST_DIR /CLIENT_DATA/JavaUninstallScript.vbs $INST_DIR /CLIENT_DATA/UnInstall/Packages/JRE
mv -v $INST_DIR /CLIENT_DATA/CleanSilverlight.cmd $INST_DIR /CLIENT_DATA/UnInstall/Packages/Silverlight
mv -v $INST_DIR /CLIENT_DATA/X86/dotnet $INST_DIR /CLIENT_DATA/UnInstall/NET
mv -v $INST_DIR /CLIENT_DATA/X86/uninstall_flash_player-${ FLASHVERSION } .exe $INST_DIR /CLIENT_DATA/UnInstall/Packages/Flash/uninstall_flash_player.exe
mv -v $INST_DIR /CLIENT_DATA/X86/uninstall_shock_player-${ SHOCKVERSION } .exe $INST_DIR /CLIENT_DATA/UnInstall/Packages/Shockwave/uninstall_shock_player.exe
# ==========================================================================================================
# move the opsi wrapper to the right dir (close the error window if nothing needs to be done)
# ==========================================================================================================
mv -v $INST_DIR /CLIENT_DATA/opsi-WinPKG.exe $INST_DIR /CLIENT_DATA/Install/
# ==========================================================================================================
# Correct linefeed in config
# ==========================================================================================================
2014-06-24 17:39:16 +02:00
for file in ` find $INST_DIR /CLIENT_DATA/Install -type f -name "package.xml" `
do
echo " Cleanup $file "
tidy_xml $file
unix2dos $file
done
2013-09-20 07:37:37 +02:00
2013-09-20 10:49:43 +02:00
tidy_xml $INST_DIR /CLIENT_DATA/Config/WinPKG.xml
2013-09-20 07:37:37 +02:00
unix2dos $INST_DIR /CLIENT_DATA/Config/WinPKG.xml
# ==========================================================================================================
# Create a new sereby aio pack
# ==========================================================================================================
if [ " $CREATENEWSEREBY " = "1" ] ; then
2014-07-11 14:41:23 +02:00
sed -e 's!\"0\"!\"1\"!g' $INST_DIR /CLIENT_DATA/Config/WinPKG.xml > $INST_DIR /CLIENT_DATA/Install/WinPKG.xml
7z a $INST_DIR /CLIENT_DATA/X86/sereby/aio-runtimes.7z $INST_DIR /CLIENT_DATA/Install/*
rm $INST_DIR /CLIENT_DATA/Install/WinPKG.xml
mv -v $INST_DIR /CLIENT_DATA/AIO_7zip_config.txt $INST_DIR /CLIENT_DATA/X86/sereby/7zip_config.txt
2013-09-20 07:37:37 +02:00
mkdir -p $OPSI_REPOS_PRODUCT_DIR
2014-07-11 14:41:23 +02:00
cat $INST_DIR /CLIENT_DATA/X86/7ZipSFX/7zsd_All.sfx $INST_DIR /CLIENT_DATA/X86/sereby/7zip_config.txt $INST_DIR /CLIENT_DATA/X86/sereby/aio-runtimes.7z > $OPSI_REPOS_PRODUCT_DIR /$OPSI_REPOS_FILE_PATTERN .exe
2013-09-20 07:37:37 +02:00
fi
# ==========================================================================================================
# Disable Java Update check
# ==========================================================================================================
2014-04-12 17:20:06 +02:00
echo "@echo off" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/disable.bat
2014-05-22 22:38:50 +02:00
echo "if exist \"%PROGRAMFILES%\Java\jre8\bin\jqs.exe\" \"%PROGRAMFILES%\Java\jre8\bin\jqs.exe\" -unregister" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/disable.bat
echo "if exist \"%PROGRAMFILES(x86)%\Java\jre8\bin\jqs.exe\" \"%PROGRAMFILES(x86)%\Java\jre8\bin\jqs.exe\" -unregister" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/disable.bat
2014-04-12 17:20:06 +02:00
echo "REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/disable.bat
echo "REG DELETE HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/disable.bat
echo "verify" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/disable.bat
echo "" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/disable.bat
2014-06-24 17:39:16 +02:00
sed -e 's/.*<\/install>.*/\t\t<cmd path="disable.bat" name="Disable Java v8 Update Check " \/>\n&/' -i $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/package.xml
2014-04-12 17:20:06 +02:00
tidy_xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v8/package.xml
2016-08-27 20:00:14 +02:00
echo "@echo off" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/disable.bat
echo "if exist \"%PROGRAMFILES%\Java\jre9\bin\jqs.exe\" \"%PROGRAMFILES%\Java\jre9\bin\jqs.exe\" -unregister" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/disable.bat
echo "if exist \"%PROGRAMFILES(x86)%\Java\jre9\bin\jqs.exe\" \"%PROGRAMFILES(x86)%\Java\jre9\bin\jqs.exe\" -unregister" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/disable.bat
echo "REG DELETE HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/disable.bat
echo "REG DELETE HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run /v SunJavaUpdateSched /f" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/disable.bat
echo "verify" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/disable.bat
echo "" >> $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/disable.bat
sed -e 's/.*<\/install>.*/\t\t<cmd path="disable.bat" name="Disable Java v9 Update Check " \/>\n&/' -i $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/package.xml
tidy_xml $INST_DIR /CLIENT_DATA/Install/Packages/JRE/v9/package.xml
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# Disable Flash Update Check
# ==========================================================================================================
mv -v $INST_DIR /CLIENT_DATA/AdobeFlash_mms.cfg $INST_DIR /CLIENT_DATA/Install/Packages/Flash/mms.cfg
2014-06-24 17:39:16 +02:00
sed -e 's/.*<\/install>.*/\t\t<cmd path="disable32.bat" name="Disable Flash Update Check x86" arch="x86" >\n<check type="file" condition="notexist" path="%Windir%\\system32\\Macromed\\Flash\\NPSWF32_%VERSION_FILE%.dll" arch="x86" \/>\n<\/cmd>\n&/' -i $INST_DIR /CLIENT_DATA/Install/Packages/Flash/package.xml
sed -e 's/.*<\/install>.*/\t\t<cmd path="disable64.bat" name="Disable Flash Update Check x64" arch="x64" >\n<check type="file" condition="notexist" path="%Windir%\\SysWOW64\\Macromed\\Flash\\NPSWF32_%VERSION_FILE%.dll" arch="x64" \/>\n<\/cmd>\n&/' -i $INST_DIR /CLIENT_DATA/Install/Packages/Flash/package.xml
2013-09-20 07:37:37 +02:00
echo "@echo off" >> $INST_DIR /CLIENT_DATA/Install/Packages/Flash/disable32.bat
echo "copy /y /v \"%~dp0mms.cfg\" \"%WINDIR%\system32\Macromed\Flash\mms.cfg\"" >> $INST_DIR /CLIENT_DATA/Install/Packages/Flash/disable32.bat
echo "" >> $INST_DIR /CLIENT_DATA/Install/Packages/Flash/disable32.bat
echo "@echo off" >> $INST_DIR /CLIENT_DATA/Install/Packages/Flash/disable64.bat
echo "copy /y /v \"%~dp0mms.cfg\" \"%WINDIR%\SysWOW64\Macromed\Flash\mms.cfg\"" >> $INST_DIR /CLIENT_DATA/Install/Packages/Flash/disable64.bat
echo "" >> $INST_DIR /CLIENT_DATA/Install/Packages/Flash/disable64.bat
2013-09-20 10:49:43 +02:00
tidy_xml $INST_DIR /CLIENT_DATA/Install/Packages/Flash/package.xml
2013-09-20 07:37:37 +02:00
# ==========================================================================================================
# Posthooks: change linefeed, Set exec bit, delete temp
# ==========================================================================================================
find $INST_DIR /CLIENT_DATA -name *.bat -print0 | xargs -0 unix2dos
2014-02-22 21:16:14 +01:00
find $INST_DIR /CLIENT_DATA -name *.cmd -print0 | xargs -0 unix2dos
2013-09-20 07:37:37 +02:00
find $INST_DIR /CLIENT_DATA -name package.xml -print0 | xargs -0 unix2dos
# set exec bit on executeables
find $INST_DIR /CLIENT_DATA/Install/ -type f -print0 | xargs -0 chmod +x
find $INST_DIR /CLIENT_DATA/UnInstall/ -type f -print0 | xargs -0 chmod +x
find $INST_DIR /CLIENT_DATA -type d -print0 | xargs -0 chmod 755 -v
# delete the temp directory
rm -rf $INST_DIR /CLIENT_DATA/X86
2013-03-15 21:47:00 +01:00
}