@ -4,21 +4,56 @@ This is a collection of automated installer scripts for "real programmers." The
install various base packages most programmers need, and then specific packages you'll need to work
in the language you choose. The scripts are based on [Chris Titus' Winutil ](https://github.com/ChrisTitusTech/winutil ) but redesigned to allow you to run the script as a normal user and becoming admin as needed. If you want more software then check out Chris' very nice script.
> _UPDATE FOR 2025_ The latest version of these scripts features only WinGet for installation.
> Chocolatey doesn't update their packages often enough and WinGet is officially supported by
> Microsoft. This does mean though that we have to deal with Microsoft employees doing weird things
> with the PATH so please read about `pathfixer.ps1` below.
## How to Use It
First, you run the `base.ps1` script to get an initial setup of basic things all other languages
need. This allows you to then install any other languages very quickly:
```shell
irm https://learncodethehardway.com/setup /base.ps1 -outfile base.ps1
irm https://git.learnjsthehardway.com/learn-code-the-hard-way/lcthw-windows-installers/raw/branch/master /base.ps1 -outfile base.ps1
powershell -executionpolicy bypass .\base.ps1
```
### Fixing the PATH
There is now a problem you need to fix with the PATH. As usual, Microsoft uses the PATH as a way to
suppress competing software. Yes, this is as dumb and banal as it sounds, but when you look at bug
reports from WinGet developers regarding the PATH they claim you have to have Administrator rights
and create symlinks just to put things in the PATH. Yet, here's 2 lines of PowerShell that does it:
```shell
$newPath = $env:PATH + ";$winlibsPath\mingw64\bin"
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
```
Yes, this is all you need to do, but Microsoft employees weirdly won't put certain competing
products in the PATH in order to add friction to the install so that people just give up and use
their commercial products. As I said, this is about the stupidest most banal things ever, and we'll
fix it with an equally stupid and banal PowerShell script:
``
irm https://git.learnjsthehardway.com/learn-code-the-hard-way/lcthw-windows-installers/raw/branch/master/pathfixer.ps1 -outfile pathfixer.ps1
powershell -executionpolicy bypass .\pathfixer.ps1
``
The `pathfixer.ps1` script checks if the PATH is missing for WinLibs and Git (yes, only these two
are missing, and incidentally Microsoft has a competitor to both). If these directories are not in
the PATH it adds them. _This script will also make a backup of your path and place it in
`path_backup.txt` _.
## Adding Python
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
irm https://git.learnjsthehardway.com/learn-code-the-hard-way/lcthw-windows-installers/raw/branch/master /python.ps1 -outfile python.ps1
powershell -executionpolicy bypass .\python.ps1
```
@ -34,7 +69,6 @@ only thing each language script does is run some `winget` commands.
The `base.ps1` script installs the following packages:
* [winget ](https://github.com/microsoft/winget-cli ) -- Package installer created by Microsoft.
* [chocolatey ](https://chocolatey.org/ ) -- Additional package installer.
* [git ](https://git-scm.com/ ) -- Installed via winget.
* [Windows Terminal ](https://github.com/microsoft/terminal ) -- The new Terminal package for Windows 10/11.
* [CMake ](https://cmake.org/ ) -- Used in quite a lot of builds for plugins in other languages.
@ -57,6 +91,7 @@ compatible with each other since they won't install things more than once.
This script is meant for C/C++ programming and installs the following:
* GNU Make -- A very useful C++ package system that helps get access to C++ libraries.
* [conan ](https://conan.io ) -- A very useful C++ package system that helps get access to C++ libraries.
* [meson ](https://mesonbuild.com/ ) -- So far the best cross platform build tool I've found, but it does have it's own problems.
@ -65,9 +100,9 @@ I also recommend you install [vcpkg](https://github.com/microsoft/vcpkg) to get
To install yourself run:
```shell
choco install winlibs
choco install cona n
choco install meson
winget install ezwinports.make
winget install mesonbuild.meso n
winget install Kitware.CMake
```
The `winlibs` command is just to make sure it gets installed for people who don't use the `base.ps1`