2012-10-14 20:33:26 +00:00
|
|
|
class Gwt < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Google web toolkit"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "http://www.gwtproject.org/"
|
|
|
|
url "https://storage.googleapis.com/gwt-releases/gwt-2.7.0.zip"
|
|
|
|
sha256 "aa65061b73836190410720bea422eb8e787680d7bc0c2b244ae6c9a0d24747b3"
|
2012-10-14 20:33:26 +00:00
|
|
|
|
2015-10-23 11:14:14 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2012-10-14 20:33:26 +00:00
|
|
|
def install
|
2015-08-03 12:55:31 +00:00
|
|
|
rm Dir["*.cmd"] # remove Windows cmd files
|
|
|
|
share.install Dir["*"]
|
2012-10-14 20:33:26 +00:00
|
|
|
|
|
|
|
# Don't use the GWT scripts because they expect the GWT jars to
|
|
|
|
# be in the same place as the script.
|
2015-08-03 12:55:31 +00:00
|
|
|
(bin/"webAppCreator").write <<-EOS.undent
|
2012-10-14 20:33:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
HOMEDIR=#{share}
|
|
|
|
java -cp "$HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev.jar" com.google.gwt.user.tools.WebAppCreator "$@";
|
|
|
|
EOS
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
(bin/"benchmarkViewer").write <<-EOS.undent
|
2012-10-14 20:33:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
APPDIR=#{share}
|
|
|
|
java -Dcom.google.gwt.junit.reportPath="$1" -cp "$APPDIR/gwt-dev.jar" com.google.gwt.dev.RunWebApp -port auto $APPDIR/gwt-benchmark-viewer.war;
|
|
|
|
EOS
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
(bin/"i18nCreator").write <<-EOS.undent
|
2012-10-14 20:33:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
HOMEDIR=#{share}
|
|
|
|
java -cp "$HOMEDIR/gwt-user.jar:$HOMEDIR/gwt-dev.jar" com.google.gwt.i18n.tools.I18NCreator "$@";
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
The GWT jars are available at #{share}
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|