Commits

Maurice Butler  committed 9c71e4f

added 7zip for windows support

  • Participants
  • Parent commits 6998b84

Comments (0)

Files changed (5)

File lib/7zip/7-zip.chm

Binary file added.

File lib/7zip/7za.exe

Binary file added.

File lib/7zip/license.txt

+      7-Zip Command line version
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~
+      License for use and distribution
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+      7-Zip Copyright (C) 1999-2010 Igor Pavlov.
+
+      7za.exe is distributed under the GNU LGPL license
+
+      Notes: 
+        You can use 7-Zip on any computer, including a computer in a commercial 
+        organization. You don't need to register or pay for 7-Zip.
+
+
+      GNU LGPL information
+      --------------------
+
+        This library is free software; you can redistribute it and/or
+        modify it under the terms of the GNU Lesser General Public
+        License as published by the Free Software Foundation; either
+        version 2.1 of the License, or (at your option) any later version.
+
+        This library is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+        Lesser General Public License for more details.
+
+        You can receive a copy of the GNU Lesser General Public License from 
+        http://www.gnu.org/

File lib/7zip/readme.txt

+7-Zip Command line version 9.20
+-------------------------------
+
+7-Zip is a file archiver with high compression ratio.
+7za.exe is a standalone command line version of 7-Zip.
+
+7-Zip Copyright (C) 1999-2010 Igor Pavlov.
+
+Features of 7za.exe: 
+  - High compression ratio in new 7z format
+  - Supported formats:
+      - Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR 
+      - Unpacking only: Z, lzma
+  - Highest compression ratio for ZIP and GZIP formats.
+  - Fast compression and decompression
+  - Strong AES-256 encryption in 7z and ZIP formats.
+
+7za.exe is a free software distributed under the GNU LGPL.
+Read license.txt for more information.
+
+Source code of 7za.exe and 7-Zip can be found at
+http://www.7-zip.org/
+
+7za.exe can work in Windows 95/98/ME/NT/2000/2003/2008/XP/Vista/7.
+
+There is also port of 7za.exe for POSIX systems like Unix (Linux, Solaris, OpenBSD, 
+FreeBSD, Cygwin, AIX, ...), MacOS X and BeOS:
+
+http://p7zip.sourceforge.net/
+
+
+  This distributive packet contains the following files:
+
+  7za.exe       - 7-Zip standalone command line version.
+  readme.txt    - This file.
+  license.txt   - License information.
+  7-zip.chm     - User's Manual in HTML Help format.
+
+
+---
+End of document

File lib/tasks.js

         return filename.slice(basePath.length + 1);
     });
 
-    proc = spawn('zip', args.concat(relativeFiles), {
-        cwd: path.resolve(targetPath)
-    });
+    if(process.platform === 'win32'){
+        proc = spawn(path.join(__dirname, '7zip/7za.exe'), ['a'].concat(args, relativeFiles), {
+            cwd: path.resolve(targetPath)
+        });
+    } else {
+        proc = spawn('zip', args.concat(relativeFiles), {
+            cwd: path.resolve(targetPath)
+        });
+    }
 
     proc.stdout.on('data', function(buffer) {
         console.log(buffer.toString());
         out('!{bold}zip completed with exit code: ' + code);
         done();
     });
+    proc.on('error', function(error) {
+        console.log(error);
+        done();
+    });
 
     out('!{bold}creating archive');
 });
 
 task('deploy', ['prepare'], function(targetPath, opts) {
     var cfg = this.context.results.loadConfig,
-        barFile = path.resolve(targetPath, 'output', 'device', cfg.projectName + '.bar')
+        barFile = path.resolve(targetPath, 'output', 'device', cfg.projectName + '.bar');
 
     out('!{bold}pushing to the device');
     blackberryDeploy(this, targetPath, opts, ['-installApp'], [barFile]);