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

Make doInstall even more generic #940

Closed
4 tasks done
hohwille opened this issue Oct 11, 2022 · 1 comment · Fixed by #934
Closed
4 tasks done

Make doInstall even more generic #940

hohwille opened this issue Oct 11, 2022 · 1 comment · Fixed by #934
Assignees
Labels
enhancement New feature or request

Comments

@hohwille
Copy link
Member

hohwille commented Oct 11, 2022

We have already put a lot of energy, thoughts and magic into doInstall.
However, our commandelts still contain a lot of boiler-plate code for setup that could be eliminated:

  • With our new version stuff (List available versions for a tool #826, Generic way to output tool version  #847, Use default tool version from available-versions #878, etc.) we can now always check if .devon.software.version is present and matches the version to be installed after it is resolved (Use default tool version from available-versions #878 and Ability to configure version prefix #893). Therefore we can determine if the configured version is already installed easy and fast.
  • Therefore we can always check this and pass silent flag to doInstall handling all the expected logic behind it:
    When the version already matches (see point above) nothing should be done or logged if silent is active.
    However, if it does not match, we can update automatically - even if silent mode. This would bring a nice improvement so tools are all automatically updated (not only on non-silent setup) if version variable has changed.
    If not silent, we can always do the version check output (see doGetSoftwareVersion) at the end of doInstall. This shall honor TOOL_VERSION_COMMAND variable as well as if target_path ($2) is not pointing inside software folder so that exotic commandlets do not trigger this what may be undesired (e.g. if the download a global installer via doInstall like in docker or currently in aws).
  • Further, we can improve doInstall to automatically detect if doExtract created nothing but a single folder inside the target_path (not named bin or Contents). If that is the case, then we could get rid of this extra folder. E.g. currently Eclipse on MacOS creates folder structure software/eclipse/Eclipse.app/Contents and after extracting *.dmg the eclipse folder contains nothing else but Eclipse.app.
  • Then we could improve MacOS app workaround (see Generalize MacOS app workaround #683) in doInstall. If the target_path contains a MacOS app we could find the binary in a more generic way. Currently we search for Contents/Home/bin what matches for Java on MacOS. However, we could search all sub-folders (maybe except Resources or _* for _CodeSignature) if they contain a bin subfolder. In that case we should symlink that like currently done with Home folder for Java on MacOS. If no such folder exists, we can search for a folder directly containing an executable file (e.g. software/eclipse/Eclipse.app/Contents/MacOS/eclipse) and then symlink that folder. Then we would have software/eclipse/ being a symlink to software/macos/eclipse/Contents/MacOS and therefore contain nothing but eclipse binary and .devon.software.version. Thus it would be added directly to the PATH variable (no bin subfolder) and calling eclipse would directly work. To make a long story short. This way we could get rid of MacOS specific workarounds in eclipse commandlet. If we once consider "Java < 11" as obsolete legacy (maybe not this year) we can reduce doSetup to just an invocation of doInstall for most commandlets what would be an awesome simplification (of commandlets and a complication of the magic in doInstall).
@hohwille hohwille added enhancement New feature or request Team_IDE labels Oct 11, 2022
@hohwille
Copy link
Member Author

hohwille added a commit to hohwille/ide that referenced this issue Oct 17, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 17, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 17, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 17, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 17, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 17, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 18, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 18, 2022
@hohwille hohwille added this to the release:2022.08.004 milestone Oct 18, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 24, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 25, 2022
hohwille added a commit to hohwille/ide that referenced this issue Oct 25, 2022
hohwille added a commit to hohwille/ide that referenced this issue Nov 3, 2022
hohwille added a commit that referenced this issue Nov 7, 2022
… doInstall (#934)

* #878: insteall latest version if unspecified

* #933: fixed typo

* #878: insteall latest version if unspecified also for docker

* #878: added to CHANGELOG

* #826: excuse rule for cobigen added

* #878: fixed stupid bug

* #847: fix for global tools and cobigen

* #878: #933: fixes and improvements

* #893: ability to configure version prefix

* #940: handle silent mode in doInstall and simplify doSetup

* #934: shellcheck fix

* #934: CHANGELOG

* #940: generalize macos workarounds

* #940: generalize macos workarounds

* #940: generalize macos workarounds

* #940: need to implement on mac, small improvements for debugging

* #940: generalize macos workarounds

* #940: generalize macos workarounds

* #940: fix - thanks shellcheck

* #940: fixed doInstall java extra arg order

* #940: OMG: fixed custom tools bug

* #893: extended test and fixed doVersionCompare

* #934: removed code entirely

* #934: removed TODO

* #934: simplified

* #934: fixed download caching

* #934: fixed aws

* #934: keep code to remove aws installer

* #934: fixed typos

* #957: symlink fix

* #957: symlink fix

* #934: fixed gcviewer

* #934: shellcheck fix

* #934: shellcheck war starts

* #934: improve DEVON_SOFTWARE_PATH on win

* #934: shellcheck fix

* #958: make symlinks work on windows

* #958: updated documentation

* #934: improved DoD from review comment

* #934: define HOME always on top

* #960: prevent "oc version" error

* #940: improve MacOS workaround

* #934: fixed doMavenArchetype

* #934: fixed aws

* #934: aligned and simplified

* #940: fixes for MacOS workaround

* #940: MacOS quickfix for eclipse

* #911: further improvements for eclipse

* #934: shellcheck fix

* #934: nasty shellcheck

* #960: added to CHANGELOG

* #961: split functions, fixed intellij version command on mac

* #961: fixed function doc

* Fix Add-plugin and custom start parameter

I fixxed the add plugin function which forgot to call vscode with "--install-extension".
And I changed the run command so it passes the arguments given to the run method, so you can run vscode with custom start parameters aswell now.

For example:
devon vscode run --list-extension

* #934: removed debug output

* #961: fixed function doc

* #934: #943: improve vscode plugin installation

* rename pip-latest-windows to pip-latest-pip

There was in an error installing pip on Windows because the installation file was renamed from pip-latest-windows-py to pip-latest-pip.py

* use cg --version

* #934: added missing X flags

* #940: fixed MacOS Workaround

* #934: python fix due to doInstall installer missuse

* #934: improved doc for shared software

* #934: rancher fix due to doInstall installer missuse

* #934: kubectl shall not have knowledge about docker installation

Co-authored-by: Genetics <102921542+Amueller36@users.noreply.github.com>
Co-authored-by: alfeilex <101652401+alfeilex@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant