Permalink
Browse files

added go10cc instructions and support (from newfs)

updated the README
removed unnecessary files
added note about requiring go10cc in build.py
  • Loading branch information...
1 parent ffb41f6 commit 982078c5031202db8b86ea1754dde3dc0cdc1c2d @alexander-bauer alexander-bauer committed Sep 18, 2012
Showing with 26 additions and 11 deletions.
  1. +8 −0 README.md
  2. +14 −0 build.py
  3. +0 −7 pconfig
  4. +4 −3 run.py
  5. +0 −1 thelastquestion_dat.txt
View
@@ -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.
View
@@ -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
@@ -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 = ""
@@ -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):
View
@@ -1,7 +0,0 @@
-# This file contains path configuration so that python can invoke
-# the das assembler and Benedek's DCPU-16 emulator.
-# Linux users can use "which das" and "which dcpu-16" to find
-# the locations of each, assuming they are installed on the PATH.
-
-daslocation="/home/sasha/bin/das"
-emulocation="/usr/local/bin/dcpu-16"
View
7 run.py
@@ -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"])
View

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 982078c

Please sign in to comment.