generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 146
feat(install): setup for Windows / Linux / WSL #2392
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
Open
joergmann
wants to merge
26
commits into
main
Choose a base branch
from
add/wingetSetup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
9abb3bb
feat(install): setup for Windows
joergmann 29a0dcc
Update get-started/index.md
joergmann cc2c871
Merge branch 'main' into add/wingetSetup
joergmann 1b3f301
improvements
joergmann 7189791
make maven script one-liner
joergmann 51c0b50
Merge branch 'main' into add/wingetSetup
joergmann 1f8e8ee
Merge branch 'main' into add/wingetSetup
joergmann b65d14d
Merge branch 'main' into add/wingetSetup
joergmann 9a78495
better maven url
joergmann 7899bc4
add code sections
joergmann b781b46
Merge remote-tracking branch 'origin/main' into add/wingetSetup
joergmann 118e6d0
more fixes
joergmann f94db03
clean up
joergmann 6d707c2
Merge remote-tracking branch 'origin/main' into add/wingetSetup
joergmann 994e224
Merge branch 'main' into add/wingetSetup
joergmann 16a6dbd
fix github-desktop
joergmann 16f6be1
Merge remote-tracking branch 'origin/main' into add/wingetSetup
joergmann 6cee3f7
fix code block scrolling
joergmann 66280a0
remove gh-destop.deb
joergmann 7ed3ecb
revert theme change
joergmann a992a24
add feedback
joergmann 7c5158f
Merge branch 'main' into add/wingetSetup
joergmann 7ec7304
Merge branch 'main' into add/wingetSetup
joergmann 7d5971e
fix macOs setup
swaldmann 436f49d
Update get-started/index.md
joergmann aa0ec0c
Merge branch 'main' into add/wingetSetup
joergmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,71 +12,143 @@ Jumpstart & Grow as You Go... {.subtitle} | |
|
|
||
| A most minimalistic setup needs [CAP's _cds-dk_](https://www.npmjs.com/package/@sap/cds-dk) installed, which in turn requires [Node.js](https://nodejs.org). Add optional setups for [Java](https://sapmachine.io), [GitHub](https://github.com), and [Visual Studio Code](https://code.visualstudio.com), as appropriate, and as outlined below. | ||
|
|
||
| On macOS (and Linux), we recommend using [Homebrew](https://brew.sh), and run the commands in the subsequent sections in your terminal to get everything set up. | ||
| ### Preparation | ||
|
|
||
| ```shell | ||
| bash -c "$( curl https://raw.githubusercontent.com/homebrew/install/HEAD/install.sh )" | ||
| ``` | ||
|
|
||
| ::: details Alternative setup (required on Windows) ... | ||
|
|
||
| Instead of using Homebrew – which is not available on Windows –, you can manually download and install the required packages from their respective websites: | ||
|
|
||
| | Package | Install from | Remarks | | ||
| |---------|----------------------------------|---------------------------------------------------------| | ||
| | Node.js | https://nodejs.org | _required_ | | ||
| | Java | https://sapmachine.io | _optional_ | | ||
| | Git | https://git-scm.com | _optional_ | | ||
| | VS Code | https://code.visualstudio.com | + [recommended extensions](../tools/cds-editors#vscode) | | ||
| | SQLite | https://sqlite.org/download.html | _required_ on Windows | | ||
| On macOS, Linux and WSL (Windows Subsystem for Linux), we recommend using [Homebrew](https://brew.sh), and run the commands in the subsequent sections in your terminal to get everything set up. | ||
| On Windows PowerShell you can use the built-in `WinGet` command. | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Then install CAP's _cds-dk_ globally: | ||
|
|
||
| ```shell | ||
| npm add -g @sap/cds-dk | ||
| ``` | ||
| ::: code-group | ||
| ```shell [macOS] | ||
| bash -c "$( curl https://raw.githubusercontent.com/homebrew/install/HEAD/install.sh )" | ||
| ``` | ||
| ```shell [Linux / WSL] | ||
| # install | ||
| # curl (required to get Homebrew) | ||
| # git (required by Homebrew) | ||
| # just for completeness, this might already be installed on your machine | ||
| sudo apt install curl git -y | ||
| bash -c "$( curl https://raw.githubusercontent.com/homebrew/install/HEAD/install.sh )" | ||
| ``` | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ::: | ||
|
|
||
|
|
||
| <style scoped> | ||
| .required::before { content: 'Required:'; color: #999; margin-right: 0.5em } | ||
| .optional::before { content: 'Optional:'; color: #999; margin-right: 0.5em } | ||
| .proposed::before { content: 'Proposed:'; color: #999; margin-right: 0.5em } | ||
| </style> | ||
|
|
||
|
|
||
|
|
||
| ### Node.js and _cds-dk_ {.required} | ||
|
|
||
| ```shell | ||
| brew install node # Node.js | ||
| npm i -g @sap/cds-dk # CAP's cds-dk | ||
| ::: code-group | ||
| ```shell [macOS / Linux / WSL] | ||
| brew install node # Node.js LTS | ||
| npm i -g @sap/cds-dk # install CAP's cds-dk globally | ||
| cds -v # check cds version | ||
| ``` | ||
| ```PowerShell [Windows] | ||
| # pasting multiple lines PowerShell will bring a warning popup to accept | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This hint sounds confusing to me. Is it a just warning that I shall not paste multiple lines? Isn't it obvious to the user when he does it? Also, do we really need to repeat it over and over again? |
||
| winget install --silent OpenJS.NodeJS.LTS | ||
| # restart PowerShell to activate the new command | ||
| npm i -g @sap/cds-dk # install CAP's cds-dk globally | ||
| cds -v # check cds version | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ::: | ||
|
|
||
| ### SQLite (Windows) {.required} | ||
|
|
||
| ::: code-group | ||
| ```PowerShell [Windows] | ||
| # pasting multiple lines PowerShell will bring a warning popup to accept | ||
| winget install --silent SQLite.SQLite | ||
| # restart PowerShell to activate the new command | ||
| sqlite3 -version | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
| ::: | ||
|
|
||
| ### Java and Maven {.optional} | ||
|
|
||
| ```shell | ||
| ::: code-group | ||
| ```shell [macOS / Linux / WSL] | ||
| brew install sapmachine-jdk | ||
| brew install maven | ||
| mvn -version # display Maven and Java versions | ||
| ``` | ||
|
|
||
| ```PowerShell [Windows] | ||
| # pasting multiple lines PowerShell will bring a warning popup to accept | ||
| winget install --silent SAP.SapMachine.25.JDK | ||
|
|
||
| # Apache Maven is not available using winget so download it directly | ||
| $v="3.9.12"; ` | ||
| $url="https://dlcdn.apache.org/maven/maven-3/$v/binaries/apache-maven-$v-bin.zip"; ` | ||
| $mvnzip="$env:LOCALAPPDATA\maven.zip"; ` | ||
| curl $url -o $mvnzip; ` | ||
| tar -xf $mvnzip -C "$env:LOCALAPPDATA"; ` | ||
| setx PATH "$env:PATH;$env:LOCALAPPDATA\apache-maven-$v\bin"; ` | ||
| rm $mvnzip | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # restart PowerShell to activate the new commands | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| mvn -version # display Maven and Java versions | ||
| ``` | ||
| ::: | ||
|
|
||
| ### Git and GitHub {.optional} | ||
|
|
||
| ```shell | ||
| brew install git # Git CLI | ||
| brew install gh # GitHub CLI | ||
| ::: code-group | ||
| ```shell [macOS / Linux / WSL] | ||
| brew install git # Git CLI (for completeness, already installed for Homebrew) | ||
| brew install gh # GitHub CLI | ||
| git -v # display Git cli version | ||
| ``` | ||
| ```PowerShell [Windows] | ||
| # pasting multiple lines PowerShell will bring a warning popup to accept | ||
| winget install --silent Git.Git | ||
| winget install --silent GitHub.cli | ||
| # restart PowerShell to activate the new commands | ||
| git -v # display Git cli version | ||
| ``` | ||
| ::: | ||
| ::: code-group | ||
| ```shell [macOS] | ||
| brew install github # GitHub Desktop App | ||
| ``` | ||
|
|
||
| ```shell [Linux / WSL] | ||
| # Github-Desktop on Homebrew is only supported for macOS | ||
| GHD_VERSION="3.3.12" | ||
| curl -L \ | ||
| https://github.com/shiftkey/desktop/releases/download/release-${GHD_VERSION}-linux1/GitHubDesktop-linux-amd64-${GHD_VERSION}-linux1.deb \ | ||
| -o github-desktop.deb | ||
| sudo apt install ./github-desktop.deb | ||
| rm ./github-desktop.deb | ||
| ``` | ||
| ```PowerShell [Windows] | ||
| # pasting multiple lines PowerShell will bring a warning popup to accept | ||
| winget install --silent GitHub.GitHubDesktop | ||
| # restart PowerShell to activate the new commands | ||
| ``` | ||
| ::: | ||
|
|
||
|
|
||
| ### Visual Studio Code {.proposed} | ||
|
|
||
| ```shell | ||
| brew install --cask visual-studio-code # VS Code itself | ||
| ::: code-group | ||
| ```shell [macOS] | ||
| brew install --cask visual-studio-code # VS Code itself | ||
| code -v # display VS Code's version | ||
| ``` | ||
| ```bash [Linux / WSL] | ||
| # VS Code on Homebrew is only supported for macOS | ||
| sudo snap install --classic code | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| code -v # display VS Code's version | ||
| ``` | ||
| ```PowerShell [Windows] | ||
| # pasting multiple lines PowerShell will bring a warning popup to accept | ||
| winget install --silent Microsoft.VisualStudioCode | ||
| # restart PowerShell to activate the new command | ||
| code -v # display VS Code's version | ||
joergmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
| ::: | ||
|
|
||
| #### Visual Studio Code proposed extensions {.proposed} | ||
| ```shell | ||
| code --install-extension sapse.vscode-cds # for .cds models | ||
| code --install-extension mechatroner.rainbow-csv # for .csv files | ||
|
|
@@ -92,6 +164,18 @@ code --install-extension vscjava.vscode-maven # for Maven | |
|
|
||
| > You can of course also use other IDEs or editors of your choice, such as [IntelliJ IDEA](https://www.jetbrains.com/idea/), for which we also provide [support](../tools/cds-editors#intellij). Yet we strongly recommend Visual Studio Code for the best experience with CAP. | ||
|
|
||
| ::: details Alternative setup ... | ||
|
|
||
| You can also manually download and install the required packages from their respective websites: | ||
|
|
||
| | Package | Install from | Remarks | | ||
| |---------|----------------------------------|---------------------------------------------------------| | ||
| | Node.js | https://nodejs.org | _required_ | | ||
| | Java | https://sapmachine.io | _optional_ | | ||
| | Git | https://git-scm.com | _optional_ | | ||
| | VS Code | https://code.visualstudio.com | + [recommended extensions](../tools/cds-editors#vscode) | | ||
| | SQLite | https://sqlite.org/download.html | _required_ on Windows | | ||
| ::: | ||
|
|
||
| ## Command Line Interface | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.