new scheme for different platforms

This commit is contained in:
Mario Colque 2014-05-27 17:57:44 -03:00
commit 82cd5a8ebc
12 changed files with 253 additions and 104 deletions

65
webapp/build.sh Normal file
View file

@ -0,0 +1,65 @@
#! /bin/bash
# Description: This script compiles and copy the needed for the web application
OpenColor="\033["
Red="1;31m"
Yellow="1;33m"
Green="1;32m"
CloseColor="\033[0m"
# Check function OK
checkOK() {
if [ $? != 0 ]; then
echo "${OpenColor}${Red}* ERROR. Exiting...${CloseColor}"
exit 1
fi
}
# Configs
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APPDIR="$BUILDDIR/webapp"
ZIPFILE="copay.zip"
VERSION=`git describe --tags --abbrev=0 | cut -c 2-`
DOWNLOADDIR="$APPDIR/download"
CHROMEDOWNLOADDIR="$DOWNLOADDIR/chrome"
FIREFOXDOWNLOADDIR="$DOWNLOADDIR/firefox"
ZIPFILE="copay.zip"
# Move to the build directory
cd $BUILDDIR
# Create/Clean temp dir
echo "${OpenColor}${Green}* Checking temp dir...${CloseColor}"
if [ -d $APPDIR ]; then
rm -rf $APPDIR
fi
mkdir -p $APPDIR
# Re-compile copayBundle.js
echo "${OpenColor}${Green}* Generating copay bundle...${CloseColor}"
grunt --target=dev shell
checkOK
# Copy all chrome-extension files
echo "${OpenColor}${Green}* Copying all chrome-extension files...${CloseColor}"
cd $BUILDDIR/..
cp -af {css,font,img,js,lib,sound,config.js,version.js,index.html} $APPDIR
checkOK
# Zipping chrome-extension
echo "${OpenColor}${Green}* Zipping all webapp files...${CloseColor}"
cd $BUILDDIR
zip -r $ZIPFILE "`basename $APPDIR`"
checkOK
mkdir -p $CHROMEDOWNLOADDIR
mkdir -p $FIREFOXDOWNLOADDIR
mv $ZIPFILE $DOWNLOADDIR
cp "$BUILDDIR/index-download-chrome.html" $CHROMEDOWNLOADDIR/index.html
cp "$BUILDDIR/index-download-firefox.html" $FIREFOXDOWNLOADDIR/index.html
echo "${OpenColor}${Yellow}\nAwesome! We have a brand new Webapp, enjoy it!${CloseColor}"

View file

@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Copay Chrome Extension - Install</title>
<link rel="stylesheet" href="../../css/foundation.min.css">
</head>
<body>
<div class="row">
<h1>Copay Chrome Installation:</h1>
<ul>
<li>Download <a href="copay-chrome-extension.zip">ZIP</a></li>
<li>Unpack the ZIP file</li>
<li>Navigate to "chrome://extensions" in your browser</li>
<li>Enable Developer Mode</li>
<li>Click "Load unpacked extension" and select the unzipped folder</li>
<li>Copay is installed!</li>
</ul>
</div>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Copay Firefox Addon - Install</title>
<link rel="stylesheet" href="../../css/foundation.min.css">
</head>
<body>
<div class="row">
<h1>Copay Firefox Installation:</h1>
<ul>
<li>Download <a href="copay-firefox-addon.xpi">XPI</a></li>
<li>Copay is installed!</li>
</ul>
</div>
</body>
</html>