Merge pull request #914 from marcelklehr/feature/simplify-windows-install

Simplify windows install
This commit is contained in:
John McLear 2012-08-12 09:10:01 -07:00
commit ec130e91c0
3 changed files with 17 additions and 16 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
NODE_VERSION="0.6.5"
NODE_VERSION="0.8.4"
#Move to the folder where ep-lite is installed
cd `dirname $0`
@ -50,7 +50,7 @@ mv node_modules_resolved node_modules
echo "download windows node..."
cd bin
wget "http://nodejs.org/dist/v$NODE_VERSION/node.exe" -O node.exe
wget "http://nodejs.org/dist/v$NODE_VERSION/node.exe" -O ../node.exe
echo "create the zip..."
cd /tmp

View File

@ -1,22 +1,19 @@
@echo off
set NODE_VERSION=0.8.1
set JQUERY_VERSION=1.7
:: change directory to etherpad-lite root
cd bin
cd ..
cd /D "%~dp0\.."
:: Is node installed?
cmd /C node -e "" || ( echo "Please install node.js ( http://nodejs.org )" && exit /B 1 )
echo _
echo Updating node...
curl -lo bin\node.exe http://nodejs.org/dist/v%NODE_VERSION%/node.exe
echo Checking node version...
set check_version="if(['6','8'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x or v0.8.x'); process.exit(1) }"
cmd /C node -e %check_version% || exit /B 1
echo _
echo Installing etherpad-lite and dependencies...
cmd /C npm install src/
echo _
echo Updating jquery...
curl -lo "node_modules\ep_etherpad-lite\static\js\jquery.min.js" "http://code.jquery.com/jquery-%JQUERY_VERSION%.min.js"
cmd /C npm install src/ || exit /B 1
echo _
echo Copying custom templates...
@ -27,12 +24,16 @@ FOR %%f IN (index pad timeslider) DO (
)
echo _
echo Clearing cache.
echo Clearing cache...
del /S var\minified*
echo _
echo Setting up settings.json...
IF NOT EXIST settings.json copy settings.json.template settings.json
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
)
echo _
echo Installed Etherpad-lite!

View File

@ -1 +1 @@
bin\node.exe node_modules\ep_etherpad-lite\node\server.js
node node_modules\ep_etherpad-lite\node\server.js