Skip to content

Commit

Permalink
added go10cc instructions and support (from newfs)
Browse files Browse the repository at this point in the history
updated the README
removed unnecessary files
added note about requiring go10cc in build.py
  • Loading branch information
alexander-bauer committed Sep 18, 2012
1 parent ffb41f6 commit 982078c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,11 @@ CubeOS Organization actively encourages anyone and everything to use CubeOS, dev
**CubeOS has one major philosophy by which we encourage all developers to live by.**

***Release early, release often, and think outside the cube.***

# Installation

To run a CubeOS binary, one only needs a standards-compliant DCPU-16 emulator, such as [Benedek's emulator](https://bitbucket.org/benedek/dcpu-16/), which can run DCPU-16 binaries.

A pre-built *CubeOS.dasm16* file can be assembled and run by any standards-compliant DCPU-16 assembler, such as [das](https://github.com/jonpovey/das), or compiler/emulator combination, such as [dcpu.ru](http://dcpu.ru).

CubeOS can be built from source, as long as one has the necessary tools: [das](https://github.com/jonpovey/das) and [go10cc](https://github.com/shepheb/go10c). These must be present on the system PATH, (easily accomplished on UNIX systems,) or in the CubeOS-alpha directory.
14 changes: 14 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/python
# Users must have the go10cc binary on the system path or present in
# the CubeOS directory.

import sys, os, glob, subprocess

Expand All @@ -9,9 +11,14 @@
moduleExtention = ".dasm16"
modules = []


packLoc = location + os.pardir + os.sep + "cubeOS-packages" + os.sep + "stdlib" + os.sep
packageExtention = ".package"

# Turn any .go files in the packages directory into .package files.
for files in glob.glob(packLoc + "*.go"):
subprocess.check_call(["go10cc", "-o", files.replace(".go", ".package"), "-p", "-L", packLoc, files])

packageModule = modLoc + "package" + moduleExtention
builtPackageModule = ""
packageLoads = ""
Expand All @@ -25,6 +32,13 @@
if files != modules[0] and files != modules[1] and files != packageModule:
modules.append(files)

goDir = location + "go" + os.sep

for files in glob.glob(goDir + "*.go"):
outputFile = files.replace(".go", ".dasm16")
subprocess.check_call(["go10cc", "-o", outputFile, "-L", goDir, files])
modules.append(outputFile)

# Create a string containing all packages
# also create a DASM string to load the packages
for files in glob.glob(packLoc + "*" + packageExtention):
Expand Down
7 changes: 0 additions & 7 deletions pconfig

This file was deleted.

7 changes: 4 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/python2
# This is a platform-independent script to automate building, compiling,
# and assembling cubeOS. Windows users must have das and dcpu-16 binaries
# in the cubeOS directory, or in their system PATH location
# This is a platform-independent script to automate building,
# compiling, and assembling cubeOS. Windows users must have das,
# go10cc, and dcpu-16 binaries in the cubeOS directory, or in their
# system PATH location
from subprocess import call
import build #Runs build.py
assembleStatus = call(["das","-o","cubeOS.bin","cubeOS.dasm16"])
Expand Down
1 change: 0 additions & 1 deletion thelastquestion_dat.txt

This file was deleted.

0 comments on commit 982078c

Please sign in to comment.