Skip to content
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.bat wrapper script for Windows CMD #419

Closed
hohwille opened this issue Jun 25, 2024 · 0 comments · Fixed by #506
Closed

Create ide.bat wrapper script for Windows CMD #419

hohwille opened this issue Jun 25, 2024 · 0 comments · Fixed by #506
Assignees
Labels
enhancement New feature or request windows specific for Microsoft Windows OS

Comments

@hohwille
Copy link
Member

Just like #63 we need an ide.bat wrapper script for Windows CMD.
It should only be contained in Windows releases of IDEasy.

Inspirations from devonfw-ide:

However, just like the new bash wrapper script we should only do the minimum needed:

#!/usr/bin/env bash
_IDEASY="$(dirname "${BASH_SOURCE}")/ideasy"
if [ $# != 0 ]; then
"${_IDEASY}" "$@"
return_code=$?
if [ $return_code != 0 ]; then
echo -e "\n\033[91mError: IDEasy failed with exit code ${return_code}\033[91m" >&2
unset _IDEASY
return ${return_code}
fi
fi
ide_env=
if [ "${OSTYPE}" = "cygwin" ] || [ "${OSTYPE}" = "msys" ]; then
ide_env="$("${_IDEASY}" env --bash)"
else
ide_env="$("${_IDEASY}" env)"
fi
if [ $? = 0 ]; then
eval "${ide_env}"
if [ $# = 0 ]; then
echo "IDE environment variables have been set for ${IDE_HOME} in workspace ${WORKSPACE}"
fi
fi
unset _IDEASY
unset ide_env
unset return_code

@hohwille hohwille added enhancement New feature or request windows specific for Microsoft Windows OS labels Jun 25, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Jun 25, 2024
@hohwille hohwille self-assigned this Aug 6, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Aug 6, 2024
@hohwille hohwille linked a pull request Aug 6, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in IDEasy board Aug 6, 2024
@hohwille hohwille added this to the release:2024.08.001 milestone Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request windows specific for Microsoft Windows OS
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant