-
Notifications
You must be signed in to change notification settings - Fork 34
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
Create ide wrapper script #63
Comments
Some simple testing:
So this ugly Windows Folders with white-space and parenthesis ( Another question would be why are there path entries duplicated? I see this:
So these duplicates are IMHO a bug of the |
So no duplicates before invoking |
Already found the source of the bug:
IMHO we do not handle the different PATH syntax on windows between native Windows syntax (
|
Maybe we should split this story into 3 aspects:
|
For the record: I am also thinking about renaming |
Auto-closed by PR #221 but not yet completed:
|
Since this issue was magically reopend when I created #260 I can reuse it for another demand we need to implement:
First line is on std out in white.
This is so far fully correct.
The message is already implemented here:
Please note that you cannot output the message to std out from |
As a devonfw-ide user, I want to be able to use the new
ide
CLI seamlessly so that I can continue to work like I was used to with devonfw-ide.That is if I just call
ide
this will set my environments according to the IDEasy project I am currently located in.For this we have already implemented our Java IDE and build-process to create native image binaries. All this already supports an environment commandlet that prints out all the variables to set.
However, a process (our ide.exe) cannot set/change the environments of the current shell (e.g. CMD, bash, or powershell) the user is currently running. Therefore we need a wrapper script similar like what we had before:
Instead that new script should be quite different:
devon[.bat]
it should be namedide[.bat]
ideasy[.exe]
(our native image from GraalVM) passing exactly those arguments the user had given. This can log output and interact with the user via CLI as usual.ideasy[.exe]
again withenv
as argument to trigger theEnvironmentCommandlet
. In case we are running from bash (and we are on windows), then a second parameter--bash
shall be supplied (ideasy env --bash
). The output of this should be evaluated in an analogue way as we did to load thedevon.properties
in Bash/CMD (https://github.com/devonfw/ide/blob/master/scripts/src/main/resources/scripts/functions-core#L9). Maybe we can even do KISS and redirect the entire env output to a pipe calling theeval
command.To simplify things you may develop and provide
ide
(bash) andide.bat
in separate steps as individual PRs.As those files need to be included into our release package. My suggestion would be:
cli/src/main/package
cli/pom.xml
with abuild/resources
section that copies (and filters) the files from that folder to something liketarget/package
. Please properly use maven variables instead of hardcodedtarget
folder (that may be redirected e.g. toeclipse-target
).package.xml
) to ensure that thetarget/package
folder is finally archived to our tar.gz file for the release.target/package/bin/
). Also rename the native image toideasy[.exe]
as otherwise we have a name clashing between theide
wrapper script and theideasy
(native image binary).Again if you want to simplify. You can first place the scripts into the new location as a PR (first bullet point above) and later create a PR to integrate it and improve the release package.
Clarification of potential questions:
ide[.bat]
script find the native binary? The most simple approach that I can think of would be that we have a central installation of IDEasy, that is inside IDE_ROOT that could be set as a global environment variable on the initial installation and always be on the PATH (${IDE_ROOT}/bin
so e.g.D:\projects\_ide\bin
) so we do not have to look for it (we have already agreed on this approach). However, the implication would be that if you install an update, you will update the CLI globally on your machine. If there are (breaking?) changes, this will apply to all IDE installations. An alternative would be to keep the old logic to find IDE_HOME in the script and have the ide-cli in abin
(orscripts
) folder in IDE_HOME. After using devonfw-ide for years and having many parallel IDE instances I learned that updating is kind of tedious as I have to run theide update scripts
more than 10 times until all my installations are up-to-date. Therefore a global installation would be my first thought. Also this avoids redundancy and waste of disk-space if theide-cli.exe
is already 55MB. IMHO we just need to learn more about caring for downward compatibility and then this approach should be fine.The text was updated successfully, but these errors were encountered: