changeset 50:c433b19a8dfa

start build
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 24 May 2025 10:01:57 -0600
parents c17c5312e8de
children 32631fdbbdf1
files .hgignore build.sh scripts/install.sh scripts/uninstall.sh src/luan_editor/SpellCheckerLuan$1.class src/luan_editor/SpellCheckerLuan.class
diffstat 6 files changed, 60 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Wed May 21 11:50:10 2025 -0600
+++ b/.hgignore	Sat May 24 10:01:57 2025 -0600
@@ -3,3 +3,4 @@
 mine/
 err
 Makefile
+build/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build.sh	Sat May 24 10:01:57 2025 -0600
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+set -e
+
+. luan string:
+
+rm -rf build
+mkdir -p build/luan_editor/jars
+cp $LUAN/jars/luan.jar build/luan_editor/jars
+cp $LUAN/jars/miglayout-*.jar build/luan_editor/jars
+cp $LUAN/jars/flatlaf-*.jar build/luan_editor/jars
+cp lib/*.jar build/luan_editor/jars
+
+. classpath.sh
+cd src
+javac -classpath $CLASSPATH `find . -name *.java`
+jar cvf ../build/luan_editor/jars/luan_editor.jar `find . -name *.class -o -name *.luan`
+cd ..
+
+cp -r dictionaries build/luan_editor
+
+cp scripts/install.sh build/luan_editor
+cp scripts/uninstall.sh build/luan_editor
+hg identify >build/luan_editor/hg_rev.txt
+
+build/luan_editor/install.sh || sudo build/luan_editor/install.sh
+
+echo done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/install.sh	Sat May 24 10:01:57 2025 -0600
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+
+cd $(dirname $0)
+
+mkdir -p /usr/local/bin
+
+cat >/usr/local/bin/luan_editor <<End
+#!/bin/bash
+
+export DICTIONARIES=$(pwd)/dictionaries/
+
+for i in $(pwd)/jars/* ; do CLASSPATH=\$CLASSPATH:\$i ; done
+CLASSPATH=\$(echo -n \$CLASSPATH | sed 's/^://')
+
+set +m
+
+java -Xdock:name="Luan Editor" -classpath $CLASSPATH luan.Luan classpath:luan_editor/editor.luan "$@" 2>&1 | grep --line-buffered -v 'NSRemoteView\|NSSavePanel' &
+End
+
+chmod +x /usr/local/bin/luan_editor
+
+echo "the command 'luan_editor' has been installed"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/uninstall.sh	Sat May 24 10:01:57 2025 -0600
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+set -e
+rm -f /usr/local/bin/luan_editor
+cd `dirname $0`
+echo "luan_editor has been uninstalled"
+echo "you can now delete `pwd`"
Binary file src/luan_editor/SpellCheckerLuan$1.class has changed
Binary file src/luan_editor/SpellCheckerLuan.class has changed