From 9115b172ea70a4ba0b3fcfb191e95b5485ea02e0 Mon Sep 17 00:00:00 2001 From: caylipp Date: Tue, 9 Jun 2026 14:33:56 +0200 Subject: [PATCH 1/6] #2000: Add local dev build script --- build-local-dev.sh | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 build-local-dev.sh diff --git a/build-local-dev.sh b/build-local-dev.sh new file mode 100644 index 000000000..27f01c438 --- /dev/null +++ b/build-local-dev.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [ -z "${IDE_ROOT:-}" ]; then + echo "Error: IDE_ROOT is not set." + exit 1 +fi + +if ! command -v ideasy > /dev/null 2>&1; then + echo "Error: ideasy command not found." + exit 1 +fi + +IDEASY_CMD="$(readlink -f "$(command -v ideasy)")" + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +CLI_DIR="$SCRIPT_DIR/cli" +TARGET_DIR="$CLI_DIR/target" + +LOCAL_DEV="$IDE_ROOT/_ide/software/maven/ideasy/ideasy/local-dev" +INSTALLATION_LINK="$IDE_ROOT/_ide/installation" + +echo "Building IDEasy native image..." +cd "$CLI_DIR" +mvn -B -ntp -Pnative -DskipTests=true package + +echo "Preparing local-dev installation..." +rm -rf "$LOCAL_DEV" +mkdir -p "$LOCAL_DEV/bin" + +echo "Copying IDEasy executable and native libraries..." + +if [ -f "$TARGET_DIR/ideasy.exe" ]; then + cp "$TARGET_DIR/ideasy.exe" "$LOCAL_DEV/bin/ideasy.exe" +fi + +if [ -f "$TARGET_DIR/ideasy" ]; then + cp "$TARGET_DIR/ideasy" "$LOCAL_DEV/bin/ideasy" + chmod +x "$LOCAL_DEV/bin/ideasy" +fi + +if compgen -G "$TARGET_DIR/*.dll" > /dev/null; then + cp "$TARGET_DIR"/*.dll "$LOCAL_DEV/bin/" +fi + +if [ ! -f "$LOCAL_DEV/bin/ideasy.exe" ] && [ ! -f "$LOCAL_DEV/bin/ideasy" ]; then + echo "Error: No ideasy executable found in $TARGET_DIR" + exit 1 +fi + +echo "Updating IDEasy installation link..." + +if [ -L "$INSTALLATION_LINK" ]; then + unlink "$INSTALLATION_LINK" +elif [ -e "$INSTALLATION_LINK" ]; then + echo "Error: $INSTALLATION_LINK exists but is not a symbolic link." + echo "Aborting to avoid deleting a real folder." + exit 1 +fi + +"$IDEASY_CMD" ln -s "$LOCAL_DEV" "$INSTALLATION_LINK" + +echo "Done." +echo "You can test it with:" +echo "ide ..." +echo +echo "To switch back to the latest stable IDEasy version, run:" +echo "ideasy upgrade --mode=stable" +echo +echo "To switch to the latest snapshot IDEasy version, run:" +echo "ideasy upgrade --mode=snapshot" From f9306d2aed53e779a99bc6d42797c8b1371e1ed9 Mon Sep 17 00:00:00 2001 From: caylipp Date: Tue, 9 Jun 2026 14:39:21 +0200 Subject: [PATCH 2/6] #2000: Add CHANGELOG entry --- CHANGELOG.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 53a168492..8c0b47ca1 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -15,6 +15,7 @@ Release with new features and bugfixes: * https://github.com/devonfw/IDEasy/issues/1849[#1849]: Add VSCodium support * https://github.com/devonfw/IDEasy/issues/1391[#1391]: Fix bashrc messed with terraform completions * https://github.com/devonfw/IDEasy/issues/1922[#1922]: Add Task CLI to IDEasy commandlets +* https://github.com/devonfw/IDEasy/issues/2000[#2000]: Add local dev build script The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/45?closed=1[milestone 2026.06.001]. From 0f648ae60d1268af67341ff7ff17f26e2e0bc954 Mon Sep 17 00:00:00 2001 From: caylipp Date: Wed, 10 Jun 2026 11:04:05 +0200 Subject: [PATCH 3/6] #2000: Fix package missing -add packages from project directory --- build-local-dev.sh | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/build-local-dev.sh b/build-local-dev.sh index 27f01c438..44cfecd8f 100644 --- a/build-local-dev.sh +++ b/build-local-dev.sh @@ -16,6 +16,7 @@ IDEASY_CMD="$(readlink -f "$(command -v ideasy)")" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" CLI_DIR="$SCRIPT_DIR/cli" TARGET_DIR="$CLI_DIR/target" +PACKAGE_DIR="$CLI_DIR/src/main/package" LOCAL_DEV="$IDE_ROOT/_ide/software/maven/ideasy/ideasy/local-dev" INSTALLATION_LINK="$IDE_ROOT/_ide/installation" @@ -28,6 +29,25 @@ echo "Preparing local-dev installation..." rm -rf "$LOCAL_DEV" mkdir -p "$LOCAL_DEV/bin" +if [ ! -d "$PACKAGE_DIR" ]; then + echo "Error: Package directory not found: $PACKAGE_DIR" + exit 1 +fi + +echo "Copying package contents..." +cp -R "$PACKAGE_DIR"/. "$LOCAL_DEV"/ + +OS_NAME="$(uname -s)" +if [[ "$OS_NAME" == MINGW* || "$OS_NAME" == MSYS* || "$OS_NAME" == CYGWIN* ]]; then + echo "Removing macOS-specific package files for Windows installation..." + rm -rf "$LOCAL_DEV/system/mac" +fi + +echo "Creating local-dev software version marker..." +echo "local-dev-version" > "$LOCAL_DEV/.ide.software.version" + +mkdir -p "$LOCAL_DEV/bin" + echo "Copying IDEasy executable and native libraries..." if [ -f "$TARGET_DIR/ideasy.exe" ]; then @@ -39,15 +59,21 @@ if [ -f "$TARGET_DIR/ideasy" ]; then chmod +x "$LOCAL_DEV/bin/ideasy" fi -if compgen -G "$TARGET_DIR/*.dll" > /dev/null; then - cp "$TARGET_DIR"/*.dll "$LOCAL_DEV/bin/" -fi - if [ ! -f "$LOCAL_DEV/bin/ideasy.exe" ] && [ ! -f "$LOCAL_DEV/bin/ideasy" ]; then echo "Error: No ideasy executable found in $TARGET_DIR" exit 1 fi + +if [ -f "$LOCAL_DEV/functions" ]; then + chmod +x "$LOCAL_DEV/functions" +fi + +if [ -f "$LOCAL_DEV/setup" ]; then + chmod +x "$LOCAL_DEV/setup" +fi + + echo "Updating IDEasy installation link..." if [ -L "$INSTALLATION_LINK" ]; then From f583f2f5bab4e42f390146b4e59744ccf4c3a07a Mon Sep 17 00:00:00 2001 From: caylipp Date: Fri, 12 Jun 2026 14:08:13 +0200 Subject: [PATCH 4/6] #2000: fix graalvm missing --- build-local-dev.sh | 42 +++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/build-local-dev.sh b/build-local-dev.sh index 44cfecd8f..f5fda4656 100644 --- a/build-local-dev.sh +++ b/build-local-dev.sh @@ -6,35 +6,44 @@ if [ -z "${IDE_ROOT:-}" ]; then exit 1 fi -if ! command -v ideasy > /dev/null 2>&1; then - echo "Error: ideasy command not found." - exit 1 -fi - -IDEASY_CMD="$(readlink -f "$(command -v ideasy)")" - SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_DIR="$(cd "$SCRIPT_DIR/../../.." && pwd)" + CLI_DIR="$SCRIPT_DIR/cli" TARGET_DIR="$CLI_DIR/target" PACKAGE_DIR="$CLI_DIR/src/main/package" +PROJECT_SOFTWARE_DIR="$PROJECT_DIR/software" +GRAALVM_DIR="$PROJECT_SOFTWARE_DIR/extra/graalvm" + LOCAL_DEV="$IDE_ROOT/_ide/software/maven/ideasy/ideasy/local-dev" INSTALLATION_LINK="$IDE_ROOT/_ide/installation" echo "Building IDEasy native image..." + +if [ ! -d "$GRAALVM_DIR" ]; then + echo "Error: GraalVM is not installed for this IDEasy project:" + echo "$GRAALVM_DIR" + echo + echo "Please install GraalVM first:" + echo "ideasy install graalvm" + exit 1 +fi + cd "$CLI_DIR" mvn -B -ntp -Pnative -DskipTests=true package echo "Preparing local-dev installation..." rm -rf "$LOCAL_DEV" -mkdir -p "$LOCAL_DEV/bin" +mkdir -p "$LOCAL_DEV" + +echo "Copying package contents..." if [ ! -d "$PACKAGE_DIR" ]; then echo "Error: Package directory not found: $PACKAGE_DIR" exit 1 fi -echo "Copying package contents..." cp -R "$PACKAGE_DIR"/. "$LOCAL_DEV"/ OS_NAME="$(uname -s)" @@ -64,7 +73,6 @@ if [ ! -f "$LOCAL_DEV/bin/ideasy.exe" ] && [ ! -f "$LOCAL_DEV/bin/ideasy" ]; the exit 1 fi - if [ -f "$LOCAL_DEV/functions" ]; then chmod +x "$LOCAL_DEV/functions" fi @@ -73,9 +81,15 @@ if [ -f "$LOCAL_DEV/setup" ]; then chmod +x "$LOCAL_DEV/setup" fi - echo "Updating IDEasy installation link..." +if ! command -v ideasy > /dev/null 2>&1; then + echo "Error: ideasy command not found." + exit 1 +fi + +IDEASY_CMD="$(readlink -f "$(command -v ideasy)")" + if [ -L "$INSTALLATION_LINK" ]; then unlink "$INSTALLATION_LINK" elif [ -e "$INSTALLATION_LINK" ]; then @@ -86,6 +100,12 @@ fi "$IDEASY_CMD" ln -s "$LOCAL_DEV" "$INSTALLATION_LINK" +if [ -f "$LOCAL_DEV/setup" ]; then + echo "Running IDEasy setup for local-dev installation..." + cd "$LOCAL_DEV" + ./setup +fi + echo "Done." echo "You can test it with:" echo "ide ..." From 5cb115561931375983668f3341c40dab97678636 Mon Sep 17 00:00:00 2001 From: caylipp Date: Fri, 12 Jun 2026 14:15:02 +0200 Subject: [PATCH 5/6] #2000: fix setup override syslink --- build-local-dev.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/build-local-dev.sh b/build-local-dev.sh index f5fda4656..3f10ea6e9 100644 --- a/build-local-dev.sh +++ b/build-local-dev.sh @@ -100,12 +100,6 @@ fi "$IDEASY_CMD" ln -s "$LOCAL_DEV" "$INSTALLATION_LINK" -if [ -f "$LOCAL_DEV/setup" ]; then - echo "Running IDEasy setup for local-dev installation..." - cd "$LOCAL_DEV" - ./setup -fi - echo "Done." echo "You can test it with:" echo "ide ..." From 699cb39f58bdf92e87c1b332ea20845386b4a4bc Mon Sep 17 00:00:00 2001 From: caylipp Date: Wed, 17 Jun 2026 11:18:14 +0200 Subject: [PATCH 6/6] #2000: export GRAALVM Path --- build-local-dev.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-local-dev.sh b/build-local-dev.sh index 3f10ea6e9..39a6741d0 100644 --- a/build-local-dev.sh +++ b/build-local-dev.sh @@ -30,6 +30,8 @@ if [ ! -d "$GRAALVM_DIR" ]; then exit 1 fi +export PATH="$GRAALVM_DIR/bin:$PATH" + cd "$CLI_DIR" mvn -B -ntp -Pnative -DskipTests=true package