diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 70ce6f0fc7..f565b0ce17 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -19,6 +19,7 @@ General Development - [Setup](en/general-development/setup.md) - [How do I code?](en/general-development/setup/howdoicode.md) - [Setting up a Development Environment](en/general-development/setup/setting-up-a-development-environment.md) + - [You forgot your path variable](en/general-development/setup/you-forgot-your-path-variables.md) - [Git for the SS14 Developer](en/general-development/setup/git-for-the-ss14-developer.md) - [Server Hosting Tutorial](en/general-development/setup/server-hosting-tutorial.md) - [Codebase Info](en/general-development/codebase-info.md) diff --git a/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/cmd-example-1.png b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/cmd-example-1.png new file mode 100644 index 0000000000..6b06d15703 Binary files /dev/null and b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/cmd-example-1.png differ diff --git a/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/cmd-example-2.png b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/cmd-example-2.png new file mode 100644 index 0000000000..7fe38ad792 Binary files /dev/null and b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/cmd-example-2.png differ diff --git a/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-1.png b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-1.png new file mode 100644 index 0000000000..0eb3952903 Binary files /dev/null and b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-1.png differ diff --git a/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-2.png b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-2.png new file mode 100644 index 0000000000..480a8d5697 Binary files /dev/null and b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-2.png differ diff --git a/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-3.png b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-3.png new file mode 100644 index 0000000000..d9a62a6f64 Binary files /dev/null and b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-3.png differ diff --git a/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-4.png b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-4.png new file mode 100644 index 0000000000..8d5238c491 Binary files /dev/null and b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-4.png differ diff --git a/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-5.png b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-5.png new file mode 100644 index 0000000000..22cb055b0b Binary files /dev/null and b/src/en/assets/images/general-development/setup/you-forgot-your-path-variables/step-5.png differ diff --git a/src/en/general-development/setup/setting-up-a-development-environment.md b/src/en/general-development/setup/setting-up-a-development-environment.md index 9b0f797b3a..88bf12afd6 100644 --- a/src/en/general-development/setup/setting-up-a-development-environment.md +++ b/src/en/general-development/setup/setting-up-a-development-environment.md @@ -19,7 +19,6 @@ Currently the C# Dev tools extension does not seem to fully support SLNX. You may follow this step by [Microsoft](https://devblogs.microsoft.com/dotnet/introducing-slnx-support-dotnet-cli/#c#-dev-kit) to be able to open an SLNX dotnet project. VSCodium seems to not have the ability at all. (https://github.com/muhammadsammy/free-vscode-csharp/issues/95) (Although the above may work in VSCodium as well.) - ``` ~~~admonish info title="Windows and winget" @@ -43,8 +42,15 @@ And one of the following ide's: ``winget install VSCodium.VSCodium`` (VSCodium) ~~~ +## Windows Path Variables +When installing Python and Git, you may be presented with the option to include the application in "path". + +Unless you are intentionally against this for one reason or another and know what you are doing, you will want this option enabled. + +If you find you are having errors running RUN_THIS.py or git, see ["So you forgot the path variables"](./you-forgot-your-path-variables.md). + ## Stuck? -Are you stuck? Don't understand how to do a certain part? This video should help +Are you stuck or don't understand how to do a certain part? This video has step-by-step instructions on setting up a development environment. This video is intended to be followed *along with the guide* and may become out of date. diff --git a/src/en/general-development/setup/you-forgot-your-path-variables.md b/src/en/general-development/setup/you-forgot-your-path-variables.md new file mode 100644 index 0000000000..2823866b1e --- /dev/null +++ b/src/en/general-development/setup/you-forgot-your-path-variables.md @@ -0,0 +1,72 @@ +# So, you forgot to add git to path. + +If you've forgotten to add git and python to path during install, or weren't provided with the option to do so, you're in the right place. + +Your path environment contains "paths" (funny, right?) to folders that contain command line executables, among other things. + +Your command line tool then makes these executables invokable without you needing to know or point to where the exe is located. + +![command-example](../../assets/images/general-development/setup/you-forgot-your-path-variables/cmd-example-1.png) + +The difference is left and right as it were. + +# So, why do I need this? + +Some of the tools we use to make development easier don't assume or make exceptions if you *don't* have your path variables setup. + +.\RUN_THIS.py for instance. While you can invoke the script by directly pointing to a python executable, the script itself is going to call "git". It doesn't know where git is installed, so if git isn't in your path variable, the command will fail. This comes in the form of a FileNotFoundError. If that's what you're seeing, now you know why. + +# So, how do I fix it? + +There are a few steps, but follow closely and you'll get there. It's really not that hard. + +- Click start and type Path. + +- Click "Edit the system environment variables". You may be prompted by UAC. + +![step-1](../../assets/images/general-development/setup/you-forgot-your-path-variables/step-1.png) + +- Click "Environment Variables" in the bottom right corner. + +![step-2](../../assets/images/general-development/setup/you-forgot-your-path-variables/step-2.png) + +- Double-click on Path in either the upper or lower white box. + +~~~admonish info "System or User?" +You have a choice here. If you want other users on your computer to have easy access to these command line applications, choose system (lower box). Otherwise, choose user (upper box). +~~~ + +![step-3](../../assets/images/general-development/setup/you-forgot-your-path-variables/step-3.png) + +- This next bit is the hard part. You need to know where python and git are installed. + +~~~admonish info "Install Locations" +If you didn't change where the applications are installed during setup, try checking where they go by defalut first. + +For Python: + C:\Program Files\Python\ (All Users) + C:\Users\\AppData\Local\Programs\Python\Python\ (Per User) + +For Git: + C:\Program Files\Git\cmd\ +~~~ + +- In the "Edit environment variable" window, double-click on a new line. A text entry box will appear and the line will highlight blue. + +![step-4](../../assets/images/general-development/setup/you-forgot-your-path-variables/step-4.png) + +- Add git and python to path. You'll want to make sure path is targeting the /cmd/ folder for git and both the root and /scripts/ folder for python. + +![step-5](../../assets/images/general-development/setup/you-forgot-your-path-variables/step-5.png) + +- Make certain you click OK on all three windows. Otherwise, your changes here won't save, and you'll still be having problems. + +- Close and restart your terminal application. Path changes don't take effect immediately. You have to restart any terminals using the path variable before changes will work. + +- Test your changes. Open a new terminal instance and run "git". + +![img.png](../../assets/images/general-development/setup/you-forgot-your-path-variables/cmd-example-2.png) + +# And done. + +That's all she wrote. If, for some reason, you're still getting a command not recognized error or RUN_THIS.py is throwing a FileNotFoundError, go back and ensure your changes to the path variable are saved, spelling is correct, and you're pointing to the right directory. Any mistakes made here will mean you're not correctly pointing at the right location, and as such, commands will not work. If you're still having trouble, you can ask for help in the [official Space Station 14 Discord server's](https://discord.spacestation14.com) [#howdoicode](https://discord.com/channels/310555209753690112/560845886263918612) channel. \ No newline at end of file