2012-01-29 09:10:37 +01:00
|
|
|
##############################################################################
|
|
|
|
# This optional file "builder-targets-cb.sh" will be called by builder.sh
|
|
|
|
#
|
|
|
|
# The targets will be called from thde opsi-builder using the following
|
|
|
|
# order: config, prepare, retrieve, create, package, publish, commit, cleanup
|
|
|
|
# You can overwrite the target functions in builder-targets-cb.sh
|
|
|
|
#
|
|
|
|
# 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() {
|
2012-02-06 19:31:41 +01:00
|
|
|
echo "Cleanup"
|
2012-02-05 20:33:48 +01:00
|
|
|
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() {
|
|
|
|
echo "Retrieve"
|
|
|
|
# work around big file download for verison change
|
|
|
|
local olddir=`echo $DIST_CACHE_DIR | sed -e "s/\/[^\/]*$//"`
|
|
|
|
echo $olddir
|
|
|
|
mv $olddir/${PN}-* tempsereby
|
|
|
|
mv tempsereby $DIST_CACHE_DIR
|
|
|
|
builder_retrieve
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-15 21:47:00 +01:00
|
|
|
function create() {
|
|
|
|
echo "Create"
|
|
|
|
builder_create
|
|
|
|
|
|
|
|
# create directories and extract the runtime packages
|
|
|
|
mkdir -p $INST_DIR/CLIENT_DATA/{Install,Config,X86/Dimpel}
|
|
|
|
mkdir -p $INST_DIR/CLIENT_DATA/UnInstall/Packages/{Flash,Shockwave}
|
|
|
|
7z x -o$INST_DIR/CLIENT_DATA/Install $INST_DIR/CLIENT_DATA/X86/svcpack/aio-runtimes.exe
|
|
|
|
7z x -o$INST_DIR/CLIENT_DATA/X86/Dimpel $INST_DIR/CLIENT_DATA/X86/dimpel/svcpack/aio-runtimes.exe
|
|
|
|
|
2013-03-18 06:18:13 +01:00
|
|
|
# update parts of the sereby with the Dimple package (Dimpel just updates everything exept dotnet)
|
2013-03-15 21:47:00 +01:00
|
|
|
# rsync -a $INST_DIR/CLIENT_DATA/X86/Dimpel/Packages/JRE/* $INST_DIR/CLIENT_DATA/Install/Packages/JRE
|
2013-04-01 17:38:49 +02:00
|
|
|
#rsync -a $INST_DIR/CLIENT_DATA/X86/Dimpel/Packages/Flash/* $INST_DIR/CLIENT_DATA/Install/Packages/Flash
|
2013-03-15 21:47:00 +01:00
|
|
|
# rsync -a $INST_DIR/CLIENT_DATA/X86/Dimpel/Packages/Shockwave/* $INST_DIR/CLIENT_DATA/Install/Packages/Shockwave
|
2013-04-01 17:38:49 +02:00
|
|
|
#rsync -a $INST_DIR/CLIENT_DATA/X86/Dimpel/Packages/Silverlight/* $INST_DIR/CLIENT_DATA/Install/Packages/Silverlight
|
2013-03-15 21:47:00 +01:00
|
|
|
|
2013-03-18 05:58:53 +01:00
|
|
|
# move the Windows 8 dotnet 2 - 3.5 in place
|
|
|
|
mv -v $INST_DIR/CLIENT_DATA/X86/win8dotnet35/sources/sxs $INST_DIR/CLIENT_DATA/Install/NET8
|
2013-04-05 11:03:03 +02:00
|
|
|
|
|
|
|
# Serby and its hacks workaround (sereby pack wants to copy a file on install but thats not possible on a readonly device in opsi
|
|
|
|
# move the combined x86/x64 to a common name
|
|
|
|
mv $INST_DIR/CLIENT_DATA/Install/NET/3.5 $INST_DIR/CLIENT_DATA/Install/NET/35
|
|
|
|
# recreate the new dir
|
|
|
|
mkdir -p $INST_DIR/CLIENT_DATA/Install/NET/3.5
|
|
|
|
# move the common dir to the x86 name under the new dir
|
|
|
|
mv $INST_DIR/CLIENT_DATA/Install/NET/35 $INST_DIR/CLIENT_DATA/Install/NET/3.5/x86
|
|
|
|
# remove the copy from the install.bat
|
|
|
|
sed -e '/^copy/d' -i $INST_DIR/CLIENT_DATA/Install/NET/3.5/x86/_Install.bat
|
|
|
|
# move the package.xml un dir up
|
|
|
|
mv $INST_DIR/CLIENT_DATA/Install/NET/3.5/x86/package.xml $INST_DIR/CLIENT_DATA/Install/NET/3.5
|
|
|
|
# now link copy the x86 dir to x64
|
|
|
|
cp -al $INST_DIR/CLIENT_DATA/Install/NET/3.5/x86 $INST_DIR/CLIENT_DATA/Install/NET/3.5/x64
|
|
|
|
# do the copy for x86 (seded away erlyer)
|
|
|
|
mv $INST_DIR/CLIENT_DATA/Install/NET/3.5/x86/vs_setup_x86.msi $INST_DIR/CLIENT_DATA/Install/NET/3.5/x86/vs_setup.msi
|
|
|
|
mv $INST_DIR/CLIENT_DATA/Install/NET/3.5/x86/setup_x86.sdb $INST_DIR/CLIENT_DATA/Install/NET/3.5/x86/setup.sdb
|
|
|
|
# do the copy for x64 (seded away erlyer)
|
|
|
|
mv $INST_DIR/CLIENT_DATA/Install/NET/3.5/x64/vs_setup_x64.msi $INST_DIR/CLIENT_DATA/Install/NET/3.5/x64/vs_setup.msi
|
|
|
|
mv $INST_DIR/CLIENT_DATA/Install/NET/3.5/x64/setup_x64.sdb $INST_DIR/CLIENT_DATA/Install/NET/3.5/x64/setup.sdb
|
|
|
|
# create a new install.bat that calls the right setup from the right dir
|
|
|
|
echo "@echo off" >> $INST_DIR/CLIENT_DATA/Install/NET/3.5/_Install.bat
|
|
|
|
echo "set arch=%1" >> $INST_DIR/CLIENT_DATA/Install/NET/3.5/_Install.bat
|
|
|
|
echo "call %~dp0\%arch%\_Install.bat" >> $INST_DIR/CLIENT_DATA/Install/NET/3.5/_Install.bat
|
2013-03-18 05:58:53 +01:00
|
|
|
|
2013-03-15 21:47:00 +01:00
|
|
|
# sed everything to disabled
|
2013-03-17 08:58:03 +01:00
|
|
|
sed -e "s!\"1\"!\"0\"!g" -e "s!maximized=\"0\"!maximized=\"1\"!" $INST_DIR/CLIENT_DATA/X86/WinPKG.xml > $INST_DIR/CLIENT_DATA/Config/WinPKG.xml
|
2013-03-15 21:47:00 +01:00
|
|
|
|
2013-04-04 07:15:53 +02:00
|
|
|
# sed force update on flash
|
|
|
|
sed -e "s!-install!-force -install!" -i $INST_DIR/CLIENT_DATA/Install/Packages/Flash/package.xml
|
|
|
|
|
2013-03-15 21:47:00 +01:00
|
|
|
# move the uninstallers in place (directory layout like the sereby package)
|
|
|
|
mv -v $INST_DIR/CLIENT_DATA/X86/JavaRa $INST_DIR/CLIENT_DATA/UnInstall/Packages/JRE
|
|
|
|
mv -v $INST_DIR/CLIENT_DATA/JavaUninstallScript.vbs $INST_DIR/CLIENT_DATA/UnInstall/Packages/JRE
|
|
|
|
mv -v $INST_DIR/CLIENT_DATA/X86/dotnet $INST_DIR/CLIENT_DATA/UnInstall/NET
|
|
|
|
mv -v $INST_DIR/CLIENT_DATA/X86/uninstall_flash_player.exe $INST_DIR/CLIENT_DATA/UnInstall/Packages/Flash
|
|
|
|
mv -v $INST_DIR/CLIENT_DATA/X86/uninstall_shock_player.exe $INST_DIR/CLIENT_DATA/UnInstall/Packages/Shockwave
|
|
|
|
|
|
|
|
# delete the temp directory
|
|
|
|
rm -rf $INST_DIR/CLIENT_DATA/X86
|
|
|
|
}
|