Skip to content

Commit

Permalink
revert(install): revert node/python install on Windows (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored Sep 3, 2024
1 parent 6e62ff2 commit 1aa5789
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 76 deletions.
141 changes: 68 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ lin.nvim is a highly configured [Neovim](https://neovim.io/) distribution integr
- [Get started](#get-started)
- [MacOS/Linux](#macoslinux)
- [Windows](#windows)
- [Enable developer mode](#enable-developer-mode)
- [Install Visual Studio](#install-visual-studio)
- [Install Python 3.x](#install-python-3x)
- [Install Node.js](#install-nodejs)
- [Run PowerShell commands](#run-powershell-commands)
<!-- - [Enable developer mode](#enable-developer-mode) -->
<!-- - [Install Visual Studio](#install-visual-studio) -->
<!-- - [Install Python 3.x](#install-python-3x) -->
<!-- - [Install Node.js](#install-nodejs) -->
<!-- - [Run PowerShell commands](#run-powershell-commands) -->
- [Patched GUI Font](#patched-gui-font)
- [User guide](#user-guide)

Expand Down Expand Up @@ -69,74 +69,69 @@ And that's all of it.

### Windows

#### Enable developer mode

Please see: [Active developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development#activate-developer-mode).

#### Install Visual Studio

Install [Visual Studio](https://www.visualstudio.com/) with MSVC components:

- .NET Desktop Development
- Desktop development with C++

![image](https://github.com/linrongbin16/lin.nvim/assets/6496887/bca811b5-8b1a-42c0-9283-c38e75f2f06a)

#### Install Python 3.x

Install [Python 3.x](https://www.python.org/downloads/) only for current user.

<details>
<summary>Click here to see how to install python3 only for current user.</summary>

- Select "Customize Installation", unselect "Use admin privileges when installing py.exe".

<img width="70%" alt="image" src="https://github.com/user-attachments/assets/e8aa9163-459e-4741-8561-c46efc2efdb5"/>

- Select all optional features without "for all users (requires admin privileges)".

<img width="70%" alt="image" src="https://github.com/user-attachments/assets/648ec440-b0ec-4373-9c66-7bf32e48d899"/>

- Unselect "Install Python 3.12 for all users", select "Add Python to environment variables" and "Precompile standard library", choose the install directory in your user directory (for example `C:\Users\linrongbin\opt\Python312`).

<img width="70%" alt="image" src="https://github.com/user-attachments/assets/568773e3-be4b-4b19-b444-c4880437a521"/>

- Go to the install directory (`C:\Users\linrongbin\opt\Python312`) and copy `python.exe` to `python3.exe`, and you will have `python3.exe` command in Windows PowerShell/cmd.

- Disable "python.exe" and "python3.exe" app aliases for Windows 10+. Go to Windows "Settings" => "Apps" => "App execution aliases", unselect "python.exe" and "python3.exe".

<img width="80%" alt="image" src="https://github.com/user-attachments/assets/e6e2422d-953d-44b5-8f5e-820e2f355680"/>

<img width="80%" alt="image" src="https://github.com/user-attachments/assets/f78d4dc2-b167-4981-9fa0-598edf8af0d5"/>

<img width="80%" alt="image" src="https://github.com/user-attachments/assets/17baf876-e072-49eb-bed2-4b2436d85ad1"/>

</details>

#### Install Node.js

Install [Node.js](https://nodejs.org/) only for current user.

<details>
<summary>Click here to see how to install node only for current user.</summary>

- In "Destination Folder", choose the install directory in you user directory (for example `C:\Users\linrongbin\opt\nodejs\`).

<img width="70%" alt="image" src="https://github.com/user-attachments/assets/abccc9b6-2b42-4679-a182-420554a6483b"/>

</details>

#### Run PowerShell commands

```powershell
# scoop
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
git clone https://github.com/linrongbin16/lin.nvim $env:USERPROFILE\.nvim
cd $env:USERPROFILE\.nvim
.\install.ps1
```
- [Enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development#activate-developer-mode).
- Install [Visual Studio](https://www.visualstudio.com/) with MSVC components:

- .NET Desktop Development
- Desktop development with C++

![image](https://github.com/linrongbin16/lin.nvim/assets/6496887/bca811b5-8b1a-42c0-9283-c38e75f2f06a)

<!-- #### Install Python 3.x -->
<!---->
<!-- Install [Python 3.x](https://www.python.org/downloads/) only for current user. -->
<!---->
<!-- <details> -->
<!-- <summary>Click here to see how to install python3 only for current user.</summary> -->
<!---->
<!-- - Select "Customize Installation", unselect "Use admin privileges when installing py.exe". -->
<!---->
<!-- <img width="70%" alt="image" src="https://github.com/user-attachments/assets/e8aa9163-459e-4741-8561-c46efc2efdb5"/> -->
<!---->
<!-- - Select all optional features without "for all users (requires admin privileges)". -->
<!---->
<!-- <img width="70%" alt="image" src="https://github.com/user-attachments/assets/648ec440-b0ec-4373-9c66-7bf32e48d899"/> -->
<!---->
<!-- - Unselect "Install Python 3.12 for all users", select "Add Python to environment variables" and "Precompile standard library", choose the install directory in your user directory (for example `C:\Users\linrongbin\opt\Python312`). -->
<!---->
<!-- <img width="70%" alt="image" src="https://github.com/user-attachments/assets/568773e3-be4b-4b19-b444-c4880437a521"/> -->
<!---->
<!-- - Go to the install directory (`C:\Users\linrongbin\opt\Python312`) and copy `python.exe` to `python3.exe`, and you will have `python3.exe` command in Windows PowerShell/cmd. -->
<!---->
<!-- - Disable "python.exe" and "python3.exe" app aliases for Windows 10+. Go to Windows "Settings" => "Apps" => "App execution aliases", unselect "python.exe" and "python3.exe". -->
<!---->
<!-- <img width="80%" alt="image" src="https://github.com/user-attachments/assets/e6e2422d-953d-44b5-8f5e-820e2f355680"/> -->
<!---->
<!-- <img width="80%" alt="image" src="https://github.com/user-attachments/assets/f78d4dc2-b167-4981-9fa0-598edf8af0d5"/> -->
<!---->
<!-- <img width="80%" alt="image" src="https://github.com/user-attachments/assets/17baf876-e072-49eb-bed2-4b2436d85ad1"/> -->
<!---->
<!-- </details> -->
<!---->
<!-- #### Install Node.js -->
<!---->
<!-- Install [Node.js](https://nodejs.org/) only for current user. -->
<!---->
<!-- <details> -->
<!-- <summary>Click here to see how to install node only for current user.</summary> -->
<!---->
<!-- - In "Destination Folder", choose the install directory in you user directory (for example `C:\Users\linrongbin\opt\nodejs\`). -->
<!---->
<!-- <img width="70%" alt="image" src="https://github.com/user-attachments/assets/abccc9b6-2b42-4679-a182-420554a6483b"/> -->
<!---->
<!-- </details> -->

- Run below PowerShell commands:

```powershell
# scoop
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
git clone https://github.com/linrongbin16/lin.nvim $env:USERPROFILE\.nvim
cd $env:USERPROFILE\.nvim
.\install.ps1
```

Check out [installation](https://linrongbin16.github.io/lin.nvim/#/install) for more details.

Expand Down
6 changes: 3 additions & 3 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ function PythonDependency()
{
Info "install python3/pip packages"
# python
# Install -command "scoop install python" -target "python3"
# Install -command "scoop install python" -target "pip3"
Install -command "scoop install python" -target "python3"
Install -command "scoop install python" -target "pip3"

# $PythonHasPep668 = python3 -c 'import sys; major=sys.version_info.major; minor=sys.version_info.minor; micro=sys.version_info.micro; r1=major >= 3 and minor > 11; r2=major >= 3 and minor == 11 and micro >= 1; print(1 if r1 or r2 else 0)'
# if ($PythonHasPep668 -eq 1) {
Expand All @@ -130,7 +130,7 @@ function NodejsDependency()
{
Info "install node/npm packages"
# nodejs
# Install -command "scoop install nodejs" -target "node"
Install -command "scoop install nodejs" -target "node"
# npm
npm install --silent -g neovim
Install -command "npm install --silent -g trash-cli" -target "trash"
Expand Down

0 comments on commit 1aa5789

Please sign in to comment.