|
|
@ -1,11 +1,11 @@ |
|
|
|
var path = require('path') |
|
|
|
var fs = require('fs') |
|
|
|
var ecstatic = require('ecstatic') |
|
|
|
const express = require('express') |
|
|
|
const app = express() |
|
|
|
var tar = require('tar') |
|
|
|
var path = require('path') |
|
|
|
var fs = require('fs') |
|
|
|
var ecstatic = require('ecstatic') |
|
|
|
const express = require('express') |
|
|
|
const app = express() |
|
|
|
var tar = require('tar') |
|
|
|
const archiver = require('archiver'); |
|
|
|
var skqlib = require('./skq_modules/skq-lib') |
|
|
|
var skqlib = require('./skq_modules/skq-lib') |
|
|
|
|
|
|
|
// GLOBAL CONFIG
|
|
|
|
process['CONFIG'] = JSON.parse(fs.readFileSync(path.join(__dirname, 'config','skqitam-server-config.json'), 'utf8')) |
|
|
@ -54,25 +54,30 @@ try { |
|
|
|
try { |
|
|
|
fs.copyFileSync(path.join(__dirname, 'nodejs', 'node-v8.17.0-win-x64.zip'), path.join(__dirname, 'download', 'win7-x64-installer', 'node-v8.17.0-win-x64.zip')) |
|
|
|
|
|
|
|
|
|
|
|
const w7x64_ziparch = fs.createWriteStream(path.join(__dirname, 'download', 'skqitam-client-win7x6-installer.zip')) |
|
|
|
const w7x64_archive = archiver('zip', { |
|
|
|
zlib: { level: 9 } // Sets the compression level.
|
|
|
|
}) |
|
|
|
|
|
|
|
w7x64_archive.on('warning', function(err) { |
|
|
|
if (err.code === 'ENOENT') { |
|
|
|
// log warning
|
|
|
|
} else { |
|
|
|
// throw error
|
|
|
|
throw err; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
w7x64_archive.pipe(w7x64_ziparch) |
|
|
|
w7x64_archive.directory(path.join('download', 'win7-x64-installer'), 'win7-x64-installer'); |
|
|
|
w7x64_archive.finalize() |
|
|
|
|
|
|
|
try { |
|
|
|
fs.copyFileSync(path.join(__dirname, 'download', 'skqitam-setup-win7.ps1'), path.join(__dirname, 'download', 'win7-x64-installer', 'skqitam-setup-win7.ps1')) |
|
|
|
|
|
|
|
const w7x64_ziparch = fs.createWriteStream(path.join(__dirname, 'download', 'skqitam-client-win7-installer.zip')) |
|
|
|
const w7x64_archive = archiver('zip', { |
|
|
|
zlib: { level: 9 } // Sets the compression level.
|
|
|
|
}) |
|
|
|
|
|
|
|
w7x64_archive.on('warning', function(err) { |
|
|
|
if (err.code === 'ENOENT') { |
|
|
|
// log warning
|
|
|
|
} else { |
|
|
|
// throw error
|
|
|
|
throw err; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
w7x64_archive.pipe(w7x64_ziparch) |
|
|
|
w7x64_archive.directory(path.join('download', 'win7-x64-installer'), 'win7-x64-installer'); |
|
|
|
w7x64_archive.finalize() |
|
|
|
} catch (e) { |
|
|
|
console.log ('ERROR: Could not copy: '+ path.join(__dirname, 'download', 'skqitam-setup-win7.ps1')) |
|
|
|
process.exit(1) |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
console.log ('ERROR: Could not copy: '+ path.join(__dirname, 'nodejs', 'node-v8.17.0-win-x64.zip')) |
|
|
|
process.exit(1) |
|
|
|