Skip to content

Commit

Permalink
Merge branch 'main' into feature/update-eclipse-2024-12
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkratz committed Dec 10, 2024
2 parents 56db10f + 58de06b commit a4c9cb3
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 14 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ jobs:
run: echo "Started CI build (Eclipse eMoflon macOS user)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
brew install p7zip coreutils grep wget curl gsed
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
Expand All @@ -283,7 +283,9 @@ jobs:
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m user -o macos
run: |
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
chmod +x build.sh && ./build.sh -m user -o macos
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
Expand All @@ -301,7 +303,7 @@ jobs:
run: echo "Started CI build (Eclipse eMoflon macOS dev)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
brew install p7zip coreutils grep wget curl gsed
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
Expand All @@ -321,7 +323,9 @@ jobs:
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m dev -o macos
run: |
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
chmod +x build.sh && ./build.sh -m dev -o macos
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
Expand All @@ -339,7 +343,7 @@ jobs:
run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
brew install p7zip coreutils grep wget curl gsed
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
Expand All @@ -359,7 +363,9 @@ jobs:
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m hipedev -o macos
run: |
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
chmod +x build.sh && ./build.sh -m hipedev -o macos
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
Expand All @@ -377,7 +383,7 @@ jobs:
run: echo "Started CI build (Eclipse eMoflon macOS user)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
brew install p7zip coreutils grep wget curl gsed
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
Expand All @@ -397,7 +403,9 @@ jobs:
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m user -o macosarm
run: |
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
chmod +x build.sh && ./build.sh -m user -o macosarm
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
Expand All @@ -415,7 +423,7 @@ jobs:
run: echo "Started CI build (Eclipse eMoflon macOS dev)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
brew install p7zip coreutils grep wget curl gsed
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
Expand All @@ -435,7 +443,9 @@ jobs:
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m dev -o macosarm
run: |
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
chmod +x build.sh && ./build.sh -m dev -o macosarm
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
Expand All @@ -453,7 +463,7 @@ jobs:
run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
brew install p7zip coreutils grep wget curl gsed
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
Expand All @@ -473,7 +483,9 @@ jobs:
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m hipedev -o macosarm
run: |
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
chmod +x build.sh && ./build.sh -m hipedev -o macosarm
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
Expand Down
36 changes: 34 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,29 @@ remove_update_sites () {
rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_METADATA
}

# Removes broken org.apache.commons.logging JAR from plug-ins
remove_broken_commons_logging () {
log "Removes broken org.apache.commons.logging JAR from plug-ins."
rm $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar
# force org.eclipse.equinox to take correct JAR into account
# org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false
sed -i '/org.apache.commons.lang3/a org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false' $ECLIPSE_BASE_PATH/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
# org.apache.commons.logging,1.2.0.v20180409-1502,plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar,4,false
sed -i '/org.apache.commons.logging,1.2.0.v20180409-1502,plugins\/org.apache.commons.logging_1.2.0.v20180409-1502.jar,4,false/d' $ECLIPSE_BASE_PATH/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info
}

# Copies the non-broken org.apache.commons.logging JAR from plug-ins
save_non_broken_commons_logging () {
log "Save non-broken org.apache.commons.logging JAR from plug-ins."
cp $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.jar /tmp/org.apache.commons.logging_1.2.0.jar
}

# Restores the non-broken org.apache.commons.logging JAR to plug-ins
restore_non_broken_commons_logging () {
log "Restores the non-broken org.apache.commons.logging JAR from plug-ins."
cp /tmp/org.apache.commons.logging_1.2.0.jar $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.jar
rm /tmp/org.apache.commons.logging_1.2.0.jar
}

#
# Script
Expand Down Expand Up @@ -231,7 +254,7 @@ setup_emoflon_headless_local_updatesite
log "Clean-up Eclipse folder and extract downloaded archive."
rm -rf ./eclipse/*
if [[ "$OS" = "linux" ]]; then
tar -xzf eclipse-modeling-$VERSION-R-linux-gtk-x86_64.tar.gz
tar -xzf eclipse-modeling-$VERSION-R-linux-gtk-x86_64.tar.gz --warning=no-unknown-keyword
elif [[ "$OS" = "windows" ]]; then
unzip -qq -o eclipse-modeling-$VERSION-R-win32-x86_64.zip
elif [[ "$OS" = "macos" ]]; then
Expand All @@ -247,14 +270,17 @@ fi
# Install global Eclipse settings from config file
install_global_eclipse_settings

# Save non-broken org.apache.commons.logging JAR from plug-ins
save_non_broken_commons_logging

log "Install Eclipse plug-ins."
for p in ${ORDER[@]}; do
# Check if eMoflon packages must be skipped (for dev builds).
if [[ "$p" = "emoflon" ]] && [[ $INSTALL_EMOFLON -eq 0 ]]; then
log "Skipping plug-in: $p."
continue
fi

# Check if Dark Theme packages must be skipped (for CI builds = completely headless).
if [[ "$p" = "theme" ]] && [[ $SKIP_THEME -eq 1 ]]; then
log "Skipping plug-in: $p."
Expand Down Expand Up @@ -291,6 +317,12 @@ else
chmod +x splash.sh && ./splash.sh deploy $VERSION $ECLIPSE_BASE_PATH
fi

# Remove broken org.apache.commons.logging JAR
remove_broken_commons_logging

# Restore non-broken org.apache.commons.logging JAR
restore_non_broken_commons_logging

log "Clean-up old archives and create new archive."
rm -f ./$OUTPUT_FILE
zip -q -r $OUTPUT_FILE eclipse
Expand Down

0 comments on commit a4c9cb3

Please sign in to comment.