Skip to content

Commit 649b89e

Browse files
authored
Merge pull request #146 from eMoflon/hotfix/pde-workaround-v2
Fixes broken PDE workaround (v2)
2 parents 5cee5af + 19c1c8a commit 649b89e

4 files changed

+14
-23
lines changed

build.sh

+14-19
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ OUTPUT_FILE_PREFIX_WINDOWS="eclipse-emoflon-windows"
3535
OUTOUT_FILE_PREFIX_MACOS="eclipse-emoflon-macos"
3636
OUTOUT_FILE_PREFIX_MACOSARM="eclipse-emoflon-macos-arm"
3737
MIRROR="https://ftp.fau.de"
38-
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/"
38+
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"
3939
EMOFLON_HEADLESS_SRC="https://api.github.com/repos/eMoflon/emoflon-headless/releases/latest"
4040

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

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

4949
#
5050
# Configure OS specific details
@@ -108,20 +108,6 @@ install_packages () {
108108
-installIU "$(parse_package_list $2)"
109109
}
110110

111-
# Uninstalls a given list of packages from a given update site.
112-
uninstall_packages () {
113-
if [[ "$OS" = "macos" ]] || [[ "$OS" = "macosarm" ]]; then
114-
chmod +x $ECLIPSE_BIN_PATH
115-
fi
116-
117-
echo "$(parse_package_list $2)"
118-
119-
$ECLIPSE_BIN_PATH -nosplash \
120-
-application org.eclipse.equinox.p2.director \
121-
-repository "$1" \
122-
-uninstallIU "$(parse_package_list $2)"
123-
}
124-
125111
# Displays the given input including "=> " on the console.
126112
log () {
127113
echo "=> $1"
@@ -213,6 +199,15 @@ remove_update_sites () {
213199
rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_METADATA
214200
}
215201

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

217212
#
218213
# Script
@@ -261,9 +256,6 @@ fi
261256
# Install global Eclipse settings from config file
262257
install_global_eclipse_settings
263258

264-
log "Remove old version of the PDE."
265-
uninstall_packages "$UPDATESITES" "./packages/pde-remove-packages.list"
266-
267259
log "Install Eclipse plug-ins."
268260
for p in ${ORDER[@]}; do
269261
# Check if eMoflon packages must be skipped (for dev builds).
@@ -308,6 +300,9 @@ else
308300
chmod +x splash.sh && ./splash.sh deploy $VERSION $ECLIPSE_BASE_PATH
309301
fi
310302

303+
# Deploy PDE JAR file path
304+
patch_pde_jar
305+
311306
log "Clean-up old archives and create new archive."
312307
rm -f ./$OUTPUT_FILE
313308
zip -q -r $OUTPUT_FILE eclipse

packages/pde-fix-packages.list

-1
This file was deleted.

packages/pde-remove-packages.list

-3
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)