added a buildForWindows script

This commit is contained in:
Peter 'Pita' Martischka 2011-08-11 22:00:52 +01:00
parent 38801fa3b2
commit 53cdd893af
5 changed files with 118 additions and 2 deletions

5
.gitignore vendored
View File

@ -1,3 +1,6 @@
node_modules
settings.json
static/js/jquery.min.js
static/js/jquery.min.js
bin/abiword.exe
bin/node.exe
etherpad-lite-win.zip

73
bin/buildForWindows.sh Executable file
View File

@ -0,0 +1,73 @@
#!/bin/sh
NODE_VERSION="0.5.3"
#Move to the folder where ep-lite is installed
cd `dirname $0`
#Was this script started in the bin folder? if yes move out
if [ -d "../bin" ]; then
cd "../"
fi
#Is wget installed?
hash wget > /dev/null 2>&1 || {
echo "Please install wget" >&2
exit 1
}
#Is zip installed?
hash zip > /dev/null 2>&1 || {
echo "Please install zip" >&2
exit 1
}
#Is zip installed?
hash unzip > /dev/null 2>&1 || {
echo "Please install unzip" >&2
exit 1
}
START_FOLDER=$(pwd);
echo "create a clean enviroment in /tmp/etherpad-lite-win..."
rm -rf /tmp/etherpad-lite-win
cp -ar . /tmp/etherpad-lite-win
cd /tmp/etherpad-lite-win
rm -rf node_modules
rm -f etherpad-lite-win.zip
echo "do a normal unix install first..."
bin/installDeps.sh || exit 1
echo "copy the windows settings template..."
cp settings.json.template_windows settings.json
echo "resolve symbolic links..."
cp -rL node_modules node_modules_resolved
rm -rf node_modules
mv node_modules_resolved node_modules
echo "remove sqlite, cause we can't use it with windows..."
rm -rf node_modules/ueberDB/node_modules/sqlite3
echo "replace log4js with a patched log4js, this log4js runs on windows too..."
rm -rf node_modules/log4js/*
wget https://github.com/Pita/log4js-node/zipball/master -O log4js.zip
unzip log4js.zip
mv Pita-log4js-node*/* node_modules/log4js
rm -rf log4js.zip Pita-log4js-node*
echo "download windows node..."
cd bin
wget "http://nodejs.org/dist/v$NODE_VERSION/node.exe" -O node.exe
echo "create the zip..."
cd /tmp
zip -9 -r etherpad-lite-win.zip etherpad-lite-win
mv etherpad-lite-win.zip $START_FOLDER
echo "clean up..."
rm -rf /tmp/etherpad-lite-win
echo "finished. You can find the zip in the etherpad lite root folder, its called etherpad-lite-win.zip"

View File

@ -11,7 +11,7 @@
],
"dependencies" : {
"socket.io" : "0.7.8",
"ueberDB" : "0.0.14",
"ueberDB" : "0.0.15",
"async" : "0.1.9",
"joose" : "3.18.0",
"express" : "2.4.4",

View File

@ -0,0 +1,38 @@
/*
This file must be valid JSON. But comments are allowed
Please edit settings.json, not settings.json.template
*/
{
//Ip and port which etherpad should bind at
"ip": "0.0.0.0",
"port" : 9001,
//The Type of the database. You can choose between sqlite and mysql
"dbType" : "dirty",
//the database specific settings
"dbSettings" : {
"filename" : "../var/dirty.db"
},
/* An Example of MySQL Configuration
"dbType" : "mysql",
"dbSettings" : {
"user" : "root",
"host" : "localhost",
"password": "",
"database": "store"
},
*/
//the default text of a pad
"defaultPadText" : "Welcome to Etherpad Lite!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nEtherpad Lite on Github: http:\/\/j.mp/ep-lite\n",
/* if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly,
but makes it impossible to debug the javascript/css */
"minify" : false,
/* This is the path to the Abiword executable. Setting it to null, disables abiword.
Abiword is needed to enable the import/export of pads*/
"abiword" : null
}

2
start.bat Normal file
View File

@ -0,0 +1,2 @@
cd node
..\bin\node server.js