Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Revised Shoes launcher app
- Loading branch information
1 parent
cdabd2d
commit 6e69ed8
Showing
9 changed files
with
128 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ docs-* | |
spec/test_app/pkg | ||
testing | ||
tmp/* | ||
app/tmp/* | ||
bin/shoes-backend | ||
shoes-core/bin/shoes-backend | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env sh | ||
|
||
JRUBY_VERSION=$(cat ../.ruby-version | sed 's/jruby-//') | ||
SHOES_VERSION=$(cat ../VERSION) | ||
|
||
echo "Building for JRuby $JRUBY_VERSION and Shoes $SHOES_VERSION" | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# Make a place to work in... | ||
mkdir -p $DIR/tmp | ||
|
||
BUILD_DIR=$DIR/tmp/Shoes4.app | ||
rm -rf $BUILD_DIR | ||
|
||
cp -r $DIR/mac-template $BUILD_DIR | ||
pushd $BUILD_DIR | ||
|
||
# Put the Shoes app in there | ||
mkdir -p ./Contents/PlugIns/Shoes | ||
cp ../../*.rb ./Contents/Plugins/Shoes | ||
cp ../../*.png ./Contents/Plugins/Shoes | ||
|
||
# Get our app script templated out right | ||
sed "s/@@JRUBY_VERSION@@/jruby-$JRUBY_VERSION/g" ./Contents/MacOS/app.template > ./Contents/MacOS/app | ||
chmod +x ./Contents/MacOS/app | ||
|
||
# Get me a JRuby | ||
curl -s https://repo1.maven.org/maven2/org/jruby/jruby-dist/$JRUBY_VERSION/jruby-dist-$JRUBY_VERSION-bin.tar.gz > ./Contents/PlugIns/jruby.tar.gz | ||
tar -C ./Contents/PlugIns -xvf ./Contents/PlugIns/jruby.tar.gz | ||
|
||
# Get me some Shoes! | ||
./Contents/PlugIns/jruby-$JRUBY_VERSION/bin/jruby -S gem install shoes -v $SHOES_VERSION | ||
|
||
# Clean up after ourselves | ||
rm ./Contents/PlugIns/jruby.tar.gz | ||
rm ./Contents/MacOS/*.template | ||
|
||
cd .. | ||
tar -czf Shoes4-mac.tar.gz Shoes4.app | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>app</string> | ||
<key>CFBundleIconFile</key> | ||
<string>Shoes.icns</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.hackety.shoes.exampleapp</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>Shoes App</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>Shoes App</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string></string> | ||
<key>LSApplicationCategoryType</key> | ||
<string>public.app-category.entertainment</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /usr/bin/env bash | ||
|
||
JRUBY_VERSION="@@JRUBY_VERSION@@" | ||
JRE_VERSION="jre1.8.0_131" | ||
|
||
JRUBY_COMMAND="jruby -J-XstartOnFirstThread" | ||
SHOES_COMMAND="$JRUBY_COMMAND -S shoes-swt" | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
PLUGIN_DIR="$DIR/../PlugIns" | ||
|
||
export PATH="$PLUGIN_DIR/$JRUBY_VERSION/bin:$PATH" | ||
|
||
# Check if we've got java available, download if not | ||
java -version > /dev/null | ||
if [ $? != 0 ]; then | ||
|
||
# See if we already have a downloaded JRE we can use | ||
if [ ! -d ~/.shoes/jre ]; then | ||
mkdir -p ~/.shoes | ||
|
||
# Download a JRE | ||
pushd ~/.shoes | ||
curl -L https://github.com/shoes/mac-app-templates/releases/download/$JRE_VERSION/$JRE_VERSION.tar.gz > jre.tar.gz | ||
tar -zxvf jre.tar.gz | ||
mv ~/.shoes/$JRE_VERSION.jre ~/.shoes/jre | ||
popd | ||
fi | ||
|
||
export JAVA_HOME=~/.shoes/jre/Contents/Home/ | ||
fi | ||
|
||
$SHOES_COMMAND $DIR/../PlugIns/Shoes/shoes_app.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
APPL???? |
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
app/mac-template/Contents/Resources/en.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"JRELoadError" = "Unable to load Java Runtime Environment."; | ||
"MainClassNameRequired" = "Main class name is required."; | ||
"JavaDirectoryNotFound" = "Unable to enumerate Java directory contents."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters