2012-06-28 13:58:39 +00:00
@ echo off
: : change directory to etherpad-lite root
2012-08-01 13:51:14 +00:00
cd /D " %~dp0 \.. "
2012-06-28 13:58:39 +00:00
2012-08-01 21:37:39 +00:00
: : Is node installed?
cmd /C node -e " " || ( echo " Please install node.js ( http://nodejs.org ) " && exit /B 1 )
echo _
2012-08-01 13:51:14 +00:00
echo Checking node version...
2013-04-01 12:07:38 +00:00
set check_version = " if(['8','10'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.8.x or v0.10.x'); process.exit(1) } "
2012-08-01 13:51:14 +00:00
cmd /C node -e %check_version% || exit /B 1
2012-06-28 13:58:39 +00:00
echo _
2013-02-10 15:19:28 +00:00
echo Ensure that all dependencies are up to date... If this is the first time you have run Etherpad please be patient.
2012-11-19 14:24:48 +00:00
cmd /C npm install src/ --loglevel warn || exit /B 1
2012-06-28 13:58:39 +00:00
echo _
2012-06-29 10:41:50 +00:00
echo Copying custom templates...
set custom_dir = node_modules\ep_etherpad-lite\static\custom
FOR %% f IN ( index pad timeslider) DO (
2012-06-30 18:20:05 +00:00
if NOT EXIST " %custom_dir% \ %% f.js " copy " %custom_dir% \js.template " " %custom_dir% \ %% f.js "
if NOT EXIST " %custom_dir% \ %% f.css " copy " %custom_dir% \css.template " " %custom_dir% \ %% f.css "
2012-06-29 10:41:50 +00:00
)
echo _
2012-08-01 13:51:14 +00:00
echo Clearing cache...
2012-06-29 10:41:50 +00:00
del /S var\minified*
echo _
echo Setting up settings.json...
2012-08-01 13:51:14 +00:00
IF NOT EXIST settings.json (
echo Can't find settings.json.
echo Copying settings.json.template...
cmd /C copy settings.json.template settings.json || exit /B 1
)
2012-06-28 13:58:39 +00:00
echo _
2013-02-10 15:19:28 +00:00
echo Installed Etherpad! To run Etherpad type start.bat