User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:clone_from_github [2015/05/18 21:30]
xychen [Install ULAM]
dev:clone_from_github [2017/07/15 07:32] (current)
ackley [Install SDL]
Line 1: Line 1:
 ====== Cloning From Github ====== ====== Cloning From Github ======
-In order to make your own [[Components:​Element]]s, ​you will need to download and build the MFM software from source. It is kept on a git repo at Github.+**NOTE**: You can compile and run your own [[Components:​Element]]s ​just using the pre-built packagesas shown [[dev:​install_ulam|here]]; ​the instructions ​on this page are **not needed** for that  ​
-Cloning the repo from Github seems relatively ​straight forward, but there are some dependencies that need to be installed in order to get the source to build. Here is a full tutorial ​describing how to build the MFM software ​from the source.+However, if you wish to participate in the development of MFM or ULAM, you will need to download and build the software from its source codes, which are kept in two repositories at Github. 
 +Cloning the repos from Github seems relatively ​straightforward, but there are some dependencies that need to be installed in order to get the source to build. ​ Here are steps describing how to build MFM and ULAM from their sources. 
 +**WARNING**:​ As of Summer 2017, both the MFM and ULAM repos are under heavy development Your Mileage May Vary!
 ** Note: ** This tutorial is performed on Ubuntu 14.04 . Your installation procedure may vary. ** Note: ** This tutorial is performed on Ubuntu 14.04 . Your installation procedure may vary.
-===== Install git =====+===== Update lists of packages ​===== 
 +First, make sure that lists of packages are up-to-date
-First, you will need to install **git**. This can be done with a package manager, such as **apt-get**:+<​code>​ 
 +sudo apt-get ​update 
 +===== Install needed packages ===== 
 +These packages are described in more detail in the immediately following subsections,​ but here they are all in one command for convenience:
 <​code>​ <​code>​
-sudo apt-get install git+sudo apt-get install git g++ libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcapture-tiny-perl
 </​code>​ </​code>​
-===== Install ​g++ =====+==== Install ​git ====
-You will need **g++**, a c++ compiler, in order to build the softwareSimply use your package manager ​to download it:+You will need to install ​**git**. This can be done with a package manager, such as **apt-get**:
 <​code>​ <​code>​
-sudo apt-get install ​g+++sudo apt-get install ​git
 </​code>​ </​code>​
-===== Clone the Repository =====+==== Install g++ ====
-Next, you will need to clone the codebase to your computer. To do this, browse ​to the folder which you would like to contain the repo and clone:+You will need **g++**, a c++ compiler, in order to build the software. Simply use your package manager ​to download it:
 <​code>​ <​code>​
-git clone https://​​DaveAckley/​MFM+sudo apt-get install g++
 </​code>​ </​code>​
-===== Install SDL =====+==== Install SDL ====
 The MFM software uses SDL to render to a window, play audio, and render fonts. The MFM software uses SDL to render to a window, play audio, and render fonts.
Line 37: Line 47:
 The MFM software needs SDL version 1.2 . **Do not install SDL 2.0!** The MFM software needs SDL version 1.2 . **Do not install SDL 2.0!**
-libsdl1.2-dev is the package for the main SDL system.+''​libsdl1.2-dev'' ​is the package for the main SDL system.
-libsdl-image1.2-dev is the package for translating image types other than bitmaps.+''​libsdl-image1.2-dev'' ​is the package for translating image types other than bitmaps.
-libsdl-mixer1.2-dev is the package for playing audio.+''​libsdl-ttf2.0-dev'' ​is the package for rendering TrueType fonts. Note that, despite the name, this is an SDL 1.2 package.
-libsdl-ttf2.0-dev is the package for rendering TTF fonts. This is an SDL 1.2 package. +Install ​the packages:
- +
-You will need to install the following ​packages ​with your package manager:+
 <​code>​ <​code>​
 sudo apt-get install libsdl1.2-dev sudo apt-get install libsdl1.2-dev
 sudo apt-get install libsdl-image1.2-dev sudo apt-get install libsdl-image1.2-dev
