From bd2372def16940d6578b92a5d7accefd65ea5fb9 Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 14 Mar 2016 21:56:02 +0100 Subject: [PATCH 1/2] Update windows build: - Update node to version 4.4.0 - Create temp folder dynamically --- bin/buildForWindows.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh index a508cc228..57b6e5b5e 100755 --- a/bin/buildForWindows.sh +++ b/bin/buildForWindows.sh @@ -1,6 +1,6 @@ #!/bin/sh -NODE_VERSION="0.12.2" +NODE_VERSION="4.4.0" #Move to the folder where ep-lite is installed cd `dirname $0` @@ -29,11 +29,11 @@ hash unzip > /dev/null 2>&1 || { } START_FOLDER=$(pwd); +TMP_FOLDER=$(mktemp -d) -echo "create a clean environment in /tmp/etherpad-lite-win..." -rm -rf /tmp/etherpad-lite-win -cp -ar . /tmp/etherpad-lite-win -cd /tmp/etherpad-lite-win +echo "create a clean environment in $TMP_FOLDER..." +cp -ar . $TMP_FOLDER +cd $TMP_FOLDER rm -rf node_modules rm -f etherpad-lite-win.zip @@ -50,21 +50,20 @@ 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 "https://nodejs.org/dist/v$NODE_VERSION/win-x86/node.exe" -O ../node.exe echo "remove git history to reduce folder size" rm -rf .git/objects echo "remove windows jsdom-nocontextify/test folder" -rm -rf /tmp/etherpad-lite-win/src/node_modules/wd/node_modules/request/node_modules/form-data/node_modules/combined-stream/test -rm -rf /tmp/etherpad-lite-win/src/node_modules/nodemailer/node_modules/mailcomposer/node_modules/mimelib/node_modules/encoding/node_modules/iconv-lite/encodings/tables +rm -rf $TMP_FOLDER/src/node_modules/wd/node_modules/request/node_modules/form-data/node_modules/combined-stream/test +rm -rf $TMP_FOLDER/src/node_modules/nodemailer/node_modules/mailcomposer/node_modules/mimelib/node_modules/encoding/node_modules/iconv-lite/encodings/tables echo "create the zip..." cd /tmp -zip -9 -r etherpad-lite-win.zip etherpad-lite-win -mv etherpad-lite-win.zip $START_FOLDER +zip -9 -r $START_FOLDER/etherpad-lite-win.zip $TMP_FOLDER echo "clean up..." -rm -rf /tmp/etherpad-lite-win +rm -rf $TMP_FOLDER echo "Finished. You can find the zip in the Etherpad root folder, it's called etherpad-lite-win.zip" From 3738211fd821719091a98a35c0d660ff2f33f1bf Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 20 Mar 2016 14:13:26 +0100 Subject: [PATCH 2/2] Do not include absolute path in windows zip --- bin/buildForWindows.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/buildForWindows.sh b/bin/buildForWindows.sh index 57b6e5b5e..1ee080d16 100755 --- a/bin/buildForWindows.sh +++ b/bin/buildForWindows.sh @@ -60,8 +60,8 @@ rm -rf $TMP_FOLDER/src/node_modules/wd/node_modules/request/node_modules/form-da rm -rf $TMP_FOLDER/src/node_modules/nodemailer/node_modules/mailcomposer/node_modules/mimelib/node_modules/encoding/node_modules/iconv-lite/encodings/tables echo "create the zip..." -cd /tmp -zip -9 -r $START_FOLDER/etherpad-lite-win.zip $TMP_FOLDER +cd $TMP_FOLDER +zip -9 -r $START_FOLDER/etherpad-lite-win.zip ./* echo "clean up..." rm -rf $TMP_FOLDER