Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Building on Mac and Linux

handflucht edited this page Jan 26, 2017 · 2 revisions

scriptcs now works on Mono running on Windows, Mac or Linux!

Building scriptcs from the command line

  • Clone the scriptcs repo: git clone https://github.com/scriptcs/scriptcs
  • Change to the scriptcs folder where the repo was cloned to.
  • Checkout the dev branch: git checkout dev
  • To make the build script executable: chmod +x build.sh (if that fails prefix the command with sudo)
  • Run the build script: sudo ./build.sh.

Building scriptcs from Xamarin Studio / Mono Develop

  • Clone the scriptcs repo: git clone https://github.com/scriptcs/scriptcs
  • Checkout the dev branch: git checkout dev
  • If you are using Xamarin Studio / Mono Develop pre 5.0, install the [Nuget Addin] (https://github.com/mrward/monodevelop-nuget-addin):
  • Open scriptcs.sln in your IDE.
  • Enable package restore
  • Build the solution.

Running scriptcs from bash

To run scriptcs you must use the mono command, i.e. mono scriptcs.exe start.csx.

For convenience, add an alias in your ~/.bash_profile for easily running scriptcs i.e:

alias scriptcs='mono ~/scriptcs/scriptcs.exe'

Replace ~/scriptcs in the snippet with the location of the binaries. Close and re-open your bash terminal and now you can run scriptcs directly:

scriptcs start.csx

Building using docker

For building with docker, please use the following Dockerfile:

FROM debian:jessie

RUN apt-get update && apt-get install git -y
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list
RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" |  tee -a /etc/apt/sources.list.d/mono-xamarin.list
RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" |  tee -a /etc/apt/sources.list.d/mono-xamarin.list
RUN apt-get update
RUN apt-get install mono-devel mono-complete referenceassemblies-pcl ca-certificates-mono mono-xsp4 -y

RUN mono --version
RUN cert-sync /etc/ssl/certs/ca-certificates.crt

RUN git clone --recursive https://github.com/scriptcs/scriptcs
RUN cd ./scriptcs	 && ./build_brew.sh
Clone this wiki locally