From: Frank Duncan Date: Fri, 4 Sep 2015 17:24:46 +0000 (-0500) Subject: Create deployables X-Git-Tag: v0.0.0~1 X-Git-Url: https://code.consxy.com/gitweb/?a=commitdiff_plain;h=dc93f45662d4336c8b14d9ecd944b7bfb946fd0e;p=clnl Create deployables --- diff --git a/.gitignore b/.gitignore index a9a5aec..8b13789 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -tmp + diff --git a/README.md b/README.md index 002a7b6..910cfdf 100644 --- 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 index 0000000..06f0cd8 --- /dev/null +++ b/bin/buildlinuxexec.sh @@ -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 index 0000000..40811b8 --- /dev/null +++ b/bin/buildosxrelease.sh @@ -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 diff --git a/bin/buildwindowsexec.sh b/bin/buildwindowsexec.sh index 8976cef..b248488 100755 --- a/bin/buildwindowsexec.sh +++ b/bin/buildwindowsexec.sh @@ -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 index 0000000..6a78757 --- /dev/null +++ b/bin/release.sh @@ -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 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 index 0000000..68cf504 --- /dev/null +++ b/dist/osx/CLNL.app/Contents/Info.plist @@ -0,0 +1,14 @@ + + + + + CFBundleName + CLNL + CFBundleIdentifier + net.kank.clnl + CFBundleVersion + 0.0.1.20150904 + CFBundleIconFile + CLNL.icns + + diff --git a/dist/osx/CLNL.app/Contents/MacOS/CLNL b/dist/osx/CLNL.app/Contents/MacOS/CLNL new file mode 100755 index 0000000..790cc97 --- /dev/null +++ b/dist/osx/CLNL.app/Contents/MacOS/CLNL @@ -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 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 index 0000000..4f5fd3f --- /dev/null +++ b/resources/logo/logo.svg @@ -0,0 +1,159 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/logo/logo1024.png b/resources/logo/logo1024.png new file mode 100644 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 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 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 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 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 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 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 index 0000000..e4198b4 Binary files /dev/null and b/resources/logo/logo64.png differ diff --git a/src/main/clnl.asd b/src/main/clnl.asd index 3e7dbe1..b3fa09f 100644 --- a/src/main/clnl.asd +++ b/src/main/clnl.asd @@ -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)) diff --git a/src/test/clnl-test.asd b/src/test/clnl-test.asd index 6947ccc..d65a797 100644 --- a/src/test/clnl-test.asd +++ b/src/test/clnl-test.asd @@ -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