Skip to content

Commit 6e2e864

Browse files
committed
docs: DEVELOPER_GUIDE: fixed formatting of instructions for Windows
Signed-off-by: Marat Abrarov <abrarov@gmail.com>
1 parent 05acee8 commit 6e2e864

1 file changed

Lines changed: 42 additions & 42 deletions

File tree

DEVELOPER_GUIDE.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -746,54 +746,54 @@ The following steps have been tested on a Windows Server 2022 Datacenter edition
746746
2. **Install Flex and Bison**
747747
1. Create a new file called `setup-flex-bison.ps1` and paste the following script:
748748

749-
```powershell
750-
# Define variables for Flex and Bison
751-
$flexBisonUrl = "https://sourceforge.net/projects/winflexbison/files/win_flex_bison3-latest.zip/download"
752-
$downloadPath = "$env:TEMP\win_flex_bison.zip"
753-
$extractPath = "C:\win_flex_bison"
754-
$flexExe = "flex.exe"
755-
$bisonExe = "bison.exe"
756-
757-
# Step 2: Download and Setup Flex and Bison
758-
Write-Output "Downloading win_flex_bison..."
759-
Invoke-WebRequest -Uri $flexBisonUrl -OutFile $downloadPath
760-
761-
# Create the extract directory if it does not exist
762-
If (!(Test-Path -Path $extractPath)) {
763-
New-Item -ItemType Directory -Path $extractPath
764-
}
749+
```powershell
750+
# Define variables for Flex and Bison
751+
$flexBisonUrl = "https://sourceforge.net/projects/winflexbison/files/win_flex_bison3-latest.zip/download"
752+
$downloadPath = "$env:TEMP\win_flex_bison.zip"
753+
$extractPath = "C:\win_flex_bison"
754+
$flexExe = "flex.exe"
755+
$bisonExe = "bison.exe"
756+
757+
# Step 2: Download and Setup Flex and Bison
758+
Write-Output "Downloading win_flex_bison..."
759+
Invoke-WebRequest -Uri $flexBisonUrl -OutFile $downloadPath
760+
761+
# Create the extract directory if it does not exist
762+
If (!(Test-Path -Path $extractPath)) {
763+
New-Item -ItemType Directory -Path $extractPath
764+
}
765765
766-
# Extract the zip file
767-
Write-Output "Extracting win_flex_bison..."
768-
Add-Type -AssemblyName System.IO.Compression.FileSystem
769-
[System.IO.Compression.ZipFile]::ExtractToDirectory($downloadPath, $extractPath)
770-
771-
# Rename the executables
772-
Write-Output "Renaming executables..."
773-
Rename-Item "$extractPath\win_flex.exe" "$extractPath\$flexExe" -Force
774-
Rename-Item "$extractPath\win_bison.exe" "$extractPath\$bisonExe" -Force
775-
776-
# Add Flex and Bison path to system environment variables
777-
Write-Output "Adding Flex and Bison path to environment variables..."
778-
$envPath = [System.Environment]::GetEnvironmentVariable("Path", "Machine")
779-
If ($envPath -notlike "*$extractPath*") {
780-
[System.Environment]::SetEnvironmentVariable("Path", "$envPath;$extractPath", "Machine")
781-
Write-Output "Path updated. Please restart your command prompt to apply changes."
782-
} else {
783-
Write-Output "Path already contains the Flex and Bison directory."
784-
}
766+
# Extract the zip file
767+
Write-Output "Extracting win_flex_bison..."
768+
Add-Type -AssemblyName System.IO.Compression.FileSystem
769+
[System.IO.Compression.ZipFile]::ExtractToDirectory($downloadPath, $extractPath)
770+
771+
# Rename the executables
772+
Write-Output "Renaming executables..."
773+
Rename-Item "$extractPath\win_flex.exe" "$extractPath\$flexExe" -Force
774+
Rename-Item "$extractPath\win_bison.exe" "$extractPath\$bisonExe" -Force
775+
776+
# Add Flex and Bison path to system environment variables
777+
Write-Output "Adding Flex and Bison path to environment variables..."
778+
$envPath = [System.Environment]::GetEnvironmentVariable("Path", "Machine")
779+
If ($envPath -notlike "*$extractPath*") {
780+
[System.Environment]::SetEnvironmentVariable("Path", "$envPath;$extractPath", "Machine")
781+
Write-Output "Path updated. Please restart your command prompt to apply changes."
782+
} else {
783+
Write-Output "Path already contains the Flex and Bison directory."
784+
}
785785
786-
# Cleanup
787-
Remove-Item $downloadPath
786+
# Cleanup
787+
Remove-Item $downloadPath
788788
789-
Write-Output "Flex and Bison setup complete."
790-
```
789+
Write-Output "Flex and Bison setup complete."
790+
```
791791
792792
2. Run the Script: Open PowerShell as administrator.
793793
794-
```powershell
795-
.\setup-flex-bison.ps1
796-
```
794+
```powershell
795+
.\setup-flex-bison.ps1
796+
```
797797
798798
3. Restart the command prompt: After the script completes, restart your command prompt or Visual Studio for the changes to take effect.
799799

0 commit comments

Comments
 (0)