0

这个问题是对 Netrunner 的问题的跟进根据 Eric Englund 的回复,我能够通过创建我自己的 jacorb 的 OSGi 包、在本地安装并相应地更新 mil.jpeojtrs.sca/releng 中的 pom.xml 文件来打包和安装 mil.jpeojtrs.sca。

但是,Netrunner 在尝试安装 gov.redhawk.core 时也会出现同样的问题... nxm-ui 存储库指向 redhawk.sdr.org 存储库:

http://download.redhawksdr.org/nxm-rcp/releases/1.0

与 jacorb 不同,我找不到可以捆绑的等效包。正如 Netrunner 所问,这是一个独特的、REDHAWK 开发的软件包吗?如果是这样,是否可以在 github 上访问它,以便我们也可以在必要时构建自己的包?如果没有,您能否为我们指出一个等效的包?

4

1 回答 1

1

IDE 可以从源代码构建,但目前需要一些工作。以下是您可以采取的步骤以及自动化该过程的脚本。这只是一个示例,应根据您的需要进行修改。

  1. 您需要为许多插件创建更新站点,使用 REDHAWK 1.9.0 IDE 相当容易。

    • 打开你的 1.9.0 IDE。文件 -> 新建 -> 项目。选中显示所有向导复选框。输入“更新”以过滤到“更新站点项目”
    • 可能会提示您启用插件项目的开发,点击确定。
    • 为项目命名并单击完成。
    • 添加一个类别,提供一个 ID 和名称并不重要,但它是必需的。
    • 现在添加以下功能:

    --- org.jacorb - 不打包为 Internet 上任何地方的更新站点

    --- org.eclipse.nebula.widgets.xviewer.feature - 这只是因为 nebula 特性没有稳定的 API 并且自 1.9.0 构建以来发生了变化

    --- org.python.pydev.feature - 自 1.9.0 构建以来,Pydev API 也发生了变化

    • 单击全部构建。复制此更新站点的位置。要查找位置,您可以右键单击 site.xml 并选择属性。所需路径是包含 site.xml 的文件夹
  2. 复制下面的脚本,将其放入一个空文件夹并更改 LOCAL_P2 变量以指向这个新生成的 P2 站点。

  3. 使用 chmod +x 使脚本可执行
  4. 运行脚本。这可能需要一段时间,但它会克隆所有存储库、制作适当的补丁并构建 IDE 产品。

同样,这应该仅作为示例,而不是作为 IDE 的构建系统。另请注意,这是构建 1.9.0,需要进行修改才能构建 IDE 的 develop-1.10 和 develo-1.9 分支。

#!/bin/bash

function error() {
        printf "\n\nREDHAWK IDE BUILD Failed!\n\n"
        exit 1
}

LOCAL_P2="/home/ylb/exampleLocation"

MVN="mvn"
MVN_PHASE="clean verify"
GIT="git"
REDHAWK_VERSION="develop-1.9"
MINOR_VERSION="1.9.0"

BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

MIL_GIT="https://github.com/RedhawkSDR/eclipse-mil.jpeojtrs.sca.git"
MIL_BRANCH=${REDHAWK_VERSION}
MIL_P2="-Dmil.jpeojtrs.sca=file:///${BASEDIR}/mil.jpeojtrs.sca/releng/p2/target/repository"

CORE_GIT="https://github.com/RedhawkSDR/eclipse-gov.redhawk.core.git"
CORE_BRANCH=${REDHAWK_VERSION}
CORE_P2="-Dgov.redhawk.core=file:///${BASEDIR}/gov.redhawk.core/releng/core/p2/target/repository"
RCP_P2="-Dgov.redhawk.core.rcp=file:///${BASEDIR}/gov.redhawk.core/releng/rcp/p2/target/repository"

IDE_GIT="https://github.com/RedhawkSDR/eclipse-gov.redhawk.ide.git"
IDE_BRANCH=${REDHAWK_VERSION}
IDE_P2="-Dgov.redhawk.ide=file:///${BASEDIR}/gov.redhawk.ide/releng/p2/target/repository"
DOC_ZIP="-Dgov.redhawk.ide.help.doc.zip=file:///${BASEDIR}/doc.zip"

