Skip to content

Commit

Permalink
#283 Backward compatibility version: v0.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelijusb committed Feb 21, 2015
1 parent 54556fa commit dbe52ba
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 11 deletions.
@@ -1 +1 @@
version=0.6.4
version=0.6.5
2 changes: 1 addition & 1 deletion auginte-desktop/build.sbt
@@ -1,7 +1,7 @@
import sbtassembly.Plugin.AssemblyKeys.assembly

// Use from main project
// mainClass in(Compile, run) := Some("com.auginte.desktop.MainGui")
mainClass in(Compile, run) := Some("com.auginte.desktop.Auginte")

// Replaced by ScalaFx
//libraryDependencies += "org.scala-lang" % "scala-swing" % "2.10.0"
Expand Down
16 changes: 12 additions & 4 deletions auginte-desktop/src/main/resources/css/contextMenu.css
@@ -1,5 +1,13 @@
.contextMenu {
-fx-background-color: rgba(128, 255, 255, 0.5);
-fx-border-width: 1px;
-fx-border-color: rgba(0, 128, 128, 1);
.contextMenu, .helpWindow {
-fx-text-fill: derive(#d3f0ff, 20%);
-fx-background-color: derive(#101b20, 10%);
}
.contextMenuButton {
-fx-text-fill: derive(#d3f0ff, 30%);
-fx-background-color: derive(#101b20, 30%);
-fx-background-radius: 0;
}
.contextMenuButton:hover {
-fx-text-fill: derive(#d3f0ff, 40%);
-fx-background-color: derive(#101b20, 40%);
}
2 changes: 1 addition & 1 deletion auginte-desktop/src/main/resources/examples/welcome.json

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions project/build.scala
Expand Up @@ -36,17 +36,22 @@ object build extends sbt.Build {
scalacOptions in(Compile, doc) += "-groups"
)

val fixForEncryptedFileSystems = Seq(
scalacOptions ++= Seq("-Xmax-classfile-name", "100")
)


val packCustomSettings = Seq(
packExtraClasspath := Map("auginte" -> Seq("${JAVA_HOME}/jre/lib/jfxrt.jar")),
packExtraClasspath := Map("auginte" -> Seq("${JAVA_HOME}/jre/lib/jfxrt.jar", "%JAVA_HOME%\\lib\\jfxrt.jar")),
packBashTemplate := "./project/templates/launch.mustache",
packResourceDir += (baseDirectory.value / "auginte-desktop/src/pack" -> "")
)

val customTasks = Seq(CustomTasks.deployTask)

// Project
lazy val allSettings = buildSettings ++ scalaDocSettings ++ packAutoSettings ++ packCustomSettings ++ customTasks
lazy val allSettings = buildSettings ++ scalaDocSettings ++ packAutoSettings ++ packCustomSettings ++ customTasks ++
fixForEncryptedFileSystems
lazy val withAssembly = allSettings ++ assemblySettings

lazy val root = Project(
Expand Down Expand Up @@ -108,7 +113,7 @@ object CustomTasks {
"<java.home>/lib/rt.jar"
)

private val deploy = TaskKey[Unit]("deploy", "Prints 'Hello World'")
private val deploy = TaskKey[Unit]("deploy", "Packs and obfuscates")

val deployTask = deploy := {
val log = streams.value.log
Expand Down Expand Up @@ -197,7 +202,8 @@ object Proguard {

val writer = new PrintWriter(new BufferedWriter(new FileWriter(configuration)))
for (inJar <- template.auginteLibraries) {
writer.println(s"-injars $inJar")
val manifest = if (inJar.contains("-desktop_")) "" else "(!META-INF/MANIFEST.MF)"
writer.println(s"-injars $inJar$manifest")
}
writer.println(s"-outjars ${template.libraryPath}/auginte.jar")
for (libraryJar <- template.otherLibraries ++ template.additionalLibraries) {
Expand Down
133 changes: 133 additions & 0 deletions project/templates/launch.mustache
@@ -0,0 +1,133 @@
#!/bin/sh
# Run script adapted from sbt-pack (2012 Taro L. Saito)
# See http://www.apache.org/licenses/LICENSE-2.0

if [ -z "$PROG_HOME" ] ; then
## resolve links - $0 may be a link to PROG_HOME
PRG="$0"

# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done

saveddir=`pwd`

PROG_HOME=`dirname "$PRG"`/..

# make it fully qualified
PROG_HOME=`cd "$PROG_HOME" && pwd`

cd "$saveddir"
fi


cygwin=false
mingw=false
darwin=false
case "`uname`" in
CYGWIN*) cygwin=true
;;
MINGW*) mingw=true
;;
Darwin*) darwin=true
if [ -z "$JAVA_VERSION" ] ; then
JAVA_VERSION="CurrentJDK"
else
echo "Using Java version: $JAVA_VERSION" 1>&2
fi
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
fi
JVM_OPT="$JVM_OPT -Xdock:name=${PROG_NAME} -Xdock:icon=$PROG_HOME/{{{MAC_ICON_FILE}}} -Dapple.laf.useScreenMenuBar=true"
JAVACMD="`which java`"
;;
esac

# Resolve JAVA_HOME from javac command path
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" -a ! "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
javaExecutable="`readlink -f \"$javaExecutable\"`"
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi


if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
fi
fi

if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute $JAVACMD"
exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi

CLASSPATH_SUFFIX=""
# Path separator used in EXTRA_CLASSPATH
PSEP=":"

# For Cygwin, switch paths to Windows-mixed format before running java
if $cygwin; then
[ -n "$PROG_HOME" ] &&
PROG_HOME=`cygpath -am "$PROG_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath -am "$JAVA_HOME"`
CLASSPATH_SUFFIX=";"
PSEP=";"
fi

# For Migwn, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$PROG_HOME" ] &&
PROG_HOME="`(cd "$PROG_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
CLASSPATH_SUFFIX=";"
PSEP=";"
fi


PROG_NAME={{{PROG_NAME}}}
PROG_VERSION={{{PROG_VERSION}}}

exec "$JAVACMD" \
${JVM_OPT} \
{{{JVM_OPTS}}} \
{{^EXPANDED_CLASSPATH}}
-cp "{{{EXTRA_CLASSPATH}}}${PROG_HOME}/lib/*${CLASSPATH_SUFFIX}" \
{{/EXPANDED_CLASSPATH}}
{{#EXPANDED_CLASSPATH}}
-cp "{{{EXTRA_CLASSPATH}}}{{{EXPANDED_CLASSPATH}}}${CLASSPATH_SUFFIX}" \
{{/EXPANDED_CLASSPATH}}
-Dprog.home="${PROG_HOME}" \
-Dprog.version="${PROG_VERSION}" \
-splash:"${PROG_HOME}/res/splash.gif" \
{{{MAIN_CLASS}}} "$@"

0 comments on commit dbe52ba

Please sign in to comment.