$pwd = (Get-Item -Path ".\" -Verbose).FullName $clean24url = "http://clean.cs.ru.nl/download/Clean24/windows/Clean_2.4.zip" $clean24zip = $pwd + "\Clean_2.4.zip" $clean24path = $pwd + "\Clean 2.4" $itasksgit = "https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK.git" $itasksdir = "iTasks-SDK" $itaskspath = $pwd + "\" + $itasksdir $installationpath = $itaskspath + "\Installation" $itasksinstall = $installationpath + "\OS-Windows-32" $itaskspatches = $installationpath + "\Files" $cleandevpath = $pwd + "\Clean Dev" $cleandevconfig = $cleandevpath + "\Config" if (Test-Path $clean24zip) { echo "Clean 2.4 already downloaded" } else { echo "Downloading Clean 2.4" $client = new-object System.Net.WebClient $client.DownloadFile($clean24url, $clean24zip) } function Expand-ZIPFile($file, $destination) { $shell = new-object -com shell.application $zip = $shell.NameSpace($file) foreach($item in $zip.items()) { $shell.Namespace($destination).copyhere($item) } } if (Test-Path $clean24path) { echo "Clean 2.4 already extracted" } else { echo "Extracting Clean 2.4" Expand-ZIPFile –File $clean24zip –Destination $pwd } if (Test-Path $itaskspath) { echo "iTasks-SDK already exported" } else { echo "Exporting latest iTasks from git" git clone --depth 1 $itasksgit cd $itaskspath git submodule update --init --recursive $gitpath1 = $itaskspath + "\.git" $gitpath2 = $itaskspath + "\Binaries\.git" $gitpath3 = $itaskspath + "\Dependencies\clean-platform\.git" $gitpath4 = $itaskspath + "\Dependencies\clean-sapl\.git" Remove-Item -Recurse -Force $gitpath1 Remove-Item -Recurse -Force $gitpath2 Remove-Item -Recurse -Force $gitpath3 Remove-Item -Recurse -Force $gitpath4 } if (Test-Path $cleandevpath) { echo "Clean Dev already exists. Please (re)move it first." Break } echo "Copying Clean 2.4 tot Clean Dev" Copy-Item $clean24path $cleandevpath -recurse echo "Copying new IDE" Copy-Item ($itasksinstall + "\CleanIDE.exe") ($cleandevpath + "\CleanIDE.exe") echo "Copying IDE configuration" Copy-Item ($pwd + "\IDEEnvs") $cleandevconfig Copy-Item ($pwd + "\IDEPrefs") $cleandevconfig echo "Copying SAPL files" Copy-Item ($itaskspatches + "\Sapl") ($cleandevpath + "\Libraries\StdEnv") -recurse echo "Copying RTS" Copy-Item ($itaskspatches + "\_system.abc") ($cleandevpath + "\Libraries\StdEnv\Clean System Files") -recurse echo "Copying iTasks" Copy-Item $itaskspath $cleandevpath -recurse