Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Just about a working installer

  • Loading branch information...
commit c4acaad11443d0971cad78dc43bae091f522318a 1 parent d0ad851
Ron Evans deadprogram authored
Showing with 58 additions and 0 deletions.
  1. +47 −0 appify.sh
  2. +6 −0 build_installer.sh
  3. +5 −0 kidsruby.sh
47 appify.sh
View
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+
+Appify="$(basename "$0")"
+
+if [ ! "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF
+ Appify v4.1 for Mac OS X
+ Creates the simplest possible Mac OS X app from a shell script.
+
+ Takes a shell script as its first argument:
+
+ $Appify path/to/my-script
+
+ NOTE: You cannot rename appified apps, blame Mac OS X.
+ If you want to give your app a custom name, use the second argument:
+
+ $Appify path/to/my-script "My App"
+
+ Copyright © 2010-2011 Thomas Aylott <http://subtlegradient.com>
+ Copyright © 2011 Mathias Bynens <http://mathiasbynens.be>
+ Copyright © 2011 Sencha, Inc.
+
+EOF
+exit; fi
+
+FILE="$1"
+NAME="${2:-$(basename "$FILE" .sh)}"
+ROOT="$NAME.app/Contents/MacOS"
+
+if [[ -a "$NAME.app" ]]; then
+ echo "$PWD/$NAME.app already exists :(" 1>&2
+ exit 1
+fi
+
+mkdir -p "$ROOT"
+
+if [ -f "$FILE" ]; then
+ cp "$FILE" "$ROOT/$NAME"
+ echo "Copied $ROOT/$NAME" 1>&2
+
+else
+ touch "$ROOT/$NAME"
+ echo "Created blank $ROOT/$NAME" 1>&2
+fi
+
+chmod +x "$ROOT/$NAME"
+
+echo "$PWD/$NAME.app"
6 build_installer.sh
View
@@ -0,0 +1,6 @@
+#!/bin/sh
+cd build
+../appify.sh ../kidsruby.sh "KidsRuby"
+cd ..
+mv build/KidsRuby.app resources
+#/usr/local/bin/platypus -AR -i '/Applications/Platypus.app/Contents/Resources/PlatypusDefault.icns' -a 'KidsRuby Installer for OSX' -o 'Progress Bar' -p '/bin/sh' -u 'The Hybrid Group + Friends' -V '0.7' -I 'org.kidsruby.installer' -f '/Users/ron/Developer/kidsrubyinstaller-osx/resources/git-1.7.6-i386-snow-leopard.dmg' -f '/Users/ron/Developer/kidsrubyinstaller-osx/resources/ruby-1.9.2-p290.universal.tar.gz' -f '/Users/ron/Developer/kidsrubyinstaller-osx/resources/yaml-0.1.4.universal.tar.gz' -f '/Users/ron/Developer/kidsrubyinstaller-osx/resources/qt-mac-opensource-4.7.3.dmg' -f '/Users/ron/Developer/kidsrubyinstaller-osx/resources/kidsruby.sh' -f '/Users/ron/Developer/kidsrubyinstaller-osx/resources/qtbindings-4.7.3-universal-darwin-10.gem' -f '/Users/ron/Developer/kidsrubyinstaller-osx/resources/kidsruby.tar.gz' -f '/Users/ron/Developer/kidsrubyinstaller-osx/resources/kidsirb.sh' -g '#000000' -b '#ffffff' -c '/Users/ron/Developer/kidsrubyinstaller-osx/installer.sh' 'KidsRubyInstaller.app'
5 kidsruby.sh
View
@@ -0,0 +1,5 @@
+#!/bin/sh
+export PATH=/Applications/KidsRuby/ruby/bin:$PATH
+export GEM_HOME=/Applications/KidsRuby/ruby/gem:$GEM_HOME
+
+ruby /Applications/KidsRuby/kidsruby/main.rb
Please sign in to comment.
Something went wrong with that request. Please try again.