mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
Merge pull request #822 from marcelklehr/fix-windows-install
Fix windows install
This commit is contained in:
commit
f891534258
2 changed files with 50 additions and 3 deletions
35
bin/installOnWindows.bat
Normal file
35
bin/installOnWindows.bat
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
@echo off
|
||||||
|
set NODE_VERSION=0.6.5
|
||||||
|
set JQUERY_VERSION=1.7
|
||||||
|
|
||||||
|
:: change directory to etherpad-lite root
|
||||||
|
cd bin
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo _
|
||||||
|
echo Setting up settings.json...
|
||||||
|
copy settings.json.template_windows settings.json
|
||||||
|
|
||||||
|
echo _
|
||||||
|
echo Updating node...
|
||||||
|
curl -lo bin\node.exe http://nodejs.org/dist/v%NODE_VERSION%/node.exe
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
echo _
|
||||||
|
echo Some other stuff...
|
||||||
|
copy node_modules\ep_etherpad-lite\static\custom\js.template node_modules\ep_etherpad-lite\static\custom\index.template
|
||||||
|
copy node_modules\ep_etherpad-lite\static\custom\js.template node_modules\ep_etherpad-lite\static\custom\pad.template
|
||||||
|
copy node_modules\ep_etherpad-lite\static\custom\js.template node_modules\ep_etherpad-lite\static\custom\timeslider.template
|
||||||
|
copy node_modules\ep_etherpad-lite\static\custom\css.template node_modules\ep_etherpad-lite\static\custom\index.template
|
||||||
|
copy node_modules\ep_etherpad-lite\static\custom\css.template node_modules\ep_etherpad-lite\static\custom\pad.template
|
||||||
|
copy node_modules\ep_etherpad-lite\static\custom\css.template node_modules\ep_etherpad-lite\static\custom\timeslider.template
|
||||||
|
|
||||||
|
echo _
|
||||||
|
echo Installed Etherpad-lite!
|
|
@ -54,9 +54,21 @@ exports.formatHooks = function (hook_set_name) {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.loadFn = function (path, hookName) {
|
exports.loadFn = function (path, hookName) {
|
||||||
var x = path.split(":");
|
var functionName
|
||||||
var fn = require(x[0]);
|
, parts = path.split(":");
|
||||||
var functionName = x[1] ? x[1] : hookName;
|
|
||||||
|
// on windows
|
||||||
|
if(process.platform == 'win32') {
|
||||||
|
if(parts.length == 3)
|
||||||
|
functionName = parts.pop();
|
||||||
|
path = parts.join(":");
|
||||||
|
}else{
|
||||||
|
path = parts[0];
|
||||||
|
functionName = parts[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
var fn = require(path);
|
||||||
|
functionName = functionName ? functionName : hookName;
|
||||||
|
|
||||||
_.each(functionName.split("."), function (name) {
|
_.each(functionName.split("."), function (name) {
|
||||||
fn = fn[name];
|
fn = fn[name];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue