-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added sound player stuff. More importantly, changed build process to …
…work on OS X 10.7+ with Java 7+.
- Loading branch information
Showing
25 changed files
with
826 additions
and
130 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
custom.old/ | ||
lib-hmmm/ | ||
/bin | ||
/target | ||
/project | ||
|
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
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
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,76 @@ | ||
How to Build the Mac App (Latest) | ||
--------------------------------- | ||
|
||
This is a little convoluted, but: | ||
|
||
1 First run 'sbt compile' in the root directory of the project. | ||
2 cd into the 'custom' directory. | ||
3 Run 'ant'. This builds release/Sarah.app under custom. | ||
|
||
Notes | ||
----- | ||
|
||
I was using sbt-assembly, but I ran into name collisions that | ||
would probably keep the Java 'mail' jars from working. | ||
|
||
The custom/build.xml file requires JAVA_HOME to be set. | ||
|
||
The custom/build.xml file need some love. | ||
|
||
Requirements (AppBundler) | ||
------------------------- | ||
|
||
The Ant build process requires the AppBundler jar to work | ||
on OS X 10.7 and newer along with Java 7 and newer. Here's | ||
some info: | ||
|
||
* https://java.net/projects/appbundler/pages/Home | ||
* https://java.net/downloads/appbundler/appbundler.html | ||
* http://intransitione.com/blog/take-java-to-app-store/ (very helpful) | ||
* http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html | ||
|
||
Assuming this process works, you can safely ignore everything else | ||
that I've written below. | ||
|
||
|
||
Old Instructions for Using sbt-assembly | ||
--------------------------------------- | ||
|
||
The instructions below discuss how to build the application with | ||
sbt-assembly. As long as the directions above work properly, there's | ||
no need to worry about the stuff below. | ||
|
||
|
||
HOW TO BUILD THE MAC APP | ||
------------------------ | ||
|
||
1) First run "sbt assembly" in the project's root directory. | ||
That creates a single JAR file for the entire application. | ||
(More on this shortly.) | ||
|
||
2) Move into the 'custom' directory. Make sure JAVA_HOME is set | ||
properly, and then run "ant". This should create a 'Sarah.app' subdirectory | ||
under 'custom'. | ||
|
||
IMPORTANT NOTES | ||
--------------- | ||
|
||
* I configured sbt-assembly in the build.sbt file to handle problems where several | ||
jars contain the same filenames and paths. This may cause problems. The email jars | ||
are the primary culprits. | ||
|
||
* The 'custom' directory was changed because I need to use 'AppBundler' with Java 7 | ||
instead of the older JarBundler, which I used previously. (JarBundler won't work with | ||
Java 7.) | ||
|
||
* sbt-assembly 'Merge' notes: This URL was helpful: | ||
http://nicta.github.io/scoobi/guide/com.nicta.scoobi.guide.Deployment.html | ||
|
||
HOW TO INSTALL SARAH | ||
-------------------- | ||
|
||
* At this time the install files are in the Install subdirectory of this directory. | ||
This is still a work in progress, but I'm aiming to put Sarah's data files in this dir: | ||
$HOME/Library/Application Support/devdaily.com/Sarah | ||
|
||
|
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
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
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,119 @@ | ||
<project name="Sarah" default="create-bundle" basedir="."> | ||
|
||
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask"/> | ||
|
||
<!-- input stuff --> | ||
<property name="classes.dir" value="../target/scala-2.9.1.final/classes" /> | ||
<property name="lib.dir" value="../lib" /> | ||
<property name="current.dir" value="." /> | ||
<property name="scala-lib.dir" value="scala-libs" /> | ||
|
||
<!-- output stuff --> | ||
<property name="jar.dir" value="jar" /> | ||
<property name="release.dir" value="release" /> | ||
<property name="jar.filename" value="sarah.jar" /> | ||
|
||
<target name="init"> | ||
<tstamp/> | ||
</target> | ||
|
||
<!-- CLEAN --> | ||
<target name="clean"> | ||
<!-- these are just needed for the first-time setup --> | ||
<mkdir dir="${jar.dir}"/> | ||
<mkdir dir="${release.dir}"/> | ||
<!-- remove all the old jars from the jar directory --> | ||
<delete> | ||
<fileset dir="${jar.dir}"> | ||
<include name="**/*.jar"/> | ||
<include name="**/*.zip"/> | ||
</fileset> | ||
</delete> | ||
<!-- remove the old version of the app --> | ||
<delete> | ||
<fileset dir="${release.dir}"> | ||
<include name="**/*.app"/> | ||
</fileset> | ||
</delete> | ||
</target> | ||
|
||
<!-- CREATE JAR --> | ||
<target name="create-jar" depends="clean"> | ||
<!-- copy the application classes --> | ||
<jar basedir="${classes.dir}" | ||
jarfile="${jar.dir}/${jar.filename}" | ||
manifest="${current.dir}/sarah.manifest"/> | ||
|
||
<!-- copy the application jars --> | ||
<copy todir="${jar.dir}"> | ||
<fileset dir="${lib.dir}"> | ||
<include name="**/*.jar"/> | ||
</fileset> | ||
</copy> | ||
<!-- copy the scala jars --> | ||
<copy todir="${jar.dir}"> | ||
<fileset dir="${scala-lib.dir}"> | ||
<include name="**/*.jar"/> | ||
</fileset> | ||
</copy> | ||
</target> | ||
|
||
<!-- CREATE MAC BUNDLE (NEW) --> | ||
|
||
<target name="create-bundle" depends="create-jar"> | ||
<bundleapp outputdirectory="${release.dir}" | ||
name="Sarah" | ||
displayname="Sarah" | ||
identifier="com.devdaily.sarah.Sarah" | ||
shortversion="0.2" | ||
applicationCategory="public.app-category.developer-tools" | ||
mainclassname="com/devdaily/sarah/Sarah"> | ||
|
||
<runtime dir="${env.JAVA_HOME}" /> | ||
|
||
<!-- need an entry for each jar file (!) --> | ||
<classpath file="lib/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz.jar" /> | ||
<classpath file="lib/akka-actor-2.0.2.jar" /> | ||
<classpath file="lib/basicplayer3.0.jar" /> | ||
<classpath file="lib/commons-codec-1.4.jar" /> | ||
<classpath file="lib/commons-lang3-3.1.jar" /> | ||
<classpath file="lib/commons-logging-1.1.1.jar" /> | ||
<classpath file="lib/dsn.jar" /> | ||
<classpath file="lib/htmlcleaner-2.2.jar" /> | ||
<classpath file="lib/httpclient-4.1.2.jar" /> | ||
<classpath file="lib/httpclient-cache-4.1.2.jar" /> | ||
<classpath file="lib/httpcore-4.1.2.jar" /> | ||
<classpath file="lib/httpmime-4.1.2.jar" /> | ||
<classpath file="lib/imap.jar" /> | ||
<classpath file="lib/jl1.0.1-orig.jar" /> | ||
<classpath file="lib/js.jar" /> | ||
<classpath file="lib/jsapi.jar" /> | ||
<classpath file="lib/junit-4.8.1.jar" /> | ||
<classpath file="lib/kj_dsp1.1.jar" /> | ||
<classpath file="lib/lift-json_2.9.0-1-2.4-M2.jar" /> | ||
<classpath file="lib/mailapi.jar" /> | ||
<classpath file="lib/mp3spi1.9.4.jar" /> | ||
<classpath file="lib/paranamer-2.1.jar" /> | ||
<classpath file="lib/pop3.jar" /> | ||
<classpath file="lib/sarah.jar" /> | ||
<classpath file="lib/scala-library.jar" /> | ||
<classpath file="lib/slf4j-api-1.6.4.jar" /> | ||
<classpath file="lib/slf4j-simple-1.6.4.jar" /> | ||
<classpath file="lib/slf4s_2.9.1-1.0.7.jar" /> | ||
<classpath file="lib/smtp.jar" /> | ||
<classpath file="lib/snakeyaml-1.9.jar" /> | ||
<classpath file="lib/sphinx4.jar" /> | ||
<classpath file="lib/tritonus_share.jar" /> | ||
|
||
<option value="-Dapple.laf.useScreenMenuBar=true"/> | ||
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/> | ||
<option value="-Dcom.apple.macos.useScreenMenuBar=true"/> | ||
<option value="-Dapple.awt.application.name=MyApp"/> | ||
<option value="-Dcom.apple.smallTabs=true"/> | ||
|
||
</bundleapp> | ||
</target> | ||
|
||
</project> | ||
|
||
|
Oops, something went wrong.