diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index c9b48679a..054706df6 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -2,6 +2,12 @@ This file documents all notable changes to https://github.com/devonfw/IDEasy[IDEasy]. +== 2026.05.001 + +Release with new features and bugfixes: + +* https://github.com/devonfw/IDEasy/issues/1724[#1724]: add gui CLI commandlet. + == 2026.04.001 Release with new features and bugfixes: diff --git a/cli/pom.xml b/cli/pom.xml index 9fe7cd2bb..cc3ba074d 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -206,6 +206,30 @@ + + org.apache.maven.plugins + maven-antrun-plugin + 3.1.0 + + + copy-gui-pom + prepare-package + + run + + + + + + + + + + + @@ -303,5 +327,4 @@ - diff --git a/cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java b/cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java index c44f5b740..dcff28459 100644 --- a/cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java +++ b/cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java @@ -30,6 +30,7 @@ import com.devonfw.tools.ide.tool.go.Go; import com.devonfw.tools.ide.tool.graalvm.GraalVm; import com.devonfw.tools.ide.tool.gradle.Gradle; +import com.devonfw.tools.ide.tool.gui.Gui; import com.devonfw.tools.ide.tool.helm.Helm; import com.devonfw.tools.ide.tool.intellij.Intellij; import com.devonfw.tools.ide.tool.jasypt.Jasypt; @@ -147,6 +148,7 @@ public CommandletManagerImpl(IdeContext context) { add(new Corepack(context)); add(new Pip(context)); add(new Go(context)); + add(new Gui(context)); } /** diff --git a/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java b/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java new file mode 100644 index 000000000..471978d42 --- /dev/null +++ b/cli/src/main/java/com/devonfw/tools/ide/tool/gui/Gui.java @@ -0,0 +1,55 @@ +package com.devonfw.tools.ide.tool.gui; + +import java.util.List; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.devonfw.tools.ide.commandlet.Commandlet; +import com.devonfw.tools.ide.context.IdeContext; +import com.devonfw.tools.ide.process.ProcessMode; +import com.devonfw.tools.ide.tool.mvn.Mvn; +import com.devonfw.tools.ide.tool.mvn.MvnBasedLocalToolCommandlet; +import com.devonfw.tools.ide.variable.IdeVariables; + +/** + * {@link MvnBasedLocalToolCommandlet} to launch the IDEasy GUI. + */ +public class Gui extends Commandlet { + + private static final Logger LOG = LoggerFactory.getLogger(Gui.class); + + private static final String POM_PATH = "gui-execution"; + + /** + * @param context the {@link IdeContext}. + */ + public Gui(IdeContext context) { + + super(context); + addKeyword(getName()); + } + + @Override + public String getName() { + + return "gui"; + } + + @Override + protected void doRun() { + + LOG.debug("Starting GUI via commandlet"); + + Mvn mvn = context.getCommandletManager().getCommandlet(Mvn.class); + + List args = List.of( + "-f", + IdeVariables.IDE_ROOT.get(context).toString() + "/_ide/installation/" + POM_PATH + "/pom.xml", + "exec:java", + "-Dexec.mainClass=com.devonfw.ide.gui.AppLauncher" + ); + + mvn.runTool(context.newProcess(), ProcessMode.DEFAULT, args); + } +} diff --git a/cli/src/main/resources/nls/Help.properties b/cli/src/main/resources/nls/Help.properties index 758709d61..9f8e54210 100644 --- a/cli/src/main/resources/nls/Help.properties +++ b/cli/src/main/resources/nls/Help.properties @@ -41,6 +41,8 @@ cmd.graalvm=Tool commandlet for GraalVm (Java with native-image). cmd.graalvm.detail=GraalVM is a high-performance runtime that supports multiple languages and execution modes. Detailed documentation can be found at https://www.graalvm.org/docs/ cmd.gradle=Tool commandlet for Gradle (Build-Tool). cmd.gradle.detail=Gradle is a build automation tool for Java, Kotlin, and other JVM-based languages. Detailed documentation can be found at https://docs.gradle.org/ +cmd.gui=Tool commandlet for running the IDEasy GUI +cmd.gui.detail=This command will run the GUI version of IDEasy, opening up a more comprehensible project dashboard and allowing for easier management of your local IDEasy instance. cmd.helm=Tool commandlet for Helm (Kubernetes Package Manager). cmd.helm.detail=Helm is a package manager for Kubernetes that simplifies deploying and managing applications. Detailed documentation can be found at https://helm.sh/docs/ cmd.help=Prints this help. diff --git a/cli/src/main/resources/nls/Help_de.properties b/cli/src/main/resources/nls/Help_de.properties index e9e8fb846..a07fe8e12 100644 --- a/cli/src/main/resources/nls/Help_de.properties +++ b/cli/src/main/resources/nls/Help_de.properties @@ -41,6 +41,8 @@ cmd.graalvm=Werkzeug Kommando für GraalVm. cmd.graalvm.detail=GraalVM ist eine leistungsstarke Laufzeitumgebung, die mehrere Sprachen und Ausführungsmodi unterstützt. Detaillierte Dokumentation ist zu finden unter https://www.graalvm.org/docs/ cmd.gradle=Werkzeug Kommando für Gradle (Build-Tool). cmd.gradle.detail=Gradle ist ein Build-Automatisierungstool für Java, Kotlin und andere JVM-basierte Sprachen. Detaillierte Dokumentation ist zu finden unter https://docs.gradle.org/ +cmd.gui=Werkzeug Kommando, um die GUI von IDEasy zu öffnen. +cmd.gui.detail=Dieser Befehl startet die GUI-Version von IDEasy, öffnet ein übersichtlicheres Projekt-Dashboard und erleichtert die Verwaltung Ihrer lokalen IDEasy-Instanz. cmd.helm=Werkzeug Kommando für Helm (Kubernetes Package Manager). cmd.helm.detail=Helm ist ein Paketmanager für Kubernetes, der das Bereitstellen und Verwalten von Anwendungen vereinfacht. Detaillierte Dokumentation ist zu finden unter https://helm.sh/docs/ cmd.help=Zeigt diese Hilfe an. diff --git a/gui-launcher/pom.xml b/gui-launcher/pom.xml new file mode 100644 index 000000000..865957ad6 --- /dev/null +++ b/gui-launcher/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + + com.devonfw.tools.IDEasy.dev + ide + dev-SNAPSHOT + + com.devonfw.tools.IDEasy + ide-gui-launcher + ${revision} + pom + Launcher for IDEasy GUI + + + + com.devonfw.tools.IDEasy + ide-gui + ${revision} + jar + + + + + + + maven-resources-plugin + 3.3.1 + + + copy-gui-launcher-flattened-pom + prepare-package + + copy-resources + + + ${project.build.directory}/package/gui + + + ${project.basedir} + + .flattened-pom.xml + + + + + + + + + + + diff --git a/gui/pom.xml b/gui/pom.xml index c581b1dd0..52695dec2 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -62,6 +62,19 @@ + + org.apache.maven.plugins + maven-jar-plugin + + + + com.devonfw.ide.gui.AppLauncher + true + + + + + org.openjfx javafx-maven-plugin diff --git a/pom.xml b/pom.xml index d4651d71a..d7e6450fe 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,7 @@ 3.7.1 3.6.1 24.2.1 + gui-execution @@ -174,6 +175,7 @@ documentation cli gui + gui-launcher url-updater security