Create deployables
authorFrank Duncan <frank@kank.net>
Fri, 4 Sep 2015 17:24:46 +0000 (12:24 -0500)
committerFrank Duncan <frank@kank.net>
Fri, 1 Apr 2016 15:04:51 +0000 (10:04 -0500)
21 files changed:
.gitignore
README.md
bin/buildlinuxexec.sh [new file with mode: 0755]
bin/buildosxrelease.sh [new file with mode: 0755]
bin/buildwindowsexec.sh
bin/release.sh [new file with mode: 0755]
deps/osx/create-dmg-5acf22f.tar.gz [new file with mode: 0644]
dist/osx/CLNL.app/Contents/Info.plist [new file with mode: 0644]
dist/osx/CLNL.app/Contents/MacOS/CLNL [new file with mode: 0755]
dist/osx/CLNL.app/Contents/Resources/CLNL.icns [new file with mode: 0644]
resources/logo/logo.svg [new file with mode: 0644]
resources/logo/logo1024.png [new file with mode: 0644]
resources/logo/logo128.png [new file with mode: 0644]
resources/logo/logo16.png [new file with mode: 0644]
resources/logo/logo256.png [new file with mode: 0644]
resources/logo/logo32.png [new file with mode: 0644]
resources/logo/logo48.png [new file with mode: 0644]
resources/logo/logo512.png [new file with mode: 0644]
resources/logo/logo64.png [new file with mode: 0644]
src/main/clnl.asd
src/test/clnl-test.asd

index a9a5aecf429fd8a0d81fbd5fd37006bfa498d5c1..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -1 +1 @@
-tmp
+
index 002a7b608e9c3b11f3bc7fda2810e8cb52e6b537..910cfdf27343cc4883c670578b9efc00261d88a7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,32 +1,28 @@
 # clnl
 
-This is an experiment at creating an alternate implementation of NetLogo mainly as an exercise for me so that I come to understand NetLogo better.  It is true for me that I only truly understand something when I can explain it to someone else without repetition.  In code, this manifests as expressing a program in another language.
+This is an experiment at creating an alternate implementation of NetLogo in Common Lisp.
 
