Permalink
Browse files

Fix #612: simplify the build scripts now we're not using JARs anymore.

  • Loading branch information...
1 parent 4102d4f commit b0518151f185747f7ca584b87b3b843a64370501 @protz committed Jun 14, 2012
Showing with 21 additions and 295 deletions.
  1. +17 −41 build.sh
  2. +1 −2 build_config.sh
  3. +0 −224 install.rdf.template
  4. +3 −28 package.sh
View
@@ -50,45 +50,39 @@ if [ -z $APP_NAME ]; then
exit;
fi
+if [ -f "content/pdfjs/build/pdf.js" ]; then
+ true;
+else
+ echo "Please run make from content/pdfjs";
+ exit 0
+fi
+
ROOT_DIR=`pwd`
TMP_DIR=build
-#uncomment to debug
+# uncomment to debug
#set -x
# remove any left-over files from previous build
-rm -f $APP_NAME.jar $APP_NAME.xpi files
+rm -f $APP_NAME.xpi files
rm -rf $TMP_DIR
$BEFORE_BUILD
-mkdir --parents --verbose $TMP_DIR/chrome
+mkdir --parents --verbose $TMP_DIR
-# generate the JAR file, excluding CVS and temporary files
-JAR_FILE=$TMP_DIR/chrome/$APP_NAME.jar
-echo "Generating $JAR_FILE..."
-find content/pdfjs -not -iname 'pdf.js' -prune;
-for CHROME_SUBDIR in $CHROME_PROVIDERS; do
- find $CHROME_SUBDIR -not \( -wholename $CHROME_SUBDIR'/pdfjs/*' \
- -and -not -wholename $CHROME_SUBDIR'/pdfjs/build/pdf.js' \) \
+# copy everything brutally, since we're not using JARs anymore
+for DIR in $ROOT_DIRS; do
+ find $DIR -not \( -wholename $DIR'/pdfjs/*' \
+ -and -not -wholename $DIR'/pdfjs/build/pdf.js' \) \
-and -not -iname '.vimsession' \
-and -not -iname '.*.sw*' \
-and -not -iname '.sw*' \
- -type f -print | grep -v \~ >> files
+ -type f -print | grep -v \~ | grep -v '/.git/' >> files
done
-#zip -0 -r $JAR_FILE `cat 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 -iname '.*.sw*' -or -iname '.vimsession' -prune -o -type f -print | grep -v \~`"
- echo $FILES >> files
- cp --verbose --parents $FILES $TMP_DIR
-done
+cp --verbose --parents `cat files` $TMP_DIR
# Copy other files to the root of future XPI.
for ROOT_FILE in $ROOT_FILES install.rdf chrome.manifest; do
@@ -99,34 +93,16 @@ for ROOT_FILE in $ROOT_FILES install.rdf chrome.manifest; do
done
cd $TMP_DIR
-find . -iname '.git' -type d -exec rm -rf {} \;
-find . -iname '.*.sw*' -exec rm -f {} \;
find . -iname 'tests' -type d -exec rm -rf {} \;
-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*\\/\)$/\\1chrome\\/\\2/ chrome.manifest
- sed -i -r s/^\(skin\|locale\)\(\\s+\\S*\\s+\\S*\\s+\)\(.*\\/\)$/\\1\\2chrome\\/\\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
+if [ $CLEAN_UP != 0 ]; then
rm ./files
fi
View
@@ -1,9 +1,8 @@
#!/bin/bash
# Build config for build.sh
APP_NAME=conversations
-CHROME_PROVIDERS="content locale skin"
CLEAN_UP=1
ROOT_FILES="icon.png LICENSE README.md bootstrap.js"
-ROOT_DIRS="defaults modules"
+ROOT_DIRS="content locale skin defaults modules"
BEFORE_BUILD=
AFTER_BUILD=
View
@@ -1,224 +0,0 @@
-<?xml version="1.0"?>
-
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>gconversation@xulforum.org</em:id>
- <em:version>2.4pre</em:version>
-
- <!-- Target Application this theme can install into,
- with minimum and maximum supported versions. -->
- <em:targetApplication>
- <Description>
- <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
- <em:minVersion>12.0a1</em:minVersion>
- <em:maxVersion>15.0a1</em:maxVersion>
- </Description>
- </em:targetApplication>
-
- <!-- Front End MetaData -->
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Brings a conversation view to a Thunderbird near you!</em:description>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:optionsURL>chrome://conversations/content/options.xul</em:optionsURL>
- <em:optionsType>2</em:optionsType>
- <em:iconURL>chrome://conversations/content/icon.png</em:iconURL>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- <em:bootstrap>true</em:bootstrap>
- <em:type>2</em:type>
-
- <em:localized>
- <Description>
- <em:locale>cs</em:locale>
- <em:name>Konverzace pro Thunderbird</em:name>
- <em:description>Přináší do Thunderbirdu zobrazení konverzací!</em:description>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View</em:homepageURL>
- <em:translator>Martin Lukeš</em:translator>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>da</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Bringer samtalevisning til Din Thunderbird!</em:description>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- <em:translator>Glenn Dufke
-http://code-kungfu.com
-
-Tak til Jørgen Rasmussen / MozillaDanmark for korrekturlæsning.</em:translator>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>de</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Gruppiert Ihre Nachrichten (inklusive Ihrer gesendeten) in Konversationen, ähnlich wie Googlemail es tut.</em:description>
- <em:translator>Sebastian Kronenwerth</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>el</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Προσφέρει εμφάνιση μηνυμάτων σε μορφή συνομιλίας στον Thunderbird!.</em:description>
- <em:translator>Γιώργος Φιωτάκης</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <!-- It looks like en-US is necessary though redundant for Babezilla. -->
- <em:localized>
- <Description>
- <em:locale>en-US</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Brings a conversation view to a Thunderbird near you!</em:description>
- <em:translator>Jonathan Protzenko</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>es</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Permite visualizar los mensajes en modo de conversación, de igual manera que en GMail</em:description>
- <em:translator>Proyecto Nave</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>eu-ES</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- <em:translator>Ander Elortondo (librezale.org)</em:translator>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>fr</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Affiche vos emails sous la forme de "conversations" comme sur Gmail. Vos emails sont regroupés et s'affichent sous forme de résumés de fils de discussion.</em:description>
- <em:translator>Eric B</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>he-IL</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>כווץ את הודעות הדוא"ל בשיחות, כולל ההודעות שלך, בדומה לג'יימל.‏</em:description>
- <em:translator>Dotan Cohen</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>it</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Permette di visualizzare le e-mail sotto forma di conversazioni in modo analogo al sito web di Gmail</em:description>
- <em:translator>Luana Di Muzio - BabelZilla</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>ja-JP</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>返信メールが一目でわかるスレッドビューをあなたの Thunderbirdに!</em:description>
- <em:translator>SATO Kentaro</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>pl</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Rozszerzenie dodaje do Thunderbirda widok konwersacji.</em:description>
- <em:translator>Leszek(teo)Życzkowski</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>pt-BR</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Traz o modo de conversa para um Thunderbird perto de você!</em:description>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View</em:homepageURL>
- <em:translator>Marcelo Ghelman (ghelman.net), Mauro José da Silva</em:translator>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>ru-RU</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Группирует Ваши электронные письма в беседах, с Вашими собственными включенными сообщениями, так же как в GMail.</em:description>
- <em:translator>Sergey Podushkin and Gudo Alexander</em:translator>
- <em:creator>Джонатан Проценко</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>sr</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Групише е-поруке у разговоре, укључујући и Ваше поруке, као што то чини Gmail.</em:description>
- <em:translator>Charmed94</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>sv-SE</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>Visa dina e-brev som fullständiga trådar eller grupperade och med trådsammanfattningar, precis som hos Gmail.</em:description>
- <em:translator>Mikael Hiort af Ornäs</em:translator>
- <em:creator>Jonathan Protzenko</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- <em:localized>
- <Description>
- <em:locale>zh-CN</em:locale>
- <em:name>Thunderbird Conversations</em:name>
- <em:description>按邮件话题集中显示相关邮件(包括你自己发出的邮件), 同Gmail目前的邮件显示方式一致</em:description>
- <em:translator>Wellown</em:translator>
- <em:creator>夏若朗 (Jonathan Protzenko)</em:creator>
- <em:homepageURL>http://github.com/protz/GMail-Conversation-View/wiki</em:homepageURL>
- </Description>
- </em:localized>
-
- </Description>
-
-</RDF>
View
@@ -2,36 +2,11 @@
BRANCH=`git branch | egrep "\\* (.*)" | cut -c 3-`
DATE=`date +%Y%m%d%H%M`
TARGET_FILENAME="$DATE-$BRANCH.xpi"
-GNUFILE=/Users/protz/bin/switchtognuutils
-
-if [ -f "$GNUFILE" ]; then
- . "$GNUFILE";
-fi;
-
-template() {
- sed s/__REPLACEME__/$1/ install.rdf.template > install.rdf
-}
upload() {
echo "cd jonathan/files\nput conversations.xpi gcv-nightlies/$TARGET_FILENAME" | ftp xulforum@ftp.xulforum.org
}
-if [ -f "content/pdfjs/build/pdf.js" ]; then
- true;
-else
- echo "Please run make from content/pdfjs";
- exit 0
-fi
-
-if [ "$1" = "official" ]; then
- template "";
- ./build.sh
- upload;
-else
- template ."$DATE"pre;
- ./build.sh
- if [ "$1" != "build" ]; then
- upload;
- rm -f conversations.xpi;
- fi;
-fi
+./build.sh
+upload;
+rm -f conversations.xpi;

0 comments on commit b051815

Please sign in to comment.