diff --git a/README.md b/README.md index c87918b..2f07565 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ## Summary 1. [Building and Installing on UNIX-style systems](#building-on-unix-style-systems) 2. [Building and Installing on Windows](#building-and-installing-on-windows) -3. [Only installing on Windows](#only-installing-on-windows) +3. [Only installing on Windows or Ubuntu](#only-installing-on-windows-or-ubuntu) 4. [Using](#using) 5. [Tutorials](#tutorials) 6. [Extensions and LICENSE](#extensions-and-license) @@ -27,8 +27,9 @@ ```bash git clone https://github.com/terroo/terlang cd terlang +cmake -B build . cmake --build build -sudo install -v build/ter /usr/local/bin/ter +sudo cmake --install build ``` REPL: @@ -43,28 +44,62 @@ ter> exit --- ### Building and Installing on Windows +With MSVC! +> Open PowerShell (Run as Administrator) from the Windows Start Menu + ```bash git clone https://github.com/terroo/terlang -cd terlang +cd terlang\ +cmake -B build . cmake --build build + +# Create destination folders and subfolders +New-Item -Path "C:\Program Files\Terlang\bin" -ItemType Directory -Force + +# Move to destination folder +Move-Item -Path "build\Debug\ter.exe" -Destination "C:\Program Files\Terlang\bin\ter.exe" + +# Create an environment variable for system "Path" +[System.Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Terlang\bin", [System.EnvironmentVariableTarget]::Machine) ``` -Open `.sln` and compile with Visual Studio C++ -+ Create folders and subfolders: `C:\Program Files\Terlang\bin` -+ Move the `Debug\ter.exe` to the `bin\` subfolder -+ Add the path as an environment variable to just the `ter` command in *PowerShell* or *CMD* +Close PowerShell, then reopen and run: +> To test the `ter` command. +```cpp +prompt> ter +ter> output(args()) +Ter/Terlang VERSION: 0.0.1 +ter> exit +``` --- -### Only installing on Windows +### Only installing on Windows or Ubuntu + +Windows: ```bash -Invoke-WebRequest -Uri "https://github.com/terroo/terlang/releases/download/0.0.1/terlang-win.zip" +Invoke-WebRequest -Uri "https://github.com/terroo/terlang/releases/download/0.0.1/terlang-windows-0.0.1.zip" ``` + Unzip + Create folders and subfolders: `C:\Program Files\Terlang\bin` + Move the `.exe` to the `bin\` subfolder + Add the path as an environment variable to just the `ter` command in *PowerShell* or *CMD* +Ubuntu: +```bash +wget https://github.com/terroo/terlang/releases/download/0.0.1/terlang-ubuntu-24-04-0.0.1.zip +unzip terlang-ubuntu-24-04-0.0.1.zip +sudo mv ter /usr/local/bin +``` + +And test: +```cpp +$ ter +ter> output(args()) +Ter/Terlang VERSION: 0.0.1 +ter> exit +``` + --- ## Using