       return done()
 
   async.series [
+    # First, compress the source files into an asar archive
+    async.apply asar.createPackage, './build/win32/resources/app', './build/win32/resources/app.asar'
+
+    # Remove leftovers
+    async.apply del, './build/win32/resources/app'
+
     # Sign the exe
     (callback) ->
       cp.exec [
         if process.env.SIGNTOOL_PATH then '"' + process.env.SIGNTOOL_PATH + '"' else 'signtool'
-        '/f "' + process.env.SIGN_WIN_CERTIFICATE_FILE + '"'
-        '/p "' + process.env.SIGN_WIN_CERTIFICATE_PASSWORD + '"'
-        '"./build/win32/' + manifest.productName + '.exe"'
+        'sign'
+        '/f ' + process.env.SIGN_WIN_CERTIFICATE_FILE
+        '/p ' + process.env.SIGN_WIN_CERTIFICATE_PASSWORD
+        path.win32.resolve './build/win32/' + manifest.productName + '.exe'
       ].join(' '), callback
 
     # Archive the files
     (callback) ->
-      gulp.src './build/win32'
+      gulp.src './build/win32/**/*'
         .pipe zip manifest.name + '-win32-portable.zip'
         .pipe gulp.dest './dist'
         .on 'end', callback

cp = require 'child_process'
async = require 'async'
asar = require 'asar'
del = require 'del'

gulp = require 'gulp'

        '.'
      ]

      async.series [
        # First, compress the source files into an asar archive
        async.apply asar.createPackage,
          './build/linux' + arch + '/opt/' + manifest.name + '/resources/app',
          './build/linux' + arch + '/opt/' + manifest.name + '/resources/app.asar'

        # Remove leftovers
        async.apply del, './build/linux' + arch + '/opt/' + manifest.name + '/resources/app'

        # Package the app
        async.apply cp.exec, 'fpm ' + args.join(' ')
      ], done

# Create the win32 installer; only works on Windows
gulp.task 'pack:win32:installer', ['build:win32', 'clean:dist:win32'], (done) ->
  if process.platform isnt 'win32'
    return console.warn 'Skipping win32 installer packing; This only works on Windows due to Squirrel.Windows.'

