Skip to content
Browse files

First shot

  • Loading branch information...
0 parents commit 0b7ecd5103679779cbf70da8493f9717e1c881b8 @piscisaureus committed Aug 3, 2010
Showing with 163 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +129 −0 cygwin-package.sh
  3. +10 −0 resource/bash.cmd
  4. +1 −0 resource/etc/resolv.conf
  5. BIN resource/etc/terminfo/c/cygwin
  6. +21 −0 resource/node.cmd
2 .gitignore
@@ -0,0 +1,2 @@
+tmp/
+/*.zip
129 cygwin-package.sh
@@ -0,0 +1,129 @@
+#!/bin/sh
+
+# path to this script
+SCRIPT_DIR=`cd \`dirname \$0\`; pwd`
+
+# path to resource files that aren't part of cygwin or node (e.g. resolv.conf)
+RESOURCE_DIR=${SCRIPT_DIR}/resource
+
+# temporary directory where files will be gathered before being compressed
+TEMP_DIR=${SCRIPT_DIR}/tmp
+
+# path to the node directory root
+NODE_DIR=`cd "\`git rev-parse --git-dir\`/.."; pwd`
+
+# name and path for the compiled zip package (without extensions)
+PACKAGE_NAME=`pwd`/nodejs-`git describe`-cygwin
+
+# build node
+cd "${NODE_DIR}"
+#./configure
+#make
+
+# folder struction
+mkdir -p \
+ "${TEMP_DIR}" \
+ "${TEMP_DIR}/bin" \
+ "${TEMP_DIR}/etc" \
+ "${TEMP_DIR}/etc/terminfo/c" \
+ "${TEMP_DIR}/home" \
+ "${TEMP_DIR}/node" \
+ "${TEMP_DIR}/node/bin" \
+ "${TEMP_DIR}/node/doc" \
+ "${TEMP_DIR}/node/lib" \
+ "${TEMP_DIR}/tmp" \
+ "${TEMP_DIR}/usr"
+
+# helper command shell scripts
+cd "${RESOURCE_DIR}"
+cp -L --target-directory="${TEMP_DIR}" \
+ bash.cmd \
+ node.cmd
+
+# config files
+cp -Lr "${RESOURCE_DIR}/etc"/* "${TEMP_DIR}/etc"
+
+# node binaries
+cp -L "${NODE_DIR}/node" "${TEMP_DIR}/node/bin/node.exe"
+cp -Lr "${NODE_DIR}/bin"/* "${TEMP_DIR}/node/bin"
+
+# node library and symbols
+cp -L "${NODE_DIR}/build/default/"libnode* "${TEMP_DIR}/node/lib"
+
+# node documentation
+cp -Lr "${NODE_DIR}/doc/"* "${TEMP_DIR}/node/doc"
+
+# cygwin binary utils
+cd /bin
+cp -L --target-directory="${TEMP_DIR}/bin" \
+ bash.exe \
+ cat.exe \
+ chgrp.exe \
+ chmod.exe \
+ chown.exe \
+ cp.exe \
+ cygcheck.exe \
+ cygpath.exe \
+ cygrunsrv.exe \
+ d2u.exe \
+ date.exe \
+ diff.exe \
+ false.exe \
+ grep.exe \
+ groups \
+ gzip.exe \
+ id.exe \
+ less.exe \
+ ln.exe \
+ ls.exe \
+ mkdir.exe \
+ mkgroup.exe \
+ mkpasswd.exe \
+ mount.exe \
+ mv.exe \
+ nano.exe \
+ printenv.exe \
+ ps.exe \
+ pwd.exe \
+ rm.exe \
+ sed.exe \
+ sort.exe \
+ tail.exe \
+ tar.exe \
+ touch.exe \
+ umount.exe \
+ wc.exe
+
+# cygwin shared libraries
+cd /bin
+cp -L --target-directory="${TEMP_DIR}/bin" \
+ cygcrypt-0.dll \
+ cygcrypto-0.9.8.dll \
+ cyggcc_s-1.dll \
+ cygiconv-2.dll \
+ cygintl-1.dll \
+ cygintl-2.dll \
+ cygintl-3.dll \
+ cygintl-8.dll \
+ cygminires.dll \
+ cygncurses-8.dll \
+ cygncurses-9.dll \
+ cygncurses-10.dll \
+ cygpcre.dll \
+ cygpcre-0.dll \
+ cygpopt-0.dll \
+ cygreadline7.dll \
+ cygssl-0.9.8.dll \
+ cygssp-0.dll \
+ cygstdc++-6.dll \
+ cygwin1.dll \
+ cygwrap-0.dll \
+ cygz.dll
+
+# create zip archive
+cd "${TEMP_DIR}"
+rm -f "${PACKAGE_NAME}.zip"
+zip -r9q "${PACKAGE_NAME}.zip" .
+
+# drop temp dir
+rm -rf "${TEMP_DIR}"
10 resource/bash.cmd
@@ -0,0 +1,10 @@
+@echo off
+
+setlocal
+
+set p=%~dp0
+set path=%p%bin;%p%node\bin;%path%
+
+"%p%bin\bash.exe" --login -i
+
+pause
1 resource/etc/resolv.conf
@@ -0,0 +1 @@
+nameserver 8.8.8.8
BIN resource/etc/terminfo/c/cygwin
Binary file not shown.
21 resource/node.cmd
@@ -0,0 +1,21 @@
+@echo off
+setlocal
+
+set p=%~dp0
+set s=%~f1
+set path=%p%bin\;%path%
+
+if not "%s%"=="" goto :script
+"%p%node\bin\node.exe"
+goto :end
+
+:script
+for /f "delims=:" %%i in ('cygpath "%s%"') do "%p%node\bin\node.exe" "%%i"
+goto :end
+
+:end
+echo.
+echo node has exited.
+pause
+
+endlocal

0 comments on commit 0b7ecd5

Please sign in to comment.
Something went wrong with that request. Please try again.