CODEGEN_GIT="https://github.com/RedhawkSDR/eclipse-gov.redhawk.codegen.git"
CODEGEN_BRANCH=${REDHAWK_VERSION}
CODEGEN_P2="-Dgov.redhawk.codegen=file:///${BASEDIR}/gov.redhawk.codegen/releng/p2/target/repository"

PRODUCT_GIT="https://github.com/RedhawkSDR/eclipse-products-gov.redhawk.ide.product.git"
PRODUCT_BRANCH=${REDHAWK_VERSION}
PRODUCT_P2="-Dgov.redhawk.ide.product=file:///${BASEDIR}/gov.redhawk.ide.product/releng/p2/target/repository"

# First clone all the repositories
if [ ! -d mil.jpeojtrs.sca ]; then
  printf "\n\nCloning mil.jpeojtrs.sca...\n\n"
  ${GIT} clone -b ${MIL_BRANCH} ${MIL_GIT} mil.jpeojtrs.sca; cd mil.jpeojtrs.sca; git checkout ${MINOR_VERSION}; cd ..;
fi

if [ ! -d gov.redhawk.core ]; then
  printf "\n\nCloning gov.redhawk.core...\n\n"
  ${GIT} clone -b ${CORE_BRANCH} ${CORE_GIT} gov.redhawk.core; cd gov.redhawk.core; git checkout ${MINOR_VERSION}; cd ..;
fi


if [ ! -d gov.redhawk.ide ]; then
  printf "\n\nCloning gov.redhawk.ide...\n\n"
  ${GIT} clone -b ${IDE_BRANCH} ${IDE_GIT} gov.redhawk.ide; cd gov.redhawk.ide; git checkout ${MINOR_VERSION}; cd ..;
fi

if [ ! -d gov.redhawk.codegen ]; then
  printf "\n\nCloning gov.redhawk.codegen...\n\n"
  ${GIT} clone -b ${CODEGEN_BRANCH} ${CODEGEN_GIT} gov.redhawk.codegen; cd gov.redhawk.codegen; git checkout ${MINOR_VERSION}; cd ..;
fi

if [ ! -d gov.redhawk.ide.product ]; then
  printf "\n\nCloning gov.redhawk.ide.product...\n\n"
  ${GIT} clone -b ${PRODUCT_BRANCH} ${PRODUCT_GIT} gov.redhawk.ide.product; cd gov.redhawk.ide.product; git checkout ${MINOR_VERSION}; cd ..;
fi

# The documentation is wrapped up into the build, rather than build the documentation just create a dummy zip file
touch FakeDocumentation.txt
zip doc.zip FakeDocumentation.txt

# Now we must fix the pom.xml files to point to proper locations

# Fix things wrong with core
sed -i 's,http://download.redhawksdr.org/nxm-rcp/releases/1.0,http://nextmidas.techma.com/p2/nxm.ui/updates/latest,g' ./gov.redhawk.core/releng/pom.xml

# Now ide pom

# CAREFUL! Removing lines 33-45
if [ $(grep "<id>eclipse-updates</id>" ./gov.redhawk.ide/releng/pom.xml | wc -l) == 1 ]; then
  sed -i '33,45d' ./gov.redhawk.ide/releng/pom.xml
fi

sed -i '/<eclipse-support>/d' ./gov.redhawk.ide/releng/pom.xml
sed -i '/<eclipse-updates>/d' ./gov.redhawk.ide/releng/pom.xml
sed -i "s,http://download.eclipse.org/technology/nebula/snapshot,file://${LOCAL_P2},g" ./gov.redhawk.ide/releng/pom.xml
sed -i 's,http://download.redhawksdr.org/nxm-rcp/releases/1.0,http://nextmidas.techma.com/p2/nxm.ui/updates/latest,g' ./gov.redhawk.ide/releng/pom.xml

# Now the codegen
sed -i 's,http://download.redhawksdr.org/nxm-rcp/releases/1.0,http://nextmidas.techma.com/p2/nxm.ui/updates/latest,g' ./gov.redhawk.codegen/releng/pom.xml
sed -i "s,http://pydev.org/updates,file://${LOCAL_P2},g" ./gov.redhawk.codegen/releng/pom.xml

