Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,33 @@ Setting up a new machine is tedious. Hunting down the right tools, configuring s

## Setup Instructions

Start with the macOS launchpad. It guides you through the available setup profiles and runs the right scripts in order.

```console
git clone https://github.com/yaravind/dev-tools.git
cd dev-tools
zsh scripts/macos/launchpad.sh
```

![macOS launchpad dark mode](assets/launchpad-dark.png)

To preview the selected profile without making changes, run:

```console
zsh scripts/macos/launchpad.sh --dry-run
```

For script-by-script setup, platform-specific prerequisites, minimal Spark/Scala/Java setup, Windows setup, and rollback steps, see [Detailed Setup Instructions](#detailed-setup-instructions).

## Detailed Setup Instructions

- [macOS (Apple Silicon + Intel)](#macos-apple-silicon--intel)
- [Steps](#steps)
- [Full profile](#full-profile)
- [Manual mode](#manual-mode)
- [Minimal setup for Spark/Scala/Java development](#minimal-setup-for-sparkscalajava-development)
- [Windows (10/11)](#windows-1011)
- [Steps](#steps-1)
- [Launchpad](#launchpad)
- [Manual mode](#manual-mode-1)
- [Minimal setup for Spark/Scala/Java development](#minimal-setup-for-sparkscalajava-development-1)

### macOS (Apple Silicon + Intel)
Expand Down Expand Up @@ -64,16 +86,18 @@ You can also install by just `git + Enter` in the shell.

![Xcode install](assets/xcode-install.png)

#### Steps
#### Full profile

1. If your Mac is **managed (work or school)** then try to get an admin account and switch user. For e.g. if the admin
account is `admin_acct` then `su admin_acct` and enter the password for that account with higher privileges. Or you could use the
account is `admin_acct` then `su admin_acct` and enter the password for that account with higher privileges.
2. Install [Homebrew](https://brew.sh/) (**Pre-requisite**)
3. Clone this repo: `git clone https://github.com/yaravind/dev-tools.git` or download as zip (**Pre-requisite**)
4. cd <kbd>dev-tools</kbd>
5. Run the interactive launchpad and choose a setup profile: <kbd>zsh scripts/macos/launchpad.sh</kbd>
6. To preview without making changes, run: <kbd>zsh scripts/macos/launchpad.sh --dry-run</kbd>

#### Manual mode

Manual mode is still available if you prefer one script at a time:

1. Run <kbd>zsh scripts/macos/pre_setup.sh</kbd>
Expand Down Expand Up @@ -122,7 +146,7 @@ A lightweight bootstrap script (`scripts/macos/setup_env_min.sh`) is available f
> Windows 10
> - PowerShell 5.1 or later (PowerShell 7+ recommended)

#### Steps
#### Launchpad

1. Clone this repo: `git clone https://github.com/yaravind/dev-tools.git` or download as zip (**Pre-requisite**)
2. Open **PowerShell as Administrator**
Expand All @@ -132,6 +156,8 @@ A lightweight bootstrap script (`scripts/macos/setup_env_min.sh`) is available f

The `.cmd` launchers start PowerShell with a process-scoped execution-policy bypass. If you run `.ps1` files directly instead, use `powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\windows\launchpad.ps1`.

#### Manual mode

Manual mode is still available if you prefer one script at a time:

1. Run: <kbd>.\scripts\windows\setup_env.cmd</kbd>
Expand Down
Binary file added assets/launchpad-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions config/intellij.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# IntelliJ IDEA plugin IDs (https://plugins.jetbrains.com)
# One plugin ID per line. Blank lines and comments are ignored.
# Prefix installable entries with `community:` or `ultimate:`.
# Prefix non-installable documented entries with `bundled:` or `unavailable:`.
# Use raw plugin IDs for entries that should be installed in both modes.

# NOTES:
# com.redhat.devtools.lsp4ij is needed by agnix
Expand All @@ -25,4 +25,4 @@ community:io.agnix.jetbrains

# Ultimate-only plugins (installed only in --ultimate mode)
ultimate:com.intellij.cron
unavailable:com.intellij.ml.llm.experimental
com.intellij.ml.llm.experimental
8 changes: 4 additions & 4 deletions config/pycharm.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# PyCharm plugin IDs (https://plugins.jetbrains.com)
# One plugin ID per line. Blank lines and comments are ignored.
# Prefix installable entries with `community:` or `professional:`.
# Prefix non-installable documented entries with `bundled:` or `unavailable:`.
# Use raw plugin IDs for entries that should be installed in both modes.

# Community-compatible plugins
community:com.github.copilot
community:Key Promoter X
bundled:org.jetbrains.plugins.github
bundled:org.jetbrains.plugins.yaml
org.jetbrains.plugins.github
org.jetbrains.plugins.yaml
community:com.intellij.mermaid
community:mobi.hsz.idea.gitignore
community:net.ashald.envfile
com.intellij.ml.llm
io.agnix.jetbrains

# Professional-only plugins (installed only in --professional mode)
unavailable:com.intellij.ml.llm.experimental
com.intellij.ml.llm.experimental
ru.adelf.idea.dotenv
10 changes: 7 additions & 3 deletions scripts/windows/run_tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ function Add-DryRunFailure {
function Test-LastExitCode {
param([string]$Label)

if ($global:LASTEXITCODE -ne 0 -and $null -ne $global:LASTEXITCODE) {
Add-DryRunFailure "$Label failed with exit code $global:LASTEXITCODE"
$exitCode = $global:LASTEXITCODE
$global:LASTEXITCODE = 0

if ($exitCode -ne 0 -and $null -ne $exitCode) {
Add-DryRunFailure "$Label failed with exit code $exitCode"
return $false
}

Expand Down Expand Up @@ -281,6 +284,7 @@ try {
New-Item -ItemType File -Force -Path (Join-Path $mockJdkBin "java.exe") | Out-Null

if ($IsWindows) {
$mockJdkForBatch = $mockJdk -replace '/', '\'
Set-Content -LiteralPath (Join-Path $mockRoot "jenv.cmd") -Value @'
@echo off
if "%1"=="list" (
Expand All @@ -291,7 +295,7 @@ if "%1"=="list" (
echo -path C:\Program Files\Microsoft\jdk-11.0.30.7-hotspot
echo jdk-11.0.30.7-hotspot C:\Program Files\Microsoft\jdk-11.0.30.7-hotspot
echo jdk-17.0.20.8-hotspot C:\Program Files\Microsoft\jdk-17.0.20.8-hotspot
echo jdk-21.0.12.8-hotspot C:\Program Files\Microsoft\jdk-21.0.12.8-hotspot
'@ + " echo jdk-21.0.12.8-hotspot $mockJdkForBatch`r`n" + @'
echo All locally specified versions
exit /b 0
)
Expand Down
Loading