-See the [wiki](https://github.com/frankduncan/clnl/wiki) for more information at this time.
+See the [wiki](https://github.com/frankduncan/clnl/wiki) for more information.
 
-# Building
+# Running from source
 
-If you'd like to build it, you're going to need a few things:
+If you'd like to run it from source, you're going to need a few things:
 
+* A copy of the clnl source (either from the [releases page](https://github.com/frankduncan/clnl/releases) or via cloning)
 * An implementation of sbcl with threads enabled
-* The following common lisp libraries (included in deps/tarpit folder)
+* The following common lisp libraries (included in [deps/common-lisp](deps/common-lisp) folder)
   * alexandria
   * babel
   * cffi
   * cl-charms
   * cl-opengl
   * cl-ppcre
-  * docgen
   * ironclad
   * mt19937
   * nibbles
   * trivial-features
-  * style-checker
-* rlwrap
 
-# Running as a program
-
-bin/nl has been added for convenience to run the netlogo instance.  It boots up the ncurses command line with an opengl view.  Not very many commands are implemented, but it should alert you to that.  A good test is
+[bin/nl](bin/nl) and [bin/run.lisp](bin/run.lisp) have been added for convenience to run the netlogo instance.  It boots up the ncurses command line with an opengl view.  Not very many commands are implemented, but it should alert you to that.  A good test is
 
 ```
 crt 10
@@ -35,6 +31,14 @@ show random 5
 ask turtles [ fd 5 ]
 ```
 
+## Running on OSX
+
+In order to run on OSX, you may have to build your own sbcl instance with threads enabled.  See [bin/buildosxexec.sh](bin/buildosxexec.sh) for how it's done when releasing/testing.
+
+## Running on Windows
+
+In order to run on Windows, you will need to install a copy of 32bit sbcl with threads enabled, as well as putting a copy of freeglut and pdcurses in that directory.  See [bin/buildwindowsexec.sh](bin/buildwindowsexec.sh) for how it's done when releasing/testing.
+
 # Running in a common lisp instance
 
 If you'd like to run using your own sbcl instance, you can attach the clnl.asd file wherever you link asd files, and then use:
@@ -44,15 +48,6 @@ If you'd like to run using your own sbcl instance, you can attach the clnl.asd f
 (clnl:run)
 ```
 
-## Running on OSX
-
-In order to run on OSX, you may have to build your own sbcl instance with threads enabled.
-
-# Testing
-
-If you'd like to see the tests go on your system, there's a number of utilities to look at:
+# Using standalone executables
 
-* bin/test.lisp
-* bin/diagnose-test
-* bin/diagnose-view-test
-* bin/test-mode
+See the [releases page](https://github.com/frankduncan/clnl/releases) for the most recent release.
diff --git a/bin/buildlinuxexec.sh b/bin/buildlinuxexec.sh
new file mode 100755 (executable)
index 0000000..06f0cd8
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# This script builds a verion of sbcl with the libraries pre loaded
+# for ease of travis.  Remember to update bin/buildosxsbcl when you
+# update this.
+
+mkdir -p tmp/sbcl
+
+cwd=$PWD
+( cd tmp &&
+  tar jxf ../deps/linux/sbcl-1.2.6-x86-64-linux-binary.tar.bz2 &&
+  cd sbcl-1.2.6-x86-64-linux/ &&
+  SBCL_HOME="" INSTALL_ROOT=$cwd/tmp/sbcl/ bash install.sh )
+
+mkdir -p tmp/deps/
+
+( cd tmp/deps &&
+  tar zxf ../../deps/common-lisp/3b-cl-opengl-993d627.tar.gz &&
+  tar zxf ../../deps/common-lisp/alexandria-b1c6ee0.tar.gz &&
+  tar zxf ../../deps/common-lisp/babel_0.5.0.tar.gz &&
+  tar zxf ../../deps/common-lisp/cffi_0.15.0.tar.gz &&
+  tar zxf ../../deps/common-lisp/cl-ppcre.tar.gz &&
+  tar zxf ../../deps/common-lisp/ironclad.tar.gz &&
+  tar zxf ../../deps/common-lisp/mt19937-latest.tar.gz &&
+  tar zxf ../../deps/common-lisp/nibbles-v0.12.tar.gz &&
+  tar zxf ../../deps/common-lisp/trivial-features_0.8.tar.gz &&
+  tar zxf ../../deps/common-lisp/cl-charms-9bb94ef.tar.gz
+)
+
+SBCL_HOME="" tmp/sbcl/bin/sbcl --core tmp/sbcl/lib/sbcl/sbcl.core \
+  --eval "(require 'asdf)" \
+  --eval "(asdf:initialize-source-registry '(:source-registry (:tree \"${PWD}/tmp/deps\") (:directory \"${PWD}/src/main\") :IGNORE-INHERITED-CONFIGURATION))" \
+  --eval "(asdf:load-system :clnl)" \
+  --eval "(asdf:clear-output-translations)" \
+  --eval '(sb-ext:save-lisp-and-die "clnl" :executable t :toplevel (function clnl:run))'
+
+chmod +x clnl
+
+rm -rf tmp
diff --git a/bin/buildosxrelease.sh b/bin/buildosxrelease.sh
new file mode 100755 (executable)
index 0000000..40811b8
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+bin/buildosxexec.sh && \
+  mkdir tmp && \
+  cp -ap dist/osx/CLNL.app tmp && \
+  mv osxsbcl tmp/CLNL.app/Contents/MacOS/ && \
+  cd tmp && \
+  tar zxf ../deps/osx/create-dmg-5acf22f.tar.gz && \
+  cd create-dmg && \
+  cp ../CLNL.app/Contents/Resources/CLNL.icns . && \
+  ./create-dmg --volname "CLNL Installer" --volicon "CLNL.icns" --icon-size 100 --window-size 250 250 --icon CLNL.app 150 100 CLNL.dmg ../CLNL.app && \
+  mv CLNL.dmg ../.. && \
+  cd ../.. && \
+  rm -rf tmp
index 8976cef205750ce735445049145179782d8e9950..b2484884bf4ef0786472aa4ff26885573a9f369f 100755 (executable)
@@ -46,8 +46,8 @@ sbcl --no-sysinit --no-userinit \
   --eval "(asdf:initialize-source-registry '(:source-registry (:tree \"${escaped_cur_dir}\\\\tmp\\\\deps\") (:directory \"${escaped_cur_dir}\\\\src\\\\main\") :IGNORE-INHERITED-CONFIGURATION))" \
   --eval "(asdf:load-system :clnl)" \
   --eval "(asdf:clear-output-translations)" \
-  --eval '(sb-ext:save-lisp-and-die "windowssbcl.exe" :executable t :toplevel (function clnl:run))'
+  --eval '(sb-ext:save-lisp-and-die "clnl.exe" :executable t :toplevel (function clnl:run))'
 
 rm -rf tmp
 
-echo "Executable is windowssbcl.exe"
+echo "Executable is clnl.exe"
diff --git a/bin/release.sh b/bin/release.sh
new file mode 100755 (executable)
index 0000000..6a78757
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# The release process:
+#  * Change version number in clnl.asd
+#  * Run this script to create the source tarball
+#  * Run bin/generatedocs.sh to update wiki
+#  * Create release on github (that should create the tag)
+#  * Upload the tar.gz as an extra file
+#  * Create linux release using bin/buildlinuxexech.sh on a linux machine
+#  * Create osx release using bin/buildosxrelease.sh on a mac and upload
+#  * Create windows release using bin/buildwindowsexec.sh on a windows box and upload
+#  * Set the tag in wiki milestones, update Running wiki page to point to new release
+
+version=$(sbcl --noinform --disable-ldb --lose-on-corruption --end-runtime-options --eval '(format t "~A" (asdf:component-version (asdf:find-system :clnl)))' --eval "(quit)")
+
+echo -n "Building version $version, hit enter to continue"
+read
+
+mkdir clnl_$version
+cp -ap src/main/* clnl_$version/
+tar zcf clnl_${version}.tar.gz clnl_$version/
+rm -rf clnl_$version
+
+echo "All done, it's in clnl_${version}.tar.gz, you should tag it and push it up to github"
+echo "You should also build on OSX, Windows, and Linux using the various release scripts and push those up too."
diff --git a/deps/osx/create-dmg-5acf22f.tar.gz b/deps/osx/create-dmg-5acf22f.tar.gz
new file mode 100644 (file)
index 0000000..390d414
Binary files /dev/null and b/deps/osx/create-dmg-5acf22f.tar.gz differ
diff --git a/dist/osx/CLNL.app/Contents/Info.plist b/dist/osx/CLNL.app/Contents/Info.plist
new file mode 100644 (file)
index 0000000..68cf504
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleName</key>
+  <string>CLNL</string>
+  <key>CFBundleIdentifier</key>
+  <string>net.kank.clnl</string>
+  <key>CFBundleVersion</key>
+  <string>0.0.1.20150904</string>
+  <key>CFBundleIconFile</key>
+  <string>CLNL.icns</string>
+</dict>
+</plist>
diff --git a/dist/osx/CLNL.app/Contents/MacOS/CLNL b/dist/osx/CLNL.app/Contents/MacOS/CLNL
new file mode 100755 (executable)
index 0000000..790cc97
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+open -a Terminal $(dirname $0)/osxsbcl
diff --git a/dist/osx/CLNL.app/Contents/Resources/CLNL.icns b/dist/osx/CLNL.app/Contents/Resources/CLNL.icns
new file mode 100644 (file)
index 0000000..41bb399
Binary files /dev/null and b/dist/osx/CLNL.app/Contents/Resources/CLNL.icns differ
diff --git a/resources/logo/logo.svg b/resources/logo/logo.svg
new file mode 100644 (file)
index 0000000..4f5fd3f
--- /dev/null
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="500"
+   height="500"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.5 r10040"
+   sodipodi:docname="logo.svg"
+   inkscape:export-filename="/home/herbie/lisp/clnl/resources/logo/logo1024.png"
+   inkscape:export-xdpi="184.32001"
+   inkscape:export-ydpi="184.32001">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.7"
+     inkscape:cx="485.50283"
+     inkscape:cy="-5.1983055"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1678"
+     inkscape:window-height="989"
+     inkscape:window-x="0"
+     inkscape:window-y="30"
+     inkscape:window-maximized="0"
+     inkscape:snap-grids="false"
+     inkscape:snap-to-guides="false">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4240"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-552.36218)">
+    <rect
+       style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:8;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3017"
+       width="423.25391"
+       height="362.96167"
+       x="38.373047"
+       y="620.88135" />
+    <g
+       id="g2997"
+       transform="matrix(0.77421468,0,0,0.77421468,56.101339,195.21214)">
+      <rect
+         y="614.70905"
+         x="30.108809"
+         height="219.78238"
+         width="219.78239"
+         id="rect3004"
+         style="fill:none;stroke:#000000;stroke-width:15.49957657;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" />
+      <rect
+         style="fill:none;stroke:#000000;stroke-width:15.49957657;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+         id="rect3790"
+         width="219.78239"
+         height="219.78238"
+         x="251"
+         y="614.70905" />
+      <polygon
+         style="fill:#0000ff;fill-opacity:1"
+         id="polygon4048"
+         points="40,250 150,205 260,250 150,5 "
+         transform="matrix(-0.71550806,0,0,-0.71550806,247.32621,815.82753)" />
+      <polygon
+         style="fill:#0000ff;fill-opacity:1"
+         id="polygon4048-3"
+         points="150,205 260,250 150,5 40,250 "
+         transform="matrix(0,0.71550806,-0.71550806,0,452.11847,617.27404)" />
+    </g>
+    <g
+       id="g3005"
+       transform="matrix(0.55763053,0,0,0.55763053,108.46072,388.477)">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094"
+         d="m 49.384049,890.65188 c 26.015274,0 52.030551,0 78.045801,0"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.64974022;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094-4"
+         d="m 50.263874,990.49165 c 0,-36.59464 0,-73.18943 0,-109.78413"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.76080704;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094-3"
+         d="m 50.23318,980.54731 c 26.015273,0 52.03054,0 78.04582,0"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.64974022;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094-2"
+         d="m 379.80053,980.80353 c 26.14542,0 52.29084,0 78.43624,0"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.69882774;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094-4-5"
+         d="m 160.12432,990.50585 c 0,-36.59272 0,-73.18542 0,-109.77811"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.76024818;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094-4-6"
+         d="m 269.97098,990.50585 c 0,-36.59272 0,-73.18542 0,-109.77811"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.76024818;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094-4-2"
+         d="m 346.86366,990.50585 c 0,-36.59276 0,-73.18544 0,-109.77813"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.76024818;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094-4-5-7"
+         d="m 379.81766,990.50585 c 0,-36.59272 0,-73.18542 0,-109.77811"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.76024818;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path4094-2-4"
+         d="m 160.10718,980.54731 c 26.14541,0 52.29083,0 78.43625,0"
+         style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:19.69882774;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path4242"
+         d="m 271.70684,889.11779 72.84721,93.66562"
+         style="fill:none;stroke:#0000ff;stroke-width:19.69882774;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+  </g>
+</svg>
diff --git a/resources/logo/logo1024.png b/resources/logo/logo1024.png
new file mode 100644 (file)
index 0000000..52e7cdd
Binary files /dev/null and b/resources/logo/logo1024.png differ
diff --git a/resources/logo/logo128.png b/resources/logo/logo128.png
new file mode 100644 (file)
index 0000000..59e1ace
Binary files /dev/null and b/resources/logo/logo128.png differ
diff --git a/resources/logo/logo16.png b/resources/logo/logo16.png
new file mode 100644 (file)
index 0000000..7d1870d
Binary files /dev/null and b/resources/logo/logo16.png differ
diff --git a/resources/logo/logo256.png b/resources/logo/logo256.png
new file mode 100644 (file)
index 0000000..3f9a2cc
Binary files /dev/null and b/resources/logo/logo256.png differ
diff --git a/resources/logo/logo32.png b/resources/logo/logo32.png
new file mode 100644 (file)
index 0000000..dae3d38
Binary files /dev/null and b/resources/logo/logo32.png differ
diff --git a/resources/logo/logo48.png b/resources/logo/logo48.png
new file mode 100644 (file)
index 0000000..51906fb
Binary files /dev/null and b/resources/logo/logo48.png differ
diff --git a/resources/logo/logo512.png b/resources/logo/logo512.png
new file mode 100644 (file)
index 0000000..58f6426
Binary files /dev/null and b/resources/logo/logo512.png differ
diff --git a/resources/logo/logo64.png b/resources/logo/logo64.png
new file mode 100644 (file)
index 0000000..e4198b4
Binary files /dev/null and b/resources/logo/logo64.png differ
index 3e7dbe1369769acfa1954f18618d56d0502ac99c..b3fa09ff1a5badbcdbc990a5bc5a21dab4966f02 100644 (file)
@@ -9,7 +9,7 @@
 
 (asdf:defsystem clnl
   :name "Experiment"
-  :version "0.0.1"
+  :version "0.0"
   :maintainer "Frank Duncan (frank@kank.com)"
   :author "Frank Duncan (frank@kank.com)"
   :depends-on (:cl-ppcre :mt19937 :cl-opengl :cl-glut :cl-charms :clnl.internal))
index 6947ccc0de0eebd56911fd287a22a7c6c20b5b21..d65a7971fb84fd168d9e37787c10734e8d7ba2ed 100644 (file)
@@ -1,7 +1,6 @@
 ; For why this is the way it is, see src/main/clnl.asd
 (asdf:defsystem clnl-test
   :name "Experiment Tests"
-  :version "0.0.1"
   :maintainer "Frank Duncan (frank@kank.com)"
   :author "Frank Duncan (frank@kank.com)"
   :serial t