2016-07-17 13:30:38 +02:00
|
|
|
/* eslint-env node */
|
|
|
|
|
2017-01-31 07:50:28 +01:00
|
|
|
const fs = require('fs');
|
2019-08-16 18:45:11 +02:00
|
|
|
const path = require('path');
|
2019-01-06 11:44:10 +01:00
|
|
|
|
2019-09-16 18:18:51 +02:00
|
|
|
const webpackConfig = require('./build/webpack.config');
|
2019-01-06 13:09:45 +01:00
|
|
|
const pkg = require('./package.json');
|
2019-10-09 22:54:32 +02:00
|
|
|
const hookRcedit = require('./build/util/hook-rcedit');
|
|
|
|
|
|
|
|
hookRcedit.setup();
|
2015-10-17 23:49:24 +02:00
|
|
|
|
|
|
|
module.exports = function(grunt) {
|
|
|
|
require('time-grunt')(grunt);
|
|
|
|
require('load-grunt-tasks')(grunt);
|
|
|
|
|
2019-01-06 13:09:45 +01:00
|
|
|
grunt.loadTasks('build/tasks');
|
|
|
|
|
2019-01-06 14:33:27 +01:00
|
|
|
require('./grunt.tasks')(grunt);
|
|
|
|
require('./grunt.entrypoints')(grunt);
|
|
|
|
|
2019-01-06 13:09:45 +01:00
|
|
|
const date = new Date();
|
2019-01-06 15:51:45 +01:00
|
|
|
grunt.config.set('date', date);
|
|
|
|
|
2019-01-06 13:09:45 +01:00
|
|
|
const dt = date.toISOString().replace(/T.*/, '');
|
|
|
|
const year = date.getFullYear();
|
2019-08-18 08:19:39 +02:00
|
|
|
const minElectronVersionForUpdate = '6.0.2';
|
2017-02-04 17:30:39 +01:00
|
|
|
const zipCommentPlaceholderPart = 'zip_comment_placeholder_that_will_be_replaced_with_hash';
|
2019-08-18 08:05:38 +02:00
|
|
|
const zipCommentPlaceholder =
|
|
|
|
zipCommentPlaceholderPart + '.'.repeat(512 - zipCommentPlaceholderPart.length);
|
2019-01-06 13:09:45 +01:00
|
|
|
const electronVersion = pkg.dependencies.electron.replace(/^\D/, '');
|
2018-12-28 08:15:37 +01:00
|
|
|
|
2015-10-17 23:49:24 +02:00
|
|
|
grunt.initConfig({
|
2015-11-07 08:55:45 +01:00
|
|
|
gitinfo: {
|
|
|
|
branch: {
|
|
|
|
current: {
|
|
|
|
SHA: 'Current HEAD SHA',
|
|
|
|
shortSHA: 'Current HEAD short SHA',
|
|
|
|
name: 'Current branch name',
|
|
|
|
lastCommitTime: 'Last commit time'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2015-10-17 23:49:24 +02:00
|
|
|
clean: {
|
2015-11-07 08:55:45 +01:00
|
|
|
dist: ['dist', 'tmp'],
|
2017-02-05 11:08:26 +01:00
|
|
|
desktop: ['tmp/desktop', 'dist/desktop'],
|
|
|
|
cordova: ['tmp/cordova', 'dist/cordova']
|
2015-10-17 23:49:24 +02:00
|
|
|
},
|
|
|
|
copy: {
|
|
|
|
html: {
|
|
|
|
src: 'app/index.html',
|
|
|
|
dest: 'tmp/index.html',
|
|
|
|
nonull: true
|
|
|
|
},
|
|
|
|
favicon: {
|
|
|
|
src: 'app/favicon.png',
|
|
|
|
dest: 'tmp/favicon.png',
|
|
|
|
nonull: true
|
|
|
|
},
|
2017-11-11 19:40:07 +01:00
|
|
|
icons: {
|
|
|
|
cwd: 'app/icons/',
|
|
|
|
src: ['*.png', '*.svg'],
|
|
|
|
dest: 'tmp/icons/',
|
|
|
|
expand: true,
|
|
|
|
nonull: true
|
|
|
|
},
|
|
|
|
'dist-icons': {
|
|
|
|
cwd: 'app/icons/',
|
|
|
|
src: ['*.png', '*.svg'],
|
|
|
|
dest: 'dist/icons/',
|
|
|
|
expand: true,
|
2016-02-07 14:08:37 +01:00
|
|
|
nonull: true
|
|
|
|
},
|
2018-02-04 01:46:41 +01:00
|
|
|
manifest: {
|
|
|
|
cwd: 'app/manifest/',
|
|
|
|
src: ['*.json', '*.xml'],
|
|
|
|
dest: 'tmp/',
|
|
|
|
expand: true,
|
|
|
|
nonull: true
|
|
|
|
},
|
|
|
|
'dist-manifest': {
|
|
|
|
cwd: 'app/manifest/',
|
|
|
|
src: ['*.json', '*.xml'],
|
|
|
|
dest: 'dist/',
|
|
|
|
expand: true,
|
|
|
|
nonull: true
|
|
|
|
},
|
2015-10-17 23:49:24 +02:00
|
|
|
fonts: {
|
2018-06-20 16:53:57 +02:00
|
|
|
src: 'node_modules/font-awesome/fonts/fontawesome-webfont.*',
|
2015-10-17 23:49:24 +02:00
|
|
|
dest: 'tmp/fonts/',
|
|
|
|
nonull: true,
|
|
|
|
expand: true,
|
|
|
|
flatten: true
|
2015-11-07 08:55:45 +01:00
|
|
|
},
|
2019-09-28 20:27:39 +02:00
|
|
|
'desktop-html': {
|
|
|
|
src: 'dist/index.html',
|
|
|
|
dest: 'tmp/desktop/app/index.html',
|
|
|
|
nonull: true
|
|
|
|
},
|
2016-07-16 18:39:52 +02:00
|
|
|
'desktop-app-content': {
|
2017-01-28 23:13:39 +01:00
|
|
|
cwd: 'desktop/',
|
2017-06-11 11:37:09 +02:00
|
|
|
src: ['**', '!package-lock.json'],
|
2015-11-14 09:39:22 +01:00
|
|
|
dest: 'tmp/desktop/app/',
|
|
|
|
expand: true,
|
|
|
|
nonull: true
|
|
|
|
},
|
2017-05-27 23:25:38 +02:00
|
|
|
'desktop-update': {
|
2017-12-02 20:38:13 +01:00
|
|
|
cwd: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Resources/',
|
|
|
|
src: 'app.asar',
|
2017-05-27 23:25:38 +02:00
|
|
|
dest: 'tmp/desktop/update/',
|
|
|
|
expand: true,
|
|
|
|
nonull: true
|
|
|
|
},
|
|
|
|
'desktop-update-helper': {
|
|
|
|
src: ['helper/darwin/KeeWebHelper', 'helper/win32/KeeWebHelper.exe'],
|
|
|
|
dest: 'tmp/desktop/update/',
|
|
|
|
nonull: true
|
|
|
|
},
|
2016-07-16 18:39:52 +02:00
|
|
|
'desktop-windows-helper-ia32': {
|
2016-08-09 04:59:44 +02:00
|
|
|
src: 'helper/win32/KeeWebHelper.exe',
|
2017-12-02 20:38:13 +01:00
|
|
|
dest: 'tmp/desktop/KeeWeb-win32-ia32/Resources/',
|
2015-11-07 08:55:45 +01:00
|
|
|
nonull: true
|
2016-03-01 20:06:23 +01:00
|
|
|
},
|
2016-07-16 18:39:52 +02:00
|
|
|
'desktop-windows-helper-x64': {
|
2016-08-09 04:59:44 +02:00
|
|
|
src: 'helper/win32/KeeWebHelper.exe',
|
2017-12-02 20:38:13 +01:00
|
|
|
dest: 'tmp/desktop/KeeWeb-win32-x64/Resources/',
|
2016-08-08 21:53:59 +02:00
|
|
|
nonull: true
|
|
|
|
},
|
|
|
|
'desktop-darwin-helper-x64': {
|
2016-08-09 04:59:44 +02:00
|
|
|
src: 'helper/darwin/KeeWebHelper',
|
2017-12-02 20:38:13 +01:00
|
|
|
dest: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Resources/',
|
2016-08-12 20:21:32 +02:00
|
|
|
nonull: true,
|
2016-08-12 20:30:47 +02:00
|
|
|
options: { mode: '0755' }
|
2016-07-21 22:54:03 +02:00
|
|
|
},
|
2017-06-05 11:31:50 +02:00
|
|
|
'desktop-darwin-installer': {
|
|
|
|
cwd: 'package/osx/KeeWeb Installer.app',
|
2019-08-18 08:05:38 +02:00
|
|
|
dest:
|
|
|
|
'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app/Contents/Installer/KeeWeb Installer.app',
|
2017-06-05 11:31:50 +02:00
|
|
|
src: '**',
|
|
|
|
expand: true,
|
|
|
|
nonull: true,
|
|
|
|
options: { mode: true }
|
|
|
|
},
|
2016-07-22 21:13:39 +02:00
|
|
|
'desktop-win32-dist-x64': {
|
|
|
|
src: 'tmp/desktop/KeeWeb.win.x64.exe',
|
|
|
|
dest: `dist/desktop/KeeWeb-${pkg.version}.win.x64.exe`,
|
|
|
|
nonull: true
|
|
|
|
},
|
|
|
|
'desktop-win32-dist-ia32': {
|
|
|
|
src: 'tmp/desktop/KeeWeb.win.ia32.exe',
|
|
|
|
dest: `dist/desktop/KeeWeb-${pkg.version}.win.ia32.exe`,
|
2016-07-21 22:54:03 +02:00
|
|
|
nonull: true
|
2015-10-17 23:49:24 +02:00
|
|
|
}
|
|
|
|
},
|
2016-07-17 13:30:38 +02:00
|
|
|
eslint: {
|
|
|
|
app: ['app/scripts/**/*.js'],
|
2017-01-28 23:13:39 +01:00
|
|
|
desktop: ['desktop/**/*.js', '!desktop/node_modules/**'],
|
2019-08-18 08:09:42 +02:00
|
|
|
build: ['Gruntfile.js', 'grunt.*.js', 'build/**/*.js', 'webpack.config.js'],
|
|
|
|
plugins: ['plugins/**/*.js'],
|
|
|
|
util: ['util/**/*.js']
|
2015-10-17 23:49:24 +02:00
|
|
|
},
|
|
|
|
inline: {
|
|
|
|
app: {
|
|
|
|
src: 'tmp/index.html',
|
|
|
|
dest: 'tmp/app.html'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
htmlmin: {
|
|
|
|
options: {
|
|
|
|
removeComments: true,
|
|
|
|
collapseWhitespace: true
|
|
|
|
},
|
|
|
|
app: {
|
|
|
|
files: {
|
2015-10-17 23:53:17 +02:00
|
|
|
'dist/index.html': 'tmp/app.html'
|
2015-10-17 23:49:24 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2015-10-21 23:02:17 +02:00
|
|
|
'string-replace': {
|
|
|
|
manifest: {
|
|
|
|
options: {
|
2015-11-14 09:39:22 +01:00
|
|
|
replacements: [
|
2019-08-18 08:05:38 +02:00
|
|
|
{
|
|
|
|
pattern: '# YYYY-MM-DD:v0.0.0',
|
|
|
|
replacement: '# ' + dt + ':v' + pkg.version
|
|
|
|
},
|
|
|
|
{
|
|
|
|
pattern: '# updmin:v0.0.0',
|
|
|
|
replacement: '# updmin:v' + minElectronVersionForUpdate
|
|
|
|
}
|
2015-11-14 09:39:22 +01:00
|
|
|
]
|
2015-10-21 23:02:17 +02:00
|
|
|
},
|
|
|
|
files: { 'dist/manifest.appcache': 'app/manifest.appcache' }
|
2015-11-14 09:39:22 +01:00
|
|
|
},
|
2019-09-23 20:32:56 +02:00
|
|
|
'service-worker': {
|
|
|
|
options: { replacements: [{ pattern: '0.0.0', replacement: pkg.version }] },
|
|
|
|
files: { 'dist/service-worker.js': 'app/service-worker.js' }
|
2017-02-05 11:08:26 +01:00
|
|
|
},
|
2017-06-05 12:00:30 +02:00
|
|
|
'desktop-public-key': {
|
2019-08-16 23:05:39 +02:00
|
|
|
options: {
|
|
|
|
replacements: [
|
|
|
|
{
|
|
|
|
pattern: "'@@PUBLIC_KEY_CONTENT'",
|
|
|
|
replacement:
|
2019-08-18 08:05:38 +02:00
|
|
|
'`' +
|
|
|
|
fs
|
|
|
|
.readFileSync('app/resources/public-key.pem', {
|
|
|
|
encoding: 'utf8'
|
|
|
|
})
|
|
|
|
.trim() +
|
|
|
|
'`'
|
2019-08-16 23:05:39 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2017-06-05 12:00:30 +02:00
|
|
|
files: { 'tmp/desktop/app/main.js': 'desktop/main.js' }
|
|
|
|
},
|
2017-02-05 11:08:26 +01:00
|
|
|
'cordova-html': {
|
2019-08-16 23:05:39 +02:00
|
|
|
options: {
|
2019-08-18 08:05:38 +02:00
|
|
|
replacements: [
|
|
|
|
{
|
|
|
|
pattern: '<script',
|
|
|
|
replacement: '<script src="cordova.js"></script><script'
|
|
|
|
}
|
|
|
|
]
|
2019-08-16 23:05:39 +02:00
|
|
|
},
|
2017-02-05 11:08:26 +01:00
|
|
|
files: { 'tmp/cordova/app/index.html': 'dist/index.html' }
|
2015-10-21 23:02:17 +02:00
|
|
|
}
|
|
|
|
},
|
2015-10-17 23:49:24 +02:00
|
|
|
webpack: {
|
2019-01-06 15:51:45 +01:00
|
|
|
js: webpackConfig.config(grunt)
|
2016-07-16 13:36:15 +02:00
|
|
|
},
|
|
|
|
'webpack-dev-server': {
|
|
|
|
options: {
|
2019-08-16 18:45:11 +02:00
|
|
|
webpack: webpackConfig.config(grunt, 'development'),
|
|
|
|
publicPath: '/',
|
|
|
|
contentBase: path.resolve(__dirname, 'tmp'),
|
2016-07-16 13:36:15 +02:00
|
|
|
progress: false
|
|
|
|
},
|
2015-10-17 23:49:24 +02:00
|
|
|
js: {
|
2017-01-30 22:55:26 +01:00
|
|
|
keepalive: true,
|
2016-07-16 13:36:15 +02:00
|
|
|
port: 8085
|
2015-10-17 23:49:24 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
options: {
|
|
|
|
interrupt: true,
|
|
|
|
debounceDelay: 500
|
|
|
|
},
|
|
|
|
indexhtml: {
|
|
|
|
files: 'app/index.html',
|
|
|
|
tasks: ['copy:html']
|
|
|
|
}
|
2015-11-07 08:55:45 +01:00
|
|
|
},
|
|
|
|
electron: {
|
|
|
|
options: {
|
|
|
|
name: 'KeeWeb',
|
2015-11-14 09:39:22 +01:00
|
|
|
dir: 'tmp/desktop/app',
|
2015-11-07 08:55:45 +01:00
|
|
|
out: 'tmp/desktop',
|
2019-08-18 10:17:09 +02:00
|
|
|
electronVersion,
|
2015-11-07 08:55:45 +01:00
|
|
|
overwrite: true,
|
2017-12-02 20:38:13 +01:00
|
|
|
asar: true,
|
2019-08-16 23:05:39 +02:00
|
|
|
appCopyright: `Copyright © ${year} Antelle`,
|
|
|
|
appVersion: pkg.version,
|
|
|
|
buildVersion: '<%= gitinfo.local.branch.current.shortSHA %>'
|
2015-11-07 08:55:45 +01:00
|
|
|
},
|
2016-07-16 18:39:52 +02:00
|
|
|
linux: {
|
2015-11-07 08:55:45 +01:00
|
|
|
options: {
|
|
|
|
platform: 'linux',
|
2019-08-18 11:17:00 +02:00
|
|
|
arch: ['x64'],
|
2016-07-16 18:49:19 +02:00
|
|
|
icon: 'graphics/icon.ico'
|
2015-11-07 08:55:45 +01:00
|
|
|
}
|
|
|
|
},
|
2016-07-16 18:39:52 +02:00
|
|
|
darwin: {
|
2016-03-01 20:06:23 +01:00
|
|
|
options: {
|
2016-07-16 18:39:52 +02:00
|
|
|
platform: 'darwin',
|
|
|
|
arch: ['x64'],
|
|
|
|
icon: 'graphics/icon.icns',
|
2019-08-16 23:05:39 +02:00
|
|
|
appBundleId: 'net.antelle.keeweb',
|
|
|
|
appCategoryType: 'public.app-category.productivity',
|
|
|
|
extendInfo: 'package/osx/extend.plist'
|
2016-03-01 20:06:23 +01:00
|
|
|
}
|
2015-11-07 08:55:45 +01:00
|
|
|
},
|
2016-07-16 18:39:52 +02:00
|
|
|
win32: {
|
2015-11-07 08:55:45 +01:00
|
|
|
options: {
|
2016-07-16 18:39:52 +02:00
|
|
|
platform: 'win32',
|
|
|
|
arch: ['ia32', 'x64'],
|
2016-07-16 18:49:19 +02:00
|
|
|
icon: 'graphics/icon.ico',
|
2019-08-16 23:05:39 +02:00
|
|
|
buildVersion: pkg.version,
|
2016-07-16 19:09:06 +02:00
|
|
|
'version-string': {
|
2019-08-16 23:05:39 +02:00
|
|
|
CompanyName: 'KeeWeb',
|
|
|
|
FileDescription: pkg.description,
|
|
|
|
OriginalFilename: 'KeeWeb.exe',
|
|
|
|
ProductName: 'KeeWeb',
|
|
|
|
InternalName: 'KeeWeb'
|
2016-07-16 19:09:06 +02:00
|
|
|
}
|
2015-11-07 08:55:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2017-04-27 21:28:28 +02:00
|
|
|
codesign: {
|
|
|
|
app: {
|
|
|
|
options: {
|
|
|
|
identity: 'app',
|
|
|
|
deep: true
|
|
|
|
},
|
|
|
|
src: ['tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app']
|
|
|
|
},
|
|
|
|
dmg: {
|
|
|
|
options: {
|
|
|
|
identity: 'app'
|
|
|
|
},
|
|
|
|
src: [`dist/desktop/KeeWeb-${pkg.version}.mac.dmg`]
|
|
|
|
}
|
|
|
|
},
|
2015-11-07 08:55:45 +01:00
|
|
|
compress: {
|
2016-07-16 18:39:52 +02:00
|
|
|
options: {
|
|
|
|
level: 6
|
|
|
|
},
|
|
|
|
'desktop-update': {
|
2019-08-18 08:05:38 +02:00
|
|
|
options: {
|
|
|
|
archive: 'dist/desktop/UpdateDesktop.zip',
|
|
|
|
comment: zipCommentPlaceholder
|
|
|
|
},
|
2019-08-16 23:05:39 +02:00
|
|
|
files: [{ cwd: 'tmp/desktop/update', src: '**', expand: true, nonull: true }]
|
2016-07-16 18:39:52 +02:00
|
|
|
},
|
|
|
|
'win32-x64': {
|
2016-07-22 21:13:39 +02:00
|
|
|
options: { archive: `dist/desktop/KeeWeb-${pkg.version}.win.x64.zip` },
|
2016-07-16 18:39:52 +02:00
|
|
|
files: [{ cwd: 'tmp/desktop/KeeWeb-win32-x64', src: '**', expand: true }]
|
|
|
|
},
|
|
|
|
'win32-ia32': {
|
2016-07-22 21:13:39 +02:00
|
|
|
options: { archive: `dist/desktop/KeeWeb-${pkg.version}.win.ia32.zip` },
|
2016-07-16 18:39:52 +02:00
|
|
|
files: [{ cwd: 'tmp/desktop/KeeWeb-win32-ia32', src: '**', expand: true }]
|
|
|
|
},
|
|
|
|
'linux-x64': {
|
2016-07-22 21:13:39 +02:00
|
|
|
options: { archive: `dist/desktop/KeeWeb-${pkg.version}.linux.x64.zip` },
|
2019-08-16 23:05:39 +02:00
|
|
|
files: [
|
|
|
|
{ cwd: 'tmp/desktop/KeeWeb-linux-x64', src: '**', expand: true },
|
|
|
|
{ cwd: 'graphics', src: '128x128.png', nonull: true, expand: true }
|
|
|
|
]
|
2016-07-16 18:39:52 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
appdmg: {
|
|
|
|
options: {
|
|
|
|
title: 'KeeWeb',
|
|
|
|
icon: 'graphics/icon.icns',
|
|
|
|
background: 'graphics/background.png',
|
|
|
|
'background-color': '#E0E6F9',
|
|
|
|
'icon-size': 80,
|
|
|
|
window: { size: { width: 658, height: 498 } },
|
|
|
|
contents: [
|
|
|
|
{ x: 438, y: 344, type: 'link', path: '/Applications' },
|
2019-08-18 08:05:38 +02:00
|
|
|
{
|
|
|
|
x: 192,
|
|
|
|
y: 344,
|
|
|
|
type: 'file',
|
|
|
|
path: 'tmp/desktop/KeeWeb-darwin-x64/KeeWeb.app'
|
|
|
|
}
|
2016-07-16 18:39:52 +02:00
|
|
|
]
|
2016-03-01 20:06:23 +01:00
|
|
|
},
|
2016-07-16 18:39:52 +02:00
|
|
|
app: {
|
2016-07-22 21:13:39 +02:00
|
|
|
dest: `dist/desktop/KeeWeb-${pkg.version}.mac.dmg`
|
2015-11-07 08:55:45 +01:00
|
|
|
}
|
2015-11-14 16:47:51 +01:00
|
|
|
},
|
2016-07-16 20:35:16 +02:00
|
|
|
nsis: {
|
|
|
|
options: {
|
|
|
|
vars: {
|
|
|
|
version: pkg.version,
|
2019-08-18 10:17:09 +02:00
|
|
|
rev() {
|
2019-08-16 23:05:39 +02:00
|
|
|
return grunt.config.get('gitinfo.local.branch.current.shortSHA');
|
|
|
|
},
|
2016-07-16 20:35:16 +02:00
|
|
|
homepage: pkg.homepage
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'win32-x64': {
|
|
|
|
options: {
|
2016-07-22 21:13:39 +02:00
|
|
|
installScript: 'package/nsis/main.nsi',
|
2016-07-17 11:13:14 +02:00
|
|
|
arch: 'x64',
|
2016-07-21 22:54:03 +02:00
|
|
|
output: 'tmp/desktop/KeeWeb.win.x64.exe'
|
2016-07-16 20:35:16 +02:00
|
|
|
}
|
|
|
|
},
|
2016-07-22 21:13:39 +02:00
|
|
|
'win32-un-x64': {
|
|
|
|
options: {
|
|
|
|
installScript: 'package/nsis/main-un.nsi',
|
|
|
|
arch: 'x64',
|
|
|
|
output: 'tmp/desktop/KeeWeb-win32-x64/uninst.exe'
|
|
|
|
}
|
|
|
|
},
|
2016-07-16 20:35:16 +02:00
|
|
|
'win32-ia32': {
|
|
|
|
options: {
|
2016-07-22 21:13:39 +02:00
|
|
|
installScript: 'package/nsis/main.nsi',
|
2016-07-17 11:13:14 +02:00
|
|
|
arch: 'ia32',
|
2016-07-21 22:54:03 +02:00
|
|
|
output: 'tmp/desktop/KeeWeb.win.ia32.exe'
|
2016-07-16 20:35:16 +02:00
|
|
|
}
|
2016-07-22 21:13:39 +02:00
|
|
|
},
|
|
|
|
'win32-un-ia32': {
|
|
|
|
options: {
|
|
|
|
installScript: 'package/nsis/main-un.nsi',
|
|
|
|
arch: 'ia32',
|
|
|
|
output: 'tmp/desktop/KeeWeb-win32-ia32/uninst.exe'
|
|
|
|
}
|
2016-07-16 20:35:16 +02:00
|
|
|
}
|
|
|
|
},
|
2019-09-09 16:24:45 +02:00
|
|
|
chmod: {
|
2019-09-09 17:13:28 +02:00
|
|
|
'linux-desktop-x64': {
|
2019-09-09 16:24:45 +02:00
|
|
|
options: {
|
|
|
|
mode: '4755'
|
|
|
|
},
|
|
|
|
src: ['tmp/desktop/KeeWeb-linux-x64/chrome-sandbox']
|
|
|
|
}
|
|
|
|
},
|
2016-04-02 13:21:07 +02:00
|
|
|
deb: {
|
2017-05-12 20:58:53 +02:00
|
|
|
options: {
|
|
|
|
tmpPath: 'tmp/desktop/',
|
|
|
|
package: {
|
|
|
|
name: 'keeweb-desktop',
|
|
|
|
version: pkg.version,
|
|
|
|
description: pkg.description,
|
|
|
|
author: pkg.author,
|
|
|
|
homepage: pkg.homepage,
|
2019-08-18 10:17:09 +02:00
|
|
|
rev() {
|
2019-08-16 23:05:39 +02:00
|
|
|
return grunt.config.get('gitinfo.local.branch.current.shortSHA');
|
|
|
|
}
|
2017-05-12 20:58:53 +02:00
|
|
|
}
|
|
|
|
},
|
2016-07-16 18:39:52 +02:00
|
|
|
'linux-x64': {
|
2016-04-02 13:21:07 +02:00
|
|
|
options: {
|
|
|
|
info: {
|
|
|
|
arch: 'amd64',
|
2017-05-20 20:13:18 +02:00
|
|
|
pkgName: `KeeWeb-${pkg.version}.linux.x64.deb`,
|
|
|
|
targetDir: 'dist/desktop',
|
|
|
|
appName: 'KeeWeb',
|
2019-04-22 11:24:18 +02:00
|
|
|
depends: 'libappindicator1, libgconf-2-4',
|
2017-05-20 20:13:18 +02:00
|
|
|
scripts: {
|
|
|
|
postinst: 'package/deb/scripts/postinst'
|
|
|
|
}
|
2016-04-02 13:21:07 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
files: [
|
2017-05-12 20:58:53 +02:00
|
|
|
{ cwd: 'package/deb/usr', src: '**', dest: '/usr', expand: true, nonull: true },
|
2019-08-16 23:05:39 +02:00
|
|
|
{
|
|
|
|
cwd: 'tmp/desktop/KeeWeb-linux-x64/',
|
|
|
|
src: '**',
|
|
|
|
dest: '/opt/keeweb-desktop',
|
|
|
|
expand: true,
|
|
|
|
nonull: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: 'graphics/128x128.png',
|
|
|
|
dest: '/usr/share/icons/hicolor/128x128/apps/keeweb.png',
|
|
|
|
nonull: true
|
|
|
|
}
|
2017-05-12 20:58:53 +02:00
|
|
|
]
|
2016-04-02 13:21:07 +02:00
|
|
|
}
|
|
|
|
},
|
2016-03-05 12:16:12 +01:00
|
|
|
'sign-archive': {
|
2016-07-16 18:39:52 +02:00
|
|
|
'desktop-update': {
|
2016-03-05 12:16:12 +01:00
|
|
|
options: {
|
|
|
|
file: 'dist/desktop/UpdateDesktop.zip',
|
2017-06-11 11:37:09 +02:00
|
|
|
signature: zipCommentPlaceholder
|
2016-03-05 12:16:12 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2017-05-27 23:25:38 +02:00
|
|
|
'sign-desktop-files': {
|
|
|
|
'desktop-update': {
|
|
|
|
options: {
|
2017-06-11 11:37:09 +02:00
|
|
|
path: 'tmp/desktop/update'
|
2017-05-27 23:25:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2015-11-14 16:47:51 +01:00
|
|
|
'validate-desktop-update': {
|
|
|
|
desktop: {
|
|
|
|
options: {
|
|
|
|
file: 'dist/desktop/UpdateDesktop.zip',
|
2019-08-18 08:05:38 +02:00
|
|
|
expected: [
|
|
|
|
'app.asar',
|
|
|
|
'helper/darwin/KeeWebHelper',
|
|
|
|
'helper/win32/KeeWebHelper.exe'
|
|
|
|
],
|
2017-12-02 20:38:13 +01:00
|
|
|
expectedCount: 7,
|
2016-03-05 12:45:37 +01:00
|
|
|
publicKey: 'app/resources/public-key.pem'
|
2015-11-14 16:47:51 +01:00
|
|
|
}
|
|
|
|
}
|
2016-04-02 22:44:53 +02:00
|
|
|
},
|
2016-07-20 19:05:39 +02:00
|
|
|
'sign-exe': {
|
2016-07-21 22:54:03 +02:00
|
|
|
options: {
|
2017-07-04 22:34:19 +02:00
|
|
|
spc: 'keys/keeweb.spc',
|
2019-01-06 17:58:40 +01:00
|
|
|
key: '01',
|
2017-06-11 23:29:43 +02:00
|
|
|
algo: 'sha256',
|
2017-07-04 23:05:05 +02:00
|
|
|
url: pkg.homepage
|
2016-07-21 22:54:03 +02:00
|
|
|
},
|
2016-07-22 21:13:39 +02:00
|
|
|
'win32-build-x64': {
|
|
|
|
options: {
|
|
|
|
files: {
|
|
|
|
'tmp/desktop/KeeWeb-win32-x64/KeeWeb.exe': 'KeeWeb',
|
|
|
|
'tmp/desktop/KeeWeb-win32-x64/ffmpeg.dll': '',
|
2019-08-18 08:05:38 +02:00
|
|
|
'tmp/desktop/KeeWeb-win32-x64/libEGL.dll':
|
|
|
|
'ANGLE libEGL Dynamic Link Library',
|
|
|
|
'tmp/desktop/KeeWeb-win32-x64/libGLESv2.dll':
|
2019-08-18 11:21:24 +02:00
|
|
|
'ANGLE libGLESv2 Dynamic Link Library'
|
2016-07-22 21:13:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'win32-build-ia32': {
|
|
|
|
options: {
|
|
|
|
files: {
|
|
|
|
'tmp/desktop/KeeWeb-win32-ia32/KeeWeb.exe': 'KeeWeb',
|
|
|
|
'tmp/desktop/KeeWeb-win32-ia32/ffmpeg.dll': '',
|
2019-08-18 08:05:38 +02:00
|
|
|
'tmp/desktop/KeeWeb-win32-ia32/libEGL.dll':
|
|
|
|
'ANGLE libEGL Dynamic Link Library',
|
|
|
|
'tmp/desktop/KeeWeb-win32-ia32/libGLESv2.dll':
|
2019-08-18 11:21:24 +02:00
|
|
|
'ANGLE libGLESv2 Dynamic Link Library'
|
2016-07-22 21:13:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'win32-uninst-x64': {
|
|
|
|
options: {
|
|
|
|
files: {
|
|
|
|
'tmp/desktop/KeeWeb-win32-x64/uninst.exe': 'KeeWeb Uninstaller'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
'win32-uninst-ia32': {
|
|
|
|
options: {
|
|
|
|
files: {
|
|
|
|
'tmp/desktop/KeeWeb-win32-ia32/uninst.exe': 'KeeWeb Uninstaller'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2016-07-21 22:54:03 +02:00
|
|
|
'win32-installer-x64': {
|
|
|
|
options: {
|
2016-07-22 21:13:39 +02:00
|
|
|
files: {
|
|
|
|
'tmp/desktop/KeeWeb.win.x64.exe': 'KeeWeb Setup'
|
|
|
|
}
|
2016-07-21 22:54:03 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
'win32-installer-ia32': {
|
2016-07-20 19:05:39 +02:00
|
|
|
options: {
|
2016-07-22 21:13:39 +02:00
|
|
|
files: {
|
|
|
|
'tmp/desktop/KeeWeb.win.ia32.exe': 'KeeWeb Setup'
|
|
|
|
}
|
2016-07-20 19:05:39 +02:00
|
|
|
}
|
|
|
|
}
|
2016-07-20 19:32:21 +02:00
|
|
|
},
|
2017-05-12 20:37:27 +02:00
|
|
|
'sign-dist': {
|
2019-08-16 23:05:39 +02:00
|
|
|
dist: {
|
2017-05-12 20:37:27 +02:00
|
|
|
options: {
|
2017-06-11 11:37:09 +02:00
|
|
|
sign: 'dist/desktop/Verify.sign.sha256'
|
2017-05-12 20:37:27 +02:00
|
|
|
},
|
|
|
|
files: {
|
2019-08-18 08:05:38 +02:00
|
|
|
'dist/desktop/Verify.sha256': [
|
|
|
|
'dist/desktop/KeeWeb-*',
|
|
|
|
'dist/desktop/UpdateDesktop.zip'
|
|
|
|
]
|
2017-05-12 20:37:27 +02:00
|
|
|
}
|
|
|
|
}
|
2015-10-17 23:49:24 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|