From 8831f532393cfe62da1ff6a6eb54147f2d9e1537 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Wed, 10 Jul 2024 11:04:39 -0400 Subject: [PATCH] Alter bigtest.ps1 so that it doesn't do the base install which allows choco to get properly setup. Also tell people to close powershell to get the new PATH. --- README.md | 34 ++++++++++++++++++++++++++-------- bigtest.ps1 | 2 +- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3643cf3..38bd3e8 100644 --- a/README.md +++ b/README.md @@ -18,20 +18,17 @@ irm https://learncodethehardway.com/setup/base.ps1 -outfile base.ps1 powershell -executionpolicy bypass .\base.ps1 ``` -After this script runs you should be ready, so just pick the language to install and run it like -this: - -```shell -irm https://learncodethehardway.com/setup/python.ps1 | iex -``` - -You can also save the script locally first and view it before running it: +After this script runs you should be ready, but close this PowerShell instance and start a new one +just in case. Then run this: ```shell irm https://learncodethehardway.com/setup/python.ps1 -outfile python.ps1 powershell -executionpolicy bypass .\python.ps1 ``` +If you get an error that "Chocolatey is not installed" then you forgot to close your PowerShell and +start a new one. It's because the PATH needs to be reset because Windows is dumb. + You can also use `winget` and/or `choco` to install what you want manually. See the instructions below for your language to learn how to do that, or get the script and just look at it. Usually the only thing each language script does is run some `winget` commands. @@ -168,6 +165,27 @@ To install this yourself use: winget install CrystalLang.Crystal ``` +## The `bigtest.ps1` Script + +There's a test script that you can run if you want to install all scripts from the git repo. You +use it like this: + +```shell +irm https://learncodethehardway.com/setup/base.ps1 -outfile base.ps1 +powershell -executionpolicy bypass .\base.ps1 +``` + +Then close your PowerShell to ensure you get the `winget` and `choco` installs. Then run the +`bigtest.ps1` script and be sure to stay near your computer to keep entering your password: + +```shell +irm https://learncodethehardway.com/setup/bigtest.ps1 -outfile bigtest.ps1 +powershell -executionpolicy bypass .\bigtest.ps1 +``` + +After that you'll have every language I've figured out. Be sure to email +help@learncodethehardway.com and tell me if it worked or not for you. + ## Contributing Installers If you have a language that needs this kind of installer then feel free to grab one of these and diff --git a/bigtest.ps1 b/bigtest.ps1 index ea243b5..a9358ec 100644 --- a/bigtest.ps1 +++ b/bigtest.ps1 @@ -1,7 +1,7 @@ mkdir test cd test -$scripts = 'base.ps1', 'python.ps1', 'cpp.ps1', 'nodejs.ps1', 'bunjs.ps1', 'ruby.ps1', 'go.ps1', 'zig.ps1', 'crystal.ps1' +$scripts = 'python.ps1', 'cpp.ps1', 'nodejs.ps1', 'bunjs.ps1', 'ruby.ps1', 'go.ps1', 'zig.ps1', 'crystal.ps1' foreach($script in $scripts) { irm https://git.learnjsthehardway.com/learn-code-the-hard-way/lcthw-windows-installers/raw/branch/master/$script -outfile $script