Skip to content

Windows 10 Installation

Installation

Info

You have got two options to install CX on Windows.

  1. Binary Releases - Fast and safe Installation
  2. Compiling from Source - better to customize your cx-options, also necessary for CX-Chains
  1. Download the latest version of cx.exe from https://github.com/skycoin/cx/releases
  2. Unzip into the destination folder you want to have your CX-files.
    For example: D:\Programs\CX
  3. Setup Environment Variables to get access to your cx.exe through the terminal:

    Press WIN + R, type in C:\Windows\System32\systempropertiesadvanced.exe and hit ENTER
    Search for Path in 'User variables for User', select it and press Edit.
    Make a new environment variable with the path, depending on your destination folder.
    Here D:\Programs\CX

  4. Check your installation like described here

  5. To update your CX-Installation just get the latest cx.exe and replace the old one.

Requirements

To compile cx from source you need golang installed!

Install Go

Source: https://skywug.net/forum/Thread-Skywire-node-on-Windows

Installation
Download Go from https://golang.org/dl/ and install it.

Setup Environment Variables
1. Press WIN + R to open run and type in

C:\Windows\System32\systempropertiesadvanced.exe
2. Select the GOPATH variable and change it's value to:
%USERPROFILE%\go
3. Make a new variable called GOBIN with the value:
%USERPROFILE%\go\bin

  1. First make sure you have got GO installed and set up your Environment Variables.
    If not follow the guide above.

  2. You also need git to copy github repos. You can download it from
    https://git-scm.com/downloads.

  3. After the installation make a new Environment Variable like described in the next steps:

    3.1 Press WIN + R to open run and type in

    C:\Windows\System32\systempropertiesadvanced.exe
    
    3.2 Make a new variable called CXPATH with the value:
    %USERPROFILE%\go\src\github.com\skycoin\cx
    
    3.3 Make sure the Environment Variables from Step 1 are also set:
    GOPATH = %USERPROFILE%\go
    GOBIN  = %USERPROFILE%\go\bin
    

  4. Get the latest version of the github cx-repository

    4.1 Press WIN + R, type in cmd.exe and hit ENTER

    4.2 get github repo by typing in:

    mkdir -p %GOPATH%\src\github.com\skycoin\
    cd %GOPATH%\src\github.com\skycoin\
    git clone https://github.com/skycoin/cx.git
    

    4.2 To install cx type in:

    cd %CXPATH%
    cx-setup.bat
    

  5. Check your installation by typing in:

    cd %CXPATH%
    cx tests\main.cx ++wdir=tests ++disable-tests=issue
    

  6. To update your CX-Installation just run cx-setup.bat again

Check Installation

  1. Open Terminal with WIN + R and type in
    cmd.exe
    
  2. In Terminal type in

    cx -v
    

  3. The output should look like this:

    CX version X.X.X
    
    (the X represent the version you have installed)

Hello, World!

To check our Installation with something more than a version output we will now make a cx-file to print out 'Hello World!'

  1. Make a new text-file in the location where your cx.exe is and rename it to hello-world.cx

  2. Open the file with Editor and type in the following:

    package main
    
    func main () {
         str.print("Hello, World!")
    }
    
    Press Ctrl + S and close

  3. Open a terminal with WIN + R and type in

    cmd.exe
    

  4. Move to the direction where your hello-world.cx is and type in cx hello-world.cx or just drag and drop your file into the terminal after typing in cx followed by a Space

Next Step

The next step should be to search for a development environment that fits you to code as easy as possible. Have a look into Programming Tools to find your favorite Code Editor.


Last update: 2021-02-11