Skip to content

Commit 6647850

Browse files
ISSOtmavivace
andauthored
Overhaul install instructions (#47)
* Use tabs and lists for source-grabbing instructions Should be less confusing, I think * Reorganise install instructions to make them clearer Split off different install methods to different pages to avoid confusion * Clean up "build from source" page Reflow the page to reduce clutter --------- Co-authored-by: Antonio Vivace <[email protected]>
1 parent e4bbfef commit 6647850

File tree

4 files changed

+294
-258
lines changed

4 files changed

+294
-258
lines changed

src/pages/install.md

Lines changed: 0 additions & 258 deletions
This file was deleted.

src/pages/install/index.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# Installing RGBDS
6+
7+
Most people will want to use a release (the latest the bestest!), but if you are willing to help us test new features, you may consider [using a development version](/install/master).
8+
9+
The two main options to install a release of RGBDS are to download pre-built executables, or to [build from source](/install/source).
10+
Below is a list of <abbr title="Operating System">OS</abbr>es for which we know pre-built executables are available.
11+
12+
If your OS isn’t listed below, try finding `rgbds` in your package manager—refer to your OS' documentation for help.
13+
If you still can’t find RGBDS, or the specific version you are looking for is unavailable, you will have to [compile it from source](#building-from-source).
14+
15+
<Tabs>
16+
<TabItem value="windows" label="Windows">
17+
18+
The install instructions change a bit depending on the environment you wish to use RGBDS with.
19+
20+
:::tip
21+
22+
The "plain Windows" instructions may also work for some environments listed further below, since most of them pick up Windows' `PATH`.
23+
However, if you have such an environment, we recommend you follow its specific install instructions instead.
24+
25+
:::
26+
27+
<details>
28+
<summary>"Plain" Windows (CMD, PowerShell)</summary>
29+
30+
1. First, [pick the version you want to install](/docs). If you want to [use `master`](/docs/master/#what) instead of a release, [go here](#using-rgbds-master).
31+
2. Follow the "release page" link below "GitHub links", and grab either of the `win32` (for 32-bit Windows) or `win64` (for 64-bit Windows) `.zip` files, near the bottom of the page.
32+
3. Unzip that file, you should get the `.exe` files alongside a couple of `.dll`s.
33+
4. Either:
34+
- Put all of the files in a directory, then add it to the `PATH`.
35+
This will permanently allow you to use RGBDS. If you only want to modify the PATH temporarily, instead of the permanent [`setx` command](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/setx), you can use the **temporary** [`set` one](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1): <code>set PATH="%PATH%<var>&lt;rgbds_path&gt;</var></code> for `cmd.exe`.
36+
Use one of the following methods:
37+
- Graphically:
38+
1. Open Control Panel
39+
2. Click "User Accounts"
40+
3. Click "User Accounts" again
41+
4. Click "Change my environment variables"
42+
5. Select the "Path" line in the **top** panel
43+
6. Click "Edit..."
44+
7. Click "Browse...", select the folder the files are in, and click OK
45+
8. Make sure that the new entry (which should be highlighted) is at the bottom of the list; if not, click on "Move Down" until it is
46+
9. Click "OK"
47+
10. Click "OK"
48+
- Using a command line:
49+
1. Use Explorer to go into the folder the files are in (you should see `rgbasm.exe` etc.), and click a blank part of the address bar near the top. Copy this path, and **use this instead of <code><var>&lt;rgbds_path&gt;</var></code> in the third step!**
50+
2. Open `cmd` or PowerShell
51+
3. Type <code>setx PATH "%PATH%<var>&lt;rgbds_path&gt;</var>;"</code> for `cmd.exe`, or <code>setx PATH ${"{"}Env:PATH}<var>&lt;rgbds_path&gt;</var>;</code> for PowerShell; replace <code><var>&lt;rgbds_path&gt;</var></code> with the path you copied in the first step
52+
4. Close the window for the changes to take effect
53+
- Put all of the files in your project's directory
54+
- Put all of the files in a directory already in the `PATH`
55+
5. Profit! RGBDS can now be used from your favorite command line (`cmd.exe` or PowerShell, most likely). You can test it by running `rgbasm --version`.
56+
57+
</details>
58+
<details>
59+
<summary>Cygwin, MSYS2</summary>
60+
61+
Follow steps 1 to 3 of the "plain Windows" instructions to get the release's files; then, copy all of the `.exe` and `.dll` files to the `/usr/local/bin` directory of Cygwin/MSYS2's installation.
62+
(You can get its equivalent Windows path by running `cygpath -w /usr/local/bin`.)
63+
**Do not put them in a subdirectory** (e.g. `/usr/local/bin/rgbds`)**!**
64+
This would not work.
65+
66+
After that, you should be able to use RGBDS from within the Cygwin/MSYS2 terminal, which you can confirm by running `rgbasm -V`.
67+
If this doesn't work, check that `/usr/local/bin` is within the PATH there (`echo $PATH`); if it isn't, you must add it (e.g. `export PATH="/usr/local/bin:$PATH"` in the `~/.bashrc`).
68+
69+
Note: if you can choose between using Cygwin or MSYS2, be advised that Cygwin is slower and has been reported to cause a bit of trouble to some.
70+
71+
</details>
72+
<details>
73+
<summary>WSL, and all other Linux-like environments</summary>
74+
75+
For these, you have to [build from source](/install/source).
76+
On WSL, the default package manager (to install any build prerequisites) is `apt-get` (example: `sudo apt-get install libpng-dev`).
77+
78+
</details>
79+
80+
</TabItem>
81+
<TabItem value="arch" label="Arch Linux">
82+
83+
RGBDS is now available in the official repos as [`community/rgbds`](https://www.archlinux.org/packages/community/x86_64/rgbds/); you can also get the [latest master](/docs/master) via the [`rgbds-git`](https://aur.archlinux.org/packages/rgbds-git) AUR package, or RGBDS 0.2.5 from [`rgbds2`](https://aur.archlinux.org/packages/rgbds2), still from the AUR.
84+
85+
```bash
86+
pacman -S rgbds
87+
```
88+
89+
We refer you to the Arch Linux wiki on how to install [official packages](https://wiki.archlinux.org/index.php/Pacman#Installing_packages) or [AUR packages](https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_and_upgrading_packages), or to find and use an [AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers).
90+
91+
</TabItem>
92+
<TabItem value="macos" label="macOS">
93+
94+
RGBDS is available on [Homebrew](https://brew.sh) as the [`rgbds` package](https://formulae.brew.sh/formula/rgbds).
95+
96+
```bash
97+
brew install rgbds
98+
```
99+
100+
You can also install the [`master` branch](/docs/master) by passing the `--HEAD` flag:
101+
102+
```bash
103+
brew install rgbds --HEAD
104+
```
105+
106+
</TabItem>
107+
</Tabs>

0 commit comments

Comments
 (0)