Skip to content

Building

Patrick Gormley edited this page Dec 13, 2016 · 6 revisions

This page has detailed instructions on how to compile, build, and run PyCut. This could be for either a personal device or for an XO laptop. If you are looking for a pre-built version of the game to use on an XO laptop, please refer to activities.sugarlabs.org.

Getting started

PyCut is dependent on the Pygame package. You can install the package in the following ways.

CentOS / Red Hat-based distributions

Most XOs are based off an older version of Fedora. If you are using an XO, this command should work for you in a terminal.

$ sudo yum install pygame

Fedora

$ sudo dnf install pygame

Debian / Ubuntu / apt-based distributions

$ sudo apt-get install python-pygame

Once Pygame is installed, you will be able to build PyCut.

Installation

Linux

There isn't really a way to "install" PyCut on a Linux workstation because the application is designed to be integrated with the Sugar desktop environment. However, you should be able to run the game by executing the main Python class.

$ ./PyCut.py

Otherwise, if you want to distribute the game onto a regular computer, run this one.

$ ./setup.py dist

On an XO

$ ./setup.py genpot
$ ./setup.py build
$ ./setup.py install

If you want to distribute the game onto another XO, execute this command.

$ ./setup.py dist_xo


#Install / Run Game For Beginners - Windows

##Install Python 2.7

##Editing Path

  • Search ‘environment variables’
  • Select edit environment variables
  • Select path, edit
  • Add the new path if it is not there
  • ‘;’ between each new path

##Install Pip

  • Download pip file : https://bootstrap.pypa.io/get-pip.py
  • Navigate to folder with the file in command prompt
  • Run: python get-pip.py
  • Make sure to add the python scripts folder to your path
  • Will look like: C:\Python27\Scripts
  • Should be able to run the command 'pip' if all went well

##Install Pygames

##Running Game

  • Navigate to PyCut folder
  • Run ‘python pycut.py’
  • Game should launch