Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cgoddard/grab all console info #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions JSErrorCollector.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: junit:junit:4.8.2" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-firefox-driver:2.45.0" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-remote-driver:2.45.0" level="project" />
<orderEntry type="library" name="Maven: cglib:cglib-nodep:2.1_3" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.3.1" level="project" />
<orderEntry type="library" name="Maven: org.seleniumhq.selenium:selenium-api:2.45.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.3.6" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.3.3" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.3" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.6" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jna:jna:3.4.0" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jna:platform:3.4.0" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-exec:1.1" level="project" />
</component>
</module>
253 changes: 125 additions & 128 deletions firefox/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,128 +1,125 @@
#!/bin/bash
# build.sh -- builds JAR and XPI files for mozilla extensions
# by Nickolay Ponomarev <[email protected]>
# (original version based on Nathan Yergler's build script)
# Most recent version is at <http://kb.mozillazine.org/Bash_build_script>

# This script assumes the following directory structure:
# ./
# chrome.manifest (optional - for newer extensions)
# install.rdf
# (other files listed in $ROOT_FILES)
#
# content/ |
# locale/ |} these can be named arbitrary and listed in $CHROME_PROVIDERS
# skin/ |
#
# defaults/ |
# components/ |} these must be listed in $ROOT_DIRS in order to be packaged
# ... |
#
# It uses a temporary directory ./build when building; don't use that!
# Script's output is:
# ./$APP_NAME.xpi
# ./$APP_NAME.jar (only if $KEEP_JAR=1)
# ./files -- the list of packaged files
#
# Note: It modifies chrome.manifest when packaging so that it points to
# chrome/$APP_NAME.jar!/*

#
# default configuration file is ./config_build.sh, unless another file is
# specified in command-line. Available config variables:
APP_NAME= # short-name, jar and xpi files name. Must be lowercase with no spaces
CHROME_PROVIDERS= # which chrome providers we have (space-separated list)
CLEAN_UP= # delete the jar / "files" when done? (1/0)
ROOT_FILES= # put these files in root of xpi (space separated list of leaf filenames)
ROOT_DIRS= # ...and these directories (space separated list)
BEFORE_BUILD= # run this before building (bash command)
AFTER_BUILD= # ...and this after the build (bash command)

if [ -z $1 ]; then
. ./config_build.sh
else
. $1
fi

if [ -z $APP_NAME ]; then
echo "You need to create build config file first!"
echo "Read comments at the beginning of this script for more info."
exit;
fi

ROOT_DIR=`pwd`
TMP_DIR=build

#uncomment to debug
#set -x

# remove any left-over files from previous build
rm -f $APP_NAME.jar $APP_NAME.xpi files
rm -rf $TMP_DIR

$BEFORE_BUILD

mkdir --parents --verbose $TMP_DIR/chrome

# generate the JAR file, excluding CVS, SVN, and temporary files
JAR_FILE=$TMP_DIR/chrome/$APP_NAME.jar
echo "Generating $JAR_FILE..."
for CHROME_SUBDIR in $CHROME_PROVIDERS; do
find $CHROME_SUBDIR \( -path '*CVS*' -o -path '*.svn*' \) -prune -o -type f -print | grep -v \~ >> files
done

zip -0 -r $JAR_FILE -@ < files
# The following statement should be used instead if you don't wish to use the JAR file
#cp --verbose --parents `cat files` $TMP_DIR/chrome

# prepare components and defaults
echo "Copying various files to $TMP_DIR folder..."
for DIR in $ROOT_DIRS; do
mkdir $TMP_DIR/$DIR
FILES="`find $DIR \( -path '*CVS*' -o -path '*.svn*' \) -prune -o -type f -print | grep -v \~`"
echo $FILES >> files
cp --verbose --parents $FILES $TMP_DIR
done

# Copy other files to the root of future XPI.
for ROOT_FILE in $ROOT_FILES install.rdf chrome.manifest; do
cp --verbose $ROOT_FILE $TMP_DIR
if [ -f $ROOT_FILE ]; then
echo $ROOT_FILE >> files
fi
done

cd $TMP_DIR

if [ -f "chrome.manifest" ]; then
echo "Preprocessing chrome.manifest..."
# You think this is scary?
#s/^(content\s+\S*\s+)(\S*\/)$/\1jar:chrome\/$APP_NAME\.jar!\/\2/
#s/^(skin|locale)(\s+\S*\s+\S*\s+)(.*\/)$/\1\2jar:chrome\/$APP_NAME\.jar!\/\3/
#
# Then try this! (Same, but with characters escaped for bash :)
sed -i -r s/^\(content\\s+\\S*\\s+\)\(\\S*\\/\)$/\\1jar:chrome\\/$APP_NAME\\.jar!\\/\\2/ chrome.manifest
sed -i -r s/^\(skin\|locale\)\(\\s+\\S*\\s+\\S*\\s+\)\(.*\\/\)$/\\1\\2jar:chrome\\/$APP_NAME\\.jar!\\/\\3/ chrome.manifest

# (it simply adds jar:chrome/whatever.jar!/ at appropriate positions of chrome.manifest)
fi

# generate the XPI file
echo "Generating $APP_NAME.xpi..."
zip -r ../$APP_NAME.xpi *

