Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds workaround to update Eclipse PDE #144

Merged
merged 1 commit into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ OUTPUT_FILE_PREFIX_WINDOWS="eclipse-emoflon-windows"
OUTOUT_FILE_PREFIX_MACOS="eclipse-emoflon-macos"
OUTOUT_FILE_PREFIX_MACOSARM="eclipse-emoflon-macos-arm"
MIRROR="https://ftp.fau.de"
UPDATESITES="https://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/,https://hallvard.github.io/plantuml/,https://hipe-devops.github.io/HiPE-Updatesite/hipe.updatesite/,https://www.kermeta.org/k2/update,https://emoflon.org/emoflon-ibex-updatesite/snapshot/updatesite/,https://devstyle.codetogether.io/,https://download.eclipse.org/releases/$VERSION,https://www.codetogether.com/updates/ci/,http://update.eclemma.org/,https://pmd.github.io/pmd-eclipse-plugin-p2-site/,https://checkstyle.org/eclipse-cs-update-site/,https://spotbugs.github.io/eclipse/,https://download.eclipse.org/technology/m2e/releases/latest"
UPDATESITES="https://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/,https://hallvard.github.io/plantuml/,https://hipe-devops.github.io/HiPE-Updatesite/hipe.updatesite/,https://www.kermeta.org/k2/update,https://emoflon.org/emoflon-ibex-updatesite/snapshot/updatesite/,https://devstyle.codetogether.io/,https://download.eclipse.org/releases/$VERSION,https://www.codetogether.com/updates/ci/,http://update.eclemma.org/,https://pmd.github.io/pmd-eclipse-plugin-p2-site/,https://checkstyle.org/eclipse-cs-update-site/,https://spotbugs.github.io/eclipse/,https://download.eclipse.org/technology/m2e/releases/latest,https://download.eclipse.org/eclipse/updates/4.36-I-builds/"
EMOFLON_HEADLESS_SRC="https://api.github.com/repos/eMoflon/emoflon-headless/releases/latest"

# Import plug-in:
Expand All @@ -44,7 +44,7 @@ IMPORT_PLUGIN_FILENAME="com.seeq.eclipse.importprojects_$IMPORT_PLUGIN_VERSION.j
IMPORT_PLUGIN_SRC="https://api.github.com/repos/maxkratz/eclipse-import-projects-plugin/releases/tags/v$IMPORT_PLUGIN_VERSION"

# Array with the order to install the plugins with.
ORDER_LINUX=("xtext" "plantuml" "hipe" "kermeta" "misc" "emoflon-headless" "emoflon" "theme" "additional")
ORDER_LINUX=("pde-fix" "xtext" "plantuml" "hipe" "kermeta" "misc" "emoflon-headless" "emoflon" "theme" "additional")

#
# Configure OS specific details
Expand Down Expand Up @@ -108,6 +108,20 @@ install_packages () {
-installIU "$(parse_package_list $2)"
}

# Uninstalls a given list of packages from a given update site.
uninstall_packages () {
if [[ "$OS" = "macos" ]] || [[ "$OS" = "macosarm" ]]; then
chmod +x $ECLIPSE_BIN_PATH
fi

echo "$(parse_package_list $2)"

$ECLIPSE_BIN_PATH -nosplash \
-application org.eclipse.equinox.p2.director \
-repository "$1" \
-uninstallIU "$(parse_package_list $2)"
}

# Displays the given input including "=> " on the console.
log () {
echo "=> $1"
Expand Down Expand Up @@ -195,7 +209,7 @@ remove_update_sites () {
# First, create a ZIP as "backup"
zip -q -r $UPDATE_SITE_CONFIG_PATH/update-sites.zip $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_ARTIFACT $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_METADATA

rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_ARTIFACT
rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_ARTIFACT
rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_METADATA
}

Expand Down Expand Up @@ -247,6 +261,9 @@ fi
# Install global Eclipse settings from config file
install_global_eclipse_settings

log "Remove old version of the PDE."
uninstall_packages "$UPDATESITES" "./packages/pde-remove-packages.list"

log "Install Eclipse plug-ins."
for p in ${ORDER[@]}; do
# Check if eMoflon packages must be skipped (for dev builds).
Expand Down
1 change: 1 addition & 0 deletions packages/pde-fix-packages.list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.pde/3.13.3100.v20250330-1800
3 changes: 3 additions & 0 deletions packages/pde-remove-packages.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
org.eclipse.pde
org.eclipse.pde.feature.group
org.eclipse.sdk.feature.group
Loading