# Now the product
sed -i "s,http://download.redhawksdr.org/mil.jpeojtrs.sca/releases/1.9,file://${BASEDIR}/mil.jpeojtrs.sca/releng/p2/target/repository,g" ./gov.redhawk.ide.product/releng/target-definition/target-definition.target
sed -i 's,http://download.redhawksdr.org/nxm-ui/releases/1.0,http://nextmidas.techma.com/p2/nxm.ui/updates/latest,g' ./gov.redhawk.ide.product/releng/target-definition/target-definition.target
sed -i "s,http://download.redhawksdr.org/gov.redhawk.codegen/releases/1.9,file://${BASEDIR}/gov.redhawk.codegen/releng/p2/target/repository,g" ./gov.redhawk.ide.product/releng/target-definition/target-definition.target
sed -i "s,http://download.redhawksdr.org/gov.redhawk.core/rcp/releases/1.9,file://${BASEDIR}/gov.redhawk.core/releng/rcp/p2/target/repository,g" ./gov.redhawk.ide.product/releng/target-definition/target-definition.target
sed -i "s,http://download.redhawksdr.org/jacorb/releases/3.1,file://${LOCAL_P2},g" ./gov.redhawk.ide.product/releng/target-definition/target-definition.target
sed -i "s,http://download.redhawksdr.org/gov.redhawk.ide/releases/1.9,file://${BASEDIR}/gov.redhawk.ide/releng/p2/target/repository,g" ./gov.redhawk.ide.product/releng/target-definition/target-definition.target
sed -i "s,http://download.redhawksdr.org/gov.redhawk.core/releases/1.9,file://${BASEDIR}/gov.redhawk.core/releng/core/p2/target/repository,g" ./gov.redhawk.ide.product/releng/target-definition/target-definition.target
sed -i "s,http://download.eclipse.org/technology/nebula/snapshot,file://${LOCAL_P2},g" ./gov.redhawk.ide.product/releng/target-definition/target-definition.target

# Then build each repo.
printf "\n\nBuilding mil.jpeojtrs.sca...\n\n"
${MVN} -f ${BASEDIR}/mil.jpeojtrs.sca/releng/pom.xml ${MVN_PHASE} -Djacorb=file://${LOCAL_P2} ${MIL_P2} || error

printf "\n\nBuilding gov.redhawk.core...\n\n"
${MVN} -f ${BASEDIR}/gov.redhawk.core/releng/core/pom.xml ${MVN_PHASE} -Djacorb=file://${LOCAL_P2} ${MIL_P2} ${CORE_P2} || error

printf "\n\nBuilding gov.redhawk.rcp...\n\n"
${MVN} -f ${BASEDIR}/gov.redhawk.core/releng/rcp/pom.xml ${MVN_PHASE} -Djacorb=file://${LOCAL_P2} ${MIL_P2} ${CORE_P2} ${RCP_P2} || error

printf "\n\nBuilding gov.redhawk.ide...\n\n"
${MVN} -f ${BASEDIR}/gov.redhawk.ide/releng/pom.xml ${MVN_PHASE} -Djacorb=file://${LOCAL_P2} ${MIL_P2} ${CORE_P2} ${RCP_P2} ${DOC_ZIP} ${IDE_P2} || error

printf "\n\nBuilding gov.redhawk.codegen...\n\n"
${MVN} -f ${BASEDIR}/gov.redhawk.codegen/releng/pom.xml ${MVN_PHASE} -Djacorb=file://${LOCAL_P2} ${MIL_P2} ${CORE_P2} ${RCP_P2} ${IDE_P2} ${CODEGEN_P2} || error

printf "\n\nBuilding gov.redhawk.ide.product...\n\n"
${MVN} -f ${BASEDIR}/gov.redhawk.ide.product/releng/pom.xml ${MVN_PHASE} -Djacorb=file://${LOCAL_P2} ${MIL_P2} ${CORE_P2} ${RCP_P2} ${IDE_P2} ${CODEGEN_P2} ${PRODUCT_P2} || error

printf "\n\nBuild SUCCESS!!!\n"
printf "\n\nProducts may be found in ${BASEDIR}/gov.redhawk.ide.product/releng/product/target/products/gov.redhawk.product.ide.product\n"
于 2014-07-02T12:45:45.540 回答