-sudo apt-get install libsdl-mixer1.2-dev 
 sudo apt-get install libsdl-ttf2.0-dev sudo apt-get install libsdl-ttf2.0-dev
 </​code>​ </​code>​
-===== Build MFMv2 =====+==== Install crypto support and misc packages ​====
-Now that you have installed all of the dependencies ​that you need, you can build the MFM software. Simply navigate ​to the main folder ​and type:+The top level of the **ULAM** compiler is written in Perl.  Among its tasks is to generate '​mfz'​ files signed by a '​handle' ​that you create; a few packages are required ​to support signing ​and signature checking.
 <​code>​ <​code>​
-make+sudo apt-get install libcrypt-openssl-bignum-perl 
 +sudo apt-get install libcrypt-openssl-rsa-perl 
 +sudo apt-get install libcapture-tiny-perl
 </​code>​ </​code>​
-This should build the software as long as the repo does not contain any errors. To run the software, the executable is located in the **bin** folder. Type:+ 
 +===== Clone the Repositories ===== 
 +Next, you will need to clone the codebase to your computer. To do thisbrowse to the folder which you would like to contain ​the repos and clone:
 <​code>​ <​code>​
-bin/mfms+git clone https://​​DaveAckley/​MFM 
 +git clone https://​​DaveAckley/​ULAM
 </​code>​ </​code>​
-to run the simulator.+Note this will create MFM/ and ULAM/ directories as siblings in whatever directory you started in -- and that's desirable because ​the two repositories will be able to find each other without any additional local configuration.
-===== Install ULAM ===== +===== Build the software ​===== 
-If you have installed ​MFM, you are now ready to install ULAM. This is a more powerful language to develop elements in the MFM environment. If you don't have MFM, you need to go back and have MFM installed first.+ 
 +Now that you have installed ​all of the dependencies that you need, you can build the MFM software: 
 +$ cd MFM 
 +MFM$ make 
-==== Clone the ULAM Repository ====+This should build the MFM software as long as the repo does not contain any errors. ​ Depending on your machine, the build may take quite a while.
-You will need to clone the code from github. Git will create a new folder of ULAMso you don't need to make a new directory.+After that succeeds, you can build the ULAM compiler:
 <​code>​ <​code>​
-git clone https://​$ cd ../ULAM 
 +ULAM$ make
 </​code>​ </​code>​
-After the clone is done, a new directory is created: /​home/​user/​ULAM. The '​user'​ is your account name. 
-==== Configuration of the ULAM ====+This may //also// take quite a while. 
 +Once the ULAM compiler is built, you need to use it to build "ulam exports"​ -- various libraries and demos that are part of the system:
-To install ULAM compiler, you need to told ULAM where to find MFM. Touch a configuration file in the /​home/​user/​ULAM/​ulam1/​ directory. Then put the following code into this file:  ​ 
 <​code>​ <​code>​
-#Local configuration +ULAMmake ulamexports
-MFM_ROOT_DIR := /​home/​user/​MFM +
-#Rebuild of local configuration(This file) changes +
 </​code>​ </​code>​
-==== Install ​the ULAM compiler ​==== +Note that the results of making ulamexports (in the ULAM/ repo) places its output in the MFM/ repo!  Trying to run the MFM simulator without getting through '​ulamexports'​ successfully is unlikely to work!  
-Now you can install ​the ULAM compiler. Go to the /home/​user/​ULAM/​ulam1/​. Type the make command.+ 
 +Note also that ''​make ulamexports''​ might take a //very// long time. 
 +===== Run the software ===== 
 +To run the software, the executable is located in the **MFM/bin** folder. Type
 <​code>​ <​code>​
-make+MFM$ ./bin/mfms
 </​code>​ </​code>​
-If it throws out errors, there may be some dependencies lacked that caused these errors. Open the Synaptic Package Manager. Make sure you have installed libcapture-tiny-perl. Once you get all the packages installed, Make again. Welcome to ULAM+ 
 +to run the simulator. 
dev/clone_from_github.1432006238.txt.gz · Last modified: 2015/05/18 21:30 by xychen