Skip to content

Commit

Permalink
Create a launcher and add it to the distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmanm committed Dec 31, 2024
1 parent 78d52de commit 9d4eb75
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ package :
cp $(root.forth)*.forth $(root.build)
mkdir -p $(root.build)docs
cp $(root.docs)*.md $(root.build)docs
cp $(ROOT)bjForth $(root.build)
cd $(root.build) && tar -cf bjForth-$(VERSION).tar *

####################################################################################################
Expand Down
19 changes: 19 additions & 0 deletions bjForth
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

jarFile=$(ls bjForth-*.jar 2>/dev/null)
if [[ -z $jarFile ]]; then
echo "Cannot find bjForth JAR file. Make sure you are in the same directory."
exit 1;
fi

# Your source files should go here.
# For instance, cat bjForth.forth my-source.forth - | ...
cat bjForth.forth - \
| java \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.io=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.util.stream=ALL-UNNAMED \
-jar ${jarFile}

0 comments on commit 9d4eb75

Please sign in to comment.