Skip to content

Commit 813759f

Browse files
att
1 parent 90de804 commit 813759f

File tree

1 file changed

+117
-10
lines changed

1 file changed

+117
-10
lines changed

docs/install_and_build/install.md

Lines changed: 117 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,130 @@
11

22

3-
You can chose these following methods to install VibeScript:
3+
# VibeScript Installation Guide
44

5-
# Binary Installation (Recommended)
6-
if you are on linux you can run the following command to install VibeScript:
5+
You can install VibeScript using one of the following methods:
6+
7+
## Binary Installation (Recommended)
8+
9+
### Linux
10+
Run the following command to install VibeScript on Linux:
711

8-
```bash
9-
### Run These to install on Linux:
1012
```bash
1113
curl -L https://github.com/OUIsolutions/VibeScript/releases/download/0.32.0/vibescript.out -o vibescript.out && chmod +x vibescript.out && sudo mv vibescript.out /usr/local/bin/vibescript
1214
```
13-
if you are not on linux, you can download the appropriate binary for your system from the [Releases](https://github.com/OUIsolutions/VibeScript/releases)
14-
page.
1515

16-
# Source Compilation
17-
You can also compile VibeScript from source. You will need to have `gcc`, or `clang`,installed:
18-
if you are on linux or macOS, you can run the following commands:
16+
### Windows
17+
Download the appropriate binary for your system from the [Releases](https://github.com/OUIsolutions/VibeScript/releases) page:
18+
- For 32-bit Windows: Download `vibescripti32.exe`
19+
20+
After downloading, you can:
21+
1. **Add to PATH**: Move the executable to a directory in your PATH (e.g., `C:\Windows\System32` or create a dedicated folder like `C:\VibeScript\bin`)
22+
2. **Direct usage**: Place the executable in your project folder and run it directly
23+
24+
25+
## Source Compilation
26+
27+
### Linux and macOS
28+
You need to have `gcc` or `clang` installed:
1929

2030
```bash
2131
curl -L https://github.com/OUIsolutions/VibeScript/releases/download/0.35.0/amalgamation.c -o vibescript.c && gcc vibescript.c -o vibescript.out && sudo mv vibescript.out /usr/local/bin/vibescript
2232
```
2333

34+
### Windows
35+
36+
#### Option 1: Using MinGW64 (Recommended)
37+
38+
1. **Install MinGW64**:
39+
- Download and install [MSYS2](https://www.msys2.org/)
40+
- Open MSYS2 terminal and run:
41+
```bash
42+
pacman -S mingw-w64-x86_64-gcc
43+
```
44+
- Add MinGW64 to your PATH: `C:\msys64\mingw64\bin`
45+
46+
2. **Compile VibeScript**:
47+
```bash
48+
# Download the source
49+
curl -L https://github.com/OUIsolutions/VibeScript/releases/download/0.35.0/amalgamation.c -o vibescript.c
50+
51+
# Compile with MinGW64
52+
gcc vibescript.c -o vibescript.exe -lws2_32
53+
54+
# Move to a directory in PATH (optional)
55+
move vibescript.exe C:\Windows\System32\
56+
```
57+
58+
#### Option 2: Using MSVC (Visual Studio)
59+
60+
1. **Install Visual Studio**:
61+
- Download and install [Visual Studio Community](https://visualstudio.microsoft.com/downloads/) with C++ development tools
62+
- Or install [Build Tools for Visual Studio](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)
63+
64+
2. **Compile using Developer Command Prompt**:
65+
```cmd
66+
# Download the source (using PowerShell or download manually)
67+
curl -L https://github.com/OUIsolutions/VibeScript/releases/download/0.35.0/amalgamation.c -o vibescript.c
68+
69+
# Open "Developer Command Prompt for VS" and compile
70+
cl vibescript.c /Fe:vibescript.exe
71+
72+
# Move to a directory in PATH (optional)
73+
move vibescript.exe C:\Windows\System32\
74+
```
75+
76+
#### Option 3: Using Clang on Windows
77+
78+
1. **Install Clang**:
79+
- Download from [LLVM releases](https://github.com/llvm/llvm-project/releases)
80+
- Or install via [Chocolatey](https://chocolatey.org/): `choco install llvm`
81+
82+
2. **Compile**:
83+
```bash
84+
# Download the source
85+
curl -L https://github.com/OUIsolutions/VibeScript/releases/download/0.35.0/amalgamation.c -o vibescript.c
86+
87+
# Compile with Clang
88+
clang vibescript.c -o vibescript.exe
89+
90+
# Move to a directory in PATH (optional)
91+
move vibescript.exe C:\Windows\System32\
92+
```
93+
94+
## Verification
95+
96+
After installation, verify that VibeScript is working correctly:
97+
98+
```bash
99+
# Check version
100+
vibescript --version
101+
102+
# Run a simple test
103+
echo 'print("Hello, VibeScript!")' > test.lua
104+
vibescript test.lua
105+
```
106+
107+
## Troubleshooting
108+
109+
### Windows-specific Issues
110+
111+
1. **"vibescript is not recognized"**:
112+
- Ensure the executable is in a directory listed in your PATH environment variable
113+
- Try running with full path: `C:\path\to\vibescript.exe your_script.lua`
114+
115+
2. **Missing Visual C++ Redistributable**:
116+
- Download and install [Microsoft Visual C++ Redistributable](https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist)
117+
118+
3. **Compilation errors with MinGW64**:
119+
- Ensure you're using the 64-bit version of MinGW64
120+
- Check that `gcc --version` shows MinGW-W64 version
121+
122+
4. **MSVC compilation issues**:
123+
- Make sure you're using the "Developer Command Prompt for VS"
124+
- Verify that `cl` command is available
125+
126+
### General Issues
127+
128+
- **Permission denied**: On Linux/macOS, make sure the binary has execute permissions (`chmod +x vibescript.out`)
129+
- **Network issues**: If `curl` fails, download the files manually from the GitHub releases page
130+

0 commit comments

Comments
 (0)