Issue #2033 - msi build updates
Former-commit-id:e46254cef1
[formerly 18394168994e3683ecd2ba114be12ba2a547b62c] Former-commit-id:7208eadbfb
This commit is contained in:
parent
e18b0d7e6a
commit
3bf9b72f52
1 changed files with 21 additions and 4 deletions
|
@ -1,19 +1,35 @@
|
||||||
function installCAVERepository([string]$feature_group, [string]$repo)
|
function installCAVERepository([string]$feature_group, [string]$component, [string]$repo)
|
||||||
{
|
{
|
||||||
|
$component_zip = $component + ".zip"
|
||||||
|
New-Item -path ${A2_PREPARE_CAVE_DIR} `
|
||||||
|
-name $component -type directory | Out-Null
|
||||||
|
if ($? -ne $true) { EXIT 1; }
|
||||||
|
pushd .
|
||||||
|
cd ${A2_PREPARE_CAVE_DIR}/$component
|
||||||
|
jar xvf ${A2_PREPARE_CAVE_DIR}/$component_zip
|
||||||
|
popd
|
||||||
|
|
||||||
$repo_zip = $repo + ".zip"
|
$repo_zip = $repo + ".zip"
|
||||||
New-Item -path ${A2_PREPARE_CAVE_DIR} `
|
New-Item -path ${A2_PREPARE_CAVE_DIR} `
|
||||||
-name $repo -type directory | Out-Null
|
-name $repo -type directory | Out-Null
|
||||||
if ($? -ne $true) { EXIT 1; }
|
if ($? -ne $true) { EXIT 1; }
|
||||||
pushd .
|
pushd .
|
||||||
cd ${A2_PREPARE_CAVE_DIR}/$repo
|
cd ${A2_PREPARE_CAVE_DIR}/$repo
|
||||||
jar xvf ${A2_PREPARE_CAVE_DIR}/$repo_zip
|
jar xvf ${A2_PREPARE_CAVE_DIR}/$component/awips2/cave/.repository/$repo_zip
|
||||||
popd
|
popd
|
||||||
|
|
||||||
.\cave.exe -nosplash -application org.eclipse.equinox.p2.director `
|
.\cave.exe -nosplash -application org.eclipse.equinox.p2.director `
|
||||||
-i $feature_group -repository "file:${A2_PREPARE_CAVE_DIR}/$repo" | Out-Host
|
-i $feature_group -repository "file:${A2_PREPARE_CAVE_DIR}/$repo" | Out-Host
|
||||||
if ($? -ne $true) { echo "ERROR: Unable to install feature: $feature_group."; echo "FATAL: Build Failed!"; EXIT 1; }
|
if ($? -ne $true) { echo "ERROR: Unable to install feature: $feature_group."; echo "FATAL: Build Failed!"; EXIT 1; }
|
||||||
|
|
||||||
Remove-Item -recurse -force ${A2_PREPARE_CAVE_DIR}/$repo
|
$etc_directory = ${A2_PREPARE_CAVE_DIR} + "\" + ${component} + "\awips2\cave\etc"
|
||||||
|
if ( Test-Path ${etc_directory} ) {
|
||||||
|
echo "Copying etc directory to destination ..."
|
||||||
|
Copy-Item ${etc_directory} -destination ${A2_PREPARE_CAVE_DIR}\cave -recurse -force
|
||||||
|
if ($? -ne $true) { EXIT 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
Remove-Item -recurse -force ${A2_PREPARE_CAVE_DIR}/$component
|
||||||
if ($? -ne $true) { EXIT 1; }
|
if ($? -ne $true) { EXIT 1; }
|
||||||
|
|
||||||
echo "`n"
|
echo "`n"
|
||||||
|
@ -30,10 +46,11 @@ foreach ($feature in $feature_list)
|
||||||
{
|
{
|
||||||
Write-Host Installing Feature: $feature
|
Write-Host Installing Feature: $feature
|
||||||
$feature_group = $feature + ".feature.group"
|
$feature_group = $feature + ".feature.group"
|
||||||
|
$component = $feature + "-win32.x86"
|
||||||
$repo = $feature + "-repo-win32.x86"
|
$repo = $feature + "-repo-win32.x86"
|
||||||
|
|
||||||
installCAVERepository -feature_group "$feature_group" `
|
installCAVERepository -feature_group "$feature_group" `
|
||||||
-repo "$repo"
|
-component "$component" -repo $repo
|
||||||
}
|
}
|
||||||
popd
|
popd
|
||||||
EXIT 0
|
EXIT 0
|
Loading…
Add table
Reference in a new issue