cd "$ROOT_DIR"

echo "Cleanup..."
if [ $CLEAN_UP = 0 ]; then
# save the jar file
mv $TMP_DIR/chrome/$APP_NAME.jar .
else
rm ./files
fi

# remove the working files
rm -rf $TMP_DIR
echo "Done!"

$AFTER_BUILD
#!/bin/bash
# build.sh -- builds JAR and XPI files for mozilla extensions
# by Nickolay Ponomarev <[email protected]>
# (original version based on Nathan Yergler's build script)
# Most recent version is at <http://kb.mozillazine.org/Bash_build_script>
# This script assumes the following directory structure:
# ./
# chrome.manifest (optional - for newer extensions)
# install.rdf
# (other files listed in $ROOT_FILES)
#
# content/ |
# locale/ |} these can be named arbitrary and listed in $CHROME_PROVIDERS
# skin/ |
#
# defaults/ |
# components/ |} these must be listed in $ROOT_DIRS in order to be packaged
# ... |
#
# It uses a temporary directory ./build when building; don't use that!
# Script's output is:
# ./$APP_NAME.xpi
# ./$APP_NAME.jar (only if $KEEP_JAR=1)
# ./files -- the list of packaged files
#
# Note: It modifies chrome.manifest when packaging so that it points to
# chrome/$APP_NAME.jar!/*
#
# default configuration file is ./config_build.sh, unless another file is
# specified in command-line. Available config variables:
APP_NAME= # short-name, jar and xpi files name. Must be lowercase with no spaces
CHROME_PROVIDERS= # which chrome providers we have (space-separated list)
CLEAN_UP= # delete the jar / "files" when done? (1/0)
ROOT_FILES= # put these files in root of xpi (space separated list of leaf filenames)
ROOT_DIRS= # ...and these directories (space separated list)
BEFORE_BUILD= # run this before building (bash command)
AFTER_BUILD= # ...and this after the build (bash command)
if [ -z $1 ]; then
. ./config_build.sh
else
. $1
fi

if [ -z $APP_NAME ]; then
echo "You need to create build config file first!"
echo "Read comments at the beginning of this script for more info."
exit;
fi

ROOT_DIR=`pwd`
TMP_DIR=build

#uncomment to debug
#set -x

# remove any left-over files from previous build
rm -f $APP_NAME.jar $APP_NAME.xpi files
rm -rf $TMP_DIR

$BEFORE_BUILD

mkdir --parents --verbose $TMP_DIR/chrome

# generate the JAR file, excluding CVS, SVN, and temporary files
JAR_FILE=$TMP_DIR/chrome/$APP_NAME.jar
echo "Generating $JAR_FILE..."
for CHROME_SUBDIR in $CHROME_PROVIDERS; do
find $CHROME_SUBDIR \( -path '*CVS*' -o -path '*.svn*' \) -prune -o -type f -print | grep -v \~ >> files
done

zip -0 -r $JAR_FILE -@ < files
# The following statement should be used instead if you don't wish to use the JAR file
#cp --verbose --parents `cat files` $TMP_DIR/chrome

# prepare components and defaults
echo "Copying various files to $TMP_DIR folder..."
for DIR in $ROOT_DIRS; do
mkdir $TMP_DIR/$DIR
FILES="`find $DIR \( -path '*CVS*' -o -path '*.svn*' \) -prune -o -type f -print | grep -v \~`"
echo $FILES >> files
cp --verbose --parents $FILES $TMP_DIR
done

# Copy other files to the root of future XPI.
for ROOT_FILE in $ROOT_FILES install.rdf chrome.manifest; do
cp --verbose $ROOT_FILE $TMP_DIR
if [ -f $ROOT_FILE ]; then
echo $ROOT_FILE >> files
fi
done

cd $TMP_DIR

if [ -f "chrome.manifest" ]; then
echo "Preprocessing chrome.manifest..."
# You think this is scary?
#s/^(content\s+\S*\s+)(\S*\/)$/\1jar:chrome\/$APP_NAME\.jar!\/\2/
#s/^(skin|locale)(\s+\S*\s+\S*\s+)(.*\/)$/\1\2jar:chrome\/$APP_NAME\.jar!\/\3/
#
# Then try this! (Same, but with characters escaped for bash :)
sed -i -r s/^\(content\\s+\\S*\\s+\)\(\\S*\\/\)$/\\1jar:chrome\\/$APP_NAME\\.jar!\\/\\2/ chrome.manifest
sed -i -r s/^\(skin\|locale\)\(\\s+\\S*\\s+\\S*\\s+\)\(.*\\/\)$/\\1\\2jar:chrome\\/$APP_NAME\\.jar!\\/\\3/ chrome.manifest

# (it simply adds jar:chrome/whatever.jar!/ at appropriate positions of chrome.manifest)
fi

# generate the XPI file
echo "Generating $APP_NAME.xpi..."
zip -r ../$APP_NAME.xpi *

cd "$ROOT_DIR"

echo "Cleanup..."
if [ $CLEAN_UP = 0 ]; then
# save the jar file
mv $TMP_DIR/chrome/$APP_NAME.jar .
else
rm ./files
fi

# remove the working files
rm -rf $TMP_DIR
echo "Done!"

$AFTER_BUILD
Loading