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

Fixes broken PDE workaround (v2) #146

Merged
merged 3 commits into from
Apr 4, 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
33 changes: 14 additions & 19 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,https://download.eclipse.org/eclipse/updates/4.36-I-builds/"
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"
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=("pde-fix" "xtext" "plantuml" "hipe" "kermeta" "misc" "emoflon-headless" "emoflon" "theme" "additional")
ORDER_LINUX=("xtext" "plantuml" "hipe" "kermeta" "misc" "emoflon-headless" "emoflon" "theme" "additional")

#
# Configure OS specific details
Expand Down Expand Up @@ -108,20 +108,6 @@ 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 @@ -213,6 +199,15 @@ remove_update_sites () {
rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_METADATA
}

# Patches the PDE JAR file to fix a bug with spaces in paths.
# https://github.com/eclipse-pde/eclipse.pde/pull/1709
patch_pde_jar () {
log "Patching PDE JAR."
PDE_JAR_FILE="org.eclipse.pde.core_3.20.100.v20250211-2032.jar"
# Remove original JAR file
rm -f $ECLIPSE_BASE_PATH/plugins/$PDE_JAR_FILE
cp ./patches/$PDE_JAR_FILE $ECLIPSE_BASE_PATH/plugins/$PDE_JAR_FILE
}

#
# Script
Expand Down Expand Up @@ -261,9 +256,6 @@ 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 Expand Up @@ -308,6 +300,9 @@ else
chmod +x splash.sh && ./splash.sh deploy $VERSION $ECLIPSE_BASE_PATH
fi

# Deploy PDE JAR file path
patch_pde_jar

log "Clean-up old archives and create new archive."
rm -f ./$OUTPUT_FILE
zip -q -r $OUTPUT_FILE eclipse
Expand Down
1 change: 0 additions & 1 deletion packages/pde-fix-packages.list

This file was deleted.

3 changes: 0 additions & 3 deletions packages/pde-remove-packages.list

This file was deleted.

Binary file not shown.
Loading