Skip to content

Installation

Roope Salmi edited this page Sep 8, 2022 · 10 revisions

You can download the latest binary / executable for your operating system from the project's releases page. Further instructions below.

Alternatively, if you have a recent Rust toolchain available, you can install through Cargo:

cargo install cses-cli

Linux and macOS

  1. Download (or build) the latest binary and rename it as cses-cli.
    $ mv cses-cli* cses-cli

  2. Move the binary to the correct location and give it the correct permissions.
    With sudo access (for all users):

    $ sudo mkdir -p /usr/local/bin
    $ sudo mv cses-cli /usr/local/bin/
    $ sudo chmod 755 /usr/local/bin/cses-cli
    

    Without sudo access (for current user only):

    $ mkdir -p ~/.local/bin
    $ mv cses-cli ~/.local/bin/
    $ chmod +x ~/.local/bin/cses-cli
    
  3. Add the installation directory to the path (without sudo only)
    Add the line PATH=$PATH:~/.local/bin to the end of your ~/.bashrc, ~/.zshrc (default on macOS) or similar file.

You should now be able to use the command cses-cli on your command line (you probably need to reload the command line first).

Known problems

Problem: "macOS cannot verify that this app is free from malware."
Solution: Go to System Preferences -> Security & Privacy and click on Allow Anyway.
You may also disable the gatekeeper completely:
$ sudo spctl --master-disable
Now go to System Preferences -> Security & Privacy and under Allow apps downloaded from: select the option Anywhere.


Windows

  1. Download (or build) the latest executable. On the downloads page, it is named as cses-cli-windows.exe, but you can rename it manually to cses-cli.exe for easier use. The following steps assume it is renamed.

  2. Move the executable to the correct location and add it to the Path.

    With administrator permissions:

    • Create the folder C:\Program Files\cses-cli\ and put the file cses-cli.exe inside. The path of the file should now be C:\Program Files\cses-cli\cses-cli.exe.
    • Open the Command Prompt or the PowerShell and type the following command:
      > setx Path "%Path%;C:\Program Files\cses-cli
      Note: The command will only be available on all users if this command is run in an administrator shell.

    Without administrator permissions:

    • Create the folder C:\Users\<Username>\AppData\Local\cses-cli and put the file cses-cli.exe inside. The path of the file should now be C:\Users\<Username>\AppData\Local\cses-cli\cses-cli.exe.
    • Open the Command Prompt or the PowerShell and run the command:
      > setx Path "%Path%;%LocalAppData%\cses-cli

    Note: You can also edit the Path from Settings > System > About > Advanced system settings > Environment Variables...
    User variables changes the path only for the current user and System Variables changes the path for all users on the computer.

You should now be able to use the command cses-cli in the Command Prompt or the PowerShell after reopening it.

Known problems

Problem: System Error: VCRUNTIME140.dll was not found.
Solution: Download and install the latest Visual C++ Redistributable from Microsoft's website. (This unfortunately requires administrator permissions.)

Clone this wiki locally