ryzen-controller/installers/windows/createinstaller.js

59 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-02-28 19:42:22 +07:00
const createWindowsInstaller = require('electron-winstaller').createWindowsInstaller
const path = require('path')
2019-08-04 03:30:35 +07:00
const lyrics = [
"I'm awake",
"I'm alive",
"now",
"I know",
"what I",
"believe inside",
"NOW",
"It's my time",
"I'll do",
"what I want",
"'cause this",
"is my life",
"Here",
"right now",
"I will",
"stand my ground",
"and never back down",
"I know",
"what I",
"believe inside",
"I'm awake",
"and",
"I'm alive",
"--",
];
var lyrics_pos = -1;
2019-07-05 17:53:00 +07:00
var keepAlive = false;
2019-02-28 19:42:22 +07:00
getInstallerConfig()
.then(createWindowsInstaller)
.catch((error) => {
console.error(error.message || error)
process.exit(1)
})
2019-07-05 17:53:00 +07:00
.then(function(){
clearInterval(keepAlive);
console.log('Installer created.');
})
2019-02-28 19:42:22 +07:00
function getInstallerConfig () {
console.log('creating windows installer')
2019-07-05 17:53:00 +07:00
keepAlive = setInterval(function(){
2019-08-04 03:30:35 +07:00
lyrics_pos++;
console.log(`${lyrics[ lyrics_pos % lyrics.length ]}`);
2019-07-05 17:53:00 +07:00
}, 10000);
2019-02-28 19:42:22 +07:00
const rootPath = path.join('./')
return Promise.resolve({
2019-02-28 19:52:24 +07:00
appDirectory: path.join(rootPath, 'release-builds', 'RyzenController-win32-ia32/'),
2019-02-28 19:42:22 +07:00
authors: 'Decaunes Quentin',
outputDirectory: path.join(rootPath, 'installer-builds'),
setupExe: 'RyzenControllerInstaller.exe',
noMsi: